GiderosMobile gideros https://wiki.giderosmobile.com/index.php/Welcome! MediaWiki 1.31.0 first-letter Media Special Talk User User talk GiderosMobile GiderosMobile talk File File talk MediaWiki MediaWiki talk Template Template talk Help Help talk Category Category talk Translations Translations talk Accelerometer 0 30 14939 14705 2019-12-09T22:01:27Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Accelerometer --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform winrt.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> === <translate>Description</translate> === <translate>The [[Special:MyLanguage/Accelerometer|Accelerometer]] class is used to access accelerometer data.<br/></translate> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> local filter = 0.03 local fx, fy, fz = 0, 0, 0 --create instance local accelerometer = Accelerometer.new() --start receiving data accelerometer:start() function onEnterFrame(event) ---get values for example on each enter frame event local x, y, z = accelerometer:getAcceleration() fx = x * filter + fx * (1 - filter) fy = y * filter + fy * (1 - filter) fz = z * filter + fz * (1 - filter) print("Y: "..math.floor(fy*90*-1)) print("X: "..math.floor(fx*90*-1)) print("Z: "..math.floor(fz*90*-1)) end stage:addEventListener("enterFrame",onEnterFrame,self) </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Accelerometer.isAvailable|Accelerometer.isAvailable]] ''<translate>is the accelerometer available?</translate>''<br> <!-- GIDEROSMTD:Accelerometer.isAvailable() Is the accelerometer available? --> [[Special:MyLanguage/Accelerometer.new|Accelerometer.new]] ''<translate>creates new Accelerometer instance</translate>''<br/> <!-- GIDEROSMTD:Accelerometer.new() Creates new Accelerometer instance --> [[Special:MyLanguage/Accelerometer:getAcceleration|Accelerometer:getAcceleration]] ''<translate>returns the 3-axis acceleration measured by the accelerometer</translate>''<br/> <!-- GIDEROSMTD:Accelerometer:getAcceleration() returns the 3-axis acceleration measured by the accelerometer --> [[Special:MyLanguage/Accelerometer:start|Accelerometer:start]] ''<translate>starts accelerometer updates</translate>''<br/> <!-- GIDEROSMTD:Accelerometer:start() starts accelerometer updates --> [[Special:MyLanguage/Accelerometer:stop|Accelerometer:stop]] ''<translate>stops accelerometer updates</translate>''<br/> <!-- GIDEROSMTD:Accelerometer:stop() starts accelerometer updates --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} <!--{{Accelerometer}}--> bpmt0ms8elgwvj1res26u6hgvqo33m9 Accelerometer.isAvailable 0 7 14899 14869 2019-12-09T02:00:01Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.8<br/> '''Class:''' [[Accelerometer]]<br/> === Description === Returns ''true'' if accelerometer is available for this platform, ''false'' otherwise. <source lang="lua"> (bool) = Accelerometer.isAvailable() </source> === Return values === '''Returns''' (bool) ''true'' if accelerometer is available for this platform, ''false'' otherwise. {{Accelerometer}} 7mu5aduggnu7s2vh2fgz3hgl6oy8ytm Accelerometer.new 0 1086 14900 14890 2019-12-09T02:00:18Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.8<br/> '''Class:''' [[Accelerometer]]<br/> === Description === Creates new Accelerometer instance <source lang="lua"> Accelerometer.new() </source> {{Accelerometer}} r92y8hegd0uawqgf98qz1kb6conihhm Accelerometer:getAcceleration 0 778 14901 14889 2019-12-09T02:00:33Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.8<br/> '''Class:''' [[Accelerometer]]<br/> === Description === Returns the 3-axis acceleration measured by the accelerometer. <source lang="lua"> (number), (number), (number) = Accelerometer:getAcceleration() </source> === Return values === '''Returns''' (number) acceleration on x-axis in G's<br/> '''Returns''' (number) acceleration on y-axis in G's<br/> '''Returns''' (number) acceleration on z-axis in G's<br/> {{Accelerometer}} nyrewfbcusx2h18lj409a2eeacyoeb3 Accelerometer:start 0 1012 14902 14888 2019-12-09T02:00:50Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.8<br/> '''Class:''' [[Accelerometer]]<br/> === Description === Starts the generation of accelerometer samples. <source lang="lua"> Accelerometer:start() </source> {{Accelerometer}} d8or0we5qnofmxgsxyicoigxfhv2xbd Accelerometer:stop 0 388 14903 14887 2019-12-09T02:01:05Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.8<br/> '''Class:''' [[Accelerometer]]<br/> === Description === Stops the generation of accelerometer samples. <source lang="lua"> Accelerometer:stop() </source> {{Accelerometer}} 2fez6qe3pzykw46v4gi7q56t5uewtrb Accelerometer Introduction 0 8 14898 14886 2019-12-09T01:59:10Z MoKaLux 19 wikitext text/x-wiki The Accelerometer class is used to access accelerometer data. <source lang="lua"> --create instance local accelerometer = Accelerometer.new() --start receiving data accelerometer:start() ---get values for example on each enter frame event local x, y, z = accelerometer:getAcceleration() print(x, y, z) --once you don't need it, stop it accelerometer:stop() </source> {{Accelerometer}} m9ma15jzx1454u1ex7a3gi8qela3csc AlertDialog 0 20 14941 14940 2019-12-09T22:06:31Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:AlertDialog --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> === <translate>Description</translate> === The [[Special:MyLanguage/AlertDialog|AlertDialog]] class is used to display native alert dialogs with one, two or three buttons. Cancel button is mandatory but other two buttons are optional. When the user presses any button in the alert dialog, it's dismissed and [[Special:MyLanguage/Event.COMPLETE|Event.COMPLETE]] event is dispatched. If alert dialog is dismissed by any other means (by pressing back button on Android or by pressing close button on desktop), it behaves as cancel button is pressed. === <translate>Examples</translate> === <source lang="lua"> local alertDialog = AlertDialog.new("This is my title", "And my message", "Cancel", "Yes", "No") local function onComplete(event) print(event.buttonIndex, event.buttonText) end alertDialog:addEventListener(Event.COMPLETE, onComplete) alertDialog:show() </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/AlertDialog.new|AlertDialog.new]] <br/><!-- GIDEROSMTD:AlertDialog.new(title,message,cancelButton,button1,button2) --> [[Special:MyLanguage/AlertDialog:hide|AlertDialog:hide]] <br/><!-- GIDEROSMTD:AlertDialog:hide() --> [[Special:MyLanguage/AlertDialog:show|AlertDialog:show]] <br/><!-- GIDEROSMTD:AlertDialog:show() --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === [[Special:MyLanguage/Event.COMPLETE|Event.COMPLETE]]<br/><!-- GIDEROSEVT:Event.COMPLETE complete--> === <translate>Constants</translate> === |} hbfp4zkr7l42nmik9rbncsbpu08gkfk AlertDialog.new 0 476 14905 14885 2019-12-09T02:05:53Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.8<br/> '''Class:''' [[AlertDialog]]<br/> === Description === Creates a new [[AlertDialog]] object. <br/> <source lang="lua"> AlertDialog.new(title,message,cancelButton,button1,button2) </source> === Parameters === '''title''': (string) The string that appears in the receiver's title bar. Can be empty string. <br/> '''message''': (string) Descriptive text that provides more details than the title. Can be empty string. <br/> '''cancelButton''': (string) The text of the cancel button. <br/> '''button1''': (string) The text of the 1st optional button. '''optional'''<br/> '''button2''': (string) The text of the 2st optional button. '''optional'''<br/> {{AlertDialog}} pwyforysbw5ixjm1uakbjlko2tu9fld AlertDialog:hide 0 363 14906 14884 2019-12-09T02:06:08Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.8<br/> '''Class:''' [[AlertDialog]]<br/> === Description === Hides the alert dialog. <br/> <source lang="lua"> AlertDialog:hide() </source> {{AlertDialog}} 9637u38ybj0bgieke32rfxkrbb1rgo4 AlertDialog:show 0 1105 14907 14883 2019-12-09T02:06:25Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.8<br/> '''Class:''' [[AlertDialog]]<br/> === Description === Shows the alert dialog. <br/> <source lang="lua"> AlertDialog:show() </source> {{AlertDialog}} t6px7j6ytu1dh0eewjwmio99mifplj7 AlertDialog Event.COMPLETE 0 9 14904 14882 2019-12-09T02:03:14Z MoKaLux 19 wikitext text/x-wiki <!--[[Category: AlertDialog]]--> This event is dispatched when user presses any button on AlertDialog or the dialog is dismissed by any other reason. <source lang="lua"> Event.COMPLETE = "complete" </source> === Event properties: === '''buttonIndex:''' (number) the index of the button pressed. It is nil when cancel button is pressed, 1 when 1st button is pressed and 2 when 2nd button is pressed.<br/> '''buttonText:''' (string) the text of the button pressed {{AlertDialog}} 6rd4tzsdgd9oe9a9wn4uxlfax806tla Application 0 44 14942 14736 2019-12-09T22:16:22Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Application --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> === <translate>Description</translate> === [[Special:MyLanguage/Application|Application]] class contains the common functions that&#039;s available to the current application. There is a global variable ''application'' of type [[Special:MyLanguage/Application|Application]] to access these functions. {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Application:canOpenUrl|Application:canOpenUrl]] ''<translate>Tests if it is possible to open provided url</translate>''<br/><!-- GIDEROSMTD:Application:canOpenUrl(url) Tests if it is possible to open provided url --> [[Special:MyLanguage/Application:configureFrustum|Application:configureFrustum]] ''<translate>Configure the projection for 3D perspective.</translate>''<br/><!-- GIDEROSMTD:Application:configureFrustum(fov,farplane) Configure the projection for 3D perspective. --> [[Special:MyLanguage/Application:exit|Application:exit]] ''<translate>terminates the application</translate>''<br/><!-- GIDEROSMTD:Application:exit() terminates the application --> [[Special:MyLanguage/Application:get|Application:get]] ''<translate>returns state of desktop setting</translate>''<br/><!-- GIDEROSMTD:Application:get(setting) returns state of desktop setting --> [[Special:MyLanguage/Application:getApiVersion|Application:getApiVersion]] ''<translate>returns the API version</translate>''<br/><!-- GIDEROSMTD:Application:getApiVersion() returns the API version --> [[Special:MyLanguage/Application:getAppId|Application:getAppId]] ''<translate>returns the app id or bundle id</translate>''<br/><!-- GIDEROSMTD:Application:getAppId() returns the app id or bundle id --> [[Special:MyLanguage/Application:getBackgroundColor|Application:getBackgroundColor]] ''<translate>returns the background color in hexadecimal format</translate>''<br/><!-- GIDEROSMTD:Application:getBackgroundColor() returns the background color in hexadecimal format --> [[Special:MyLanguage/Application:getContentHeight|Application:getContentHeight]] ''<translate>returns content height</translate>''<br/><!-- GIDEROSMTD:Application:getContentHeight() returns content height --> [[Special:MyLanguage/Application:getContentWidth|Application:getContentWidth]] ''<translate>returns content width</translate>''<br/><!-- GIDEROSMTD:Application:getContentWidth() returns content width --> [[Special:MyLanguage/Application:getDeviceHeight|Application:getDeviceHeight]] ''<translate>returns the physical height of the device in pixels</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceHeight() returns the physical height of the device in pixels --> [[Special:MyLanguage/Application:getDeviceWidth|Application:getDeviceWidth]] ''<translate>returns the physical width of the device in pixels</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceWidth() returns the physical width of the device in pixels --> [[Special:MyLanguage/Application:getDeviceInfo|Application:getDeviceInfo]] ''<translate>returns information about device</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceInfo() returns information about device --> [[Special:MyLanguage/Application:getDeviceOrientation|Application:getDeviceOrientation]] ''<translate>Get the device orientation</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceOrientation() Get the device orientation --> [[Special:MyLanguage/Application:getDeviceSafeArea|Application:getDeviceSafeArea]] ''<translate>returns the safe display area bounds</translate>''<br/><!-- GIDEROSMTD:Application:getDeviceSafeArea(logical) returns the safe display area bounds --> [[Special:MyLanguage/Application:getFps|Application:getFps]] ''<translate>returns the frame rate of the application</translate>''<br/><!-- GIDEROSMTD:Application:getFps() returns the frame rate of the application --> [[Special:MyLanguage/Application:getKeyboardModifiers|Application:getKeyboardModifiers]] ''<translate>returns the current keyboard modifiers</translate>''<br/><!-- GIDEROSMTD:Application:getKeyboardModifiers() returns the current keyboard modifiers --> [[Special:MyLanguage/Application:getLanguage|Application:getLanguage]] ''<translate>returns the user language</translate>''<br/><!-- GIDEROSMTD:Application:getLanguage() returns the user language --> [[Special:MyLanguage/Application:getLocale|Application:getLocale]] ''<translate>returns the device locale</translate>''<br/><!-- GIDEROSMTD:Application:getLocale() returns the device locale --> [[Special:MyLanguage/Application:getLogicalBounds|Application:getLogicalBounds]] ''<translate>returns the physical screen bounds in logical space</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalBounds() returns the physical screen bounds in logical space --> [[Special:MyLanguage/Application:getLogicalHeight|Application:getLogicalHeight]] ''<translate>returns the logical height of the application</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalHeight() returns the logical height of the application --> [[Special:MyLanguage/Application:getLogicalWidth|Application:getLogicalWidth]] ''<translate>returns the logical width of the application</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalWidth() returns the logical width of the application --> [[Special:MyLanguage/Application:getLogicalScaleX|Application:getLogicalScaleX]] ''<translate>returns the scaling of automatic screen scaling on the x-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalScaleX() returns the scaling of automatic screen scaling on the x-axis --> [[Special:MyLanguage/Application:getLogicalScaleY|Application:getLogicalScaleY]] ''<translate>returns the scaling of automatic screen scaling on the y-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalScaleY() returns the scaling of automatic screen scaling on the y-axis --> [[Special:MyLanguage/Application:getLogicalTranslateX|Application:getLogicalTranslateX]] ''<translate>returns the translation of automatic screen scaling on the x-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalTranslateX() returns the translation of automatic screen scaling on the x-axis --> [[Special:MyLanguage/Application:getLogicalTranslateY|Application:getLogicalTranslateY]] ''<translate>returns the translation of automatic screen scaling on the y-axis</translate>''<br/><!-- GIDEROSMTD:Application:getLogicalTranslateY() returns the translation of automatic screen scaling on the y-axis --> [[Special:MyLanguage/Application:getOrientation|Application:getOrientation]] ''<translate>returns the orientation of the application</translate>''<br/><!-- GIDEROSMTD:Application:getOrientation() returns the orientation of the application --> [[Special:MyLanguage/Application:getScaleMode|Application:getScaleMode]] ''<translate>returns the automatic scale mode of the application</translate>''<br/><!-- GIDEROSMTD:Application:getScaleMode() returns the automatic scale mode of the application --> [[Special:MyLanguage/Application:getScreenDensity|Application:getScreenDensity]] ''<translate>returns the screen density in pixels per inch</translate>''<br/><!-- GIDEROSMTD:Application:getScreenDensity() returns the screen density in pixels per inch --> [[Special:MyLanguage/Application:getTextureMemoryUsage|Application:getTextureMemoryUsage]] ''<translate>returns the texture memory usage in Kbytes</translate>''<br/><!-- GIDEROSMTD:Application:getTextureMemoryUsage() returns the texture memory usage in Kbytes --> [[Special:MyLanguage/Application:isPlayerMode|Application:isPlayerMode]] ''<translate>Check if app runs on player</translate>''<br/><!-- GIDEROSMTD:Application:isPlayerMode() Check if app runs on player --> [[Special:MyLanguage/Application:openUrl|Application:openUrl]] ''<translate>opens the given URL in the appropriate application</translate>''<br/><!-- GIDEROSMTD:Application:openUrl(url) opens the given URL in the appropriate application --> [[Special:MyLanguage/Application:set|Application:set]] ''<translate>sets state of desktop settings</translate>''<br/><!-- GIDEROSMTD:Application:set(setting, values) Sets state of desktop settings --> [[Special:MyLanguage/Application:setBackgroundColor|Application:setBackgroundColor]] ''<translate>sets the background color in hexadecimal format</translate>''<br/><!-- GIDEROSMTD:Application:setBackgroundColor(color) sets the background color in hexadecimal format --> [[Special:MyLanguage/Application:setFps|Application:setFps]] ''<translate>sets the frame rate of the application</translate>''<br/><!-- GIDEROSMTD:Application:setFps(fps) sets the frame rate of the application --> [[Special:MyLanguage/Application:setFullScreen|Application:setFullScreen]] ''<translate>Full screen or window mode</translate>''<br/><!-- GIDEROSMTD:Application:setFullScreen(fullscreen) Full screen or window mode --> [[Special:MyLanguage/Application:setKeepAwake|Application:setKeepAwake]] ''<translate>enables/disables screen dimming and device sleeping</translate>''<br/><!-- GIDEROSMTD:Application:setKeepAwake(keepAwake) enables/disables screen dimming and device sleeping --> [[Special:MyLanguage/Application:setKeyboardVisibility|Application:setKeyboardVisibility]] <br/><!-- GIDEROSMTD:Application:setKeyboardVisibility(visible) --> [[Special:MyLanguage/Application:setLogicalDimensions|Application:setLogicalDimensions]] ''<translate>sets the logical dimensions of the application</translate>''<br/><!-- GIDEROSMTD:Application:setLogicalDimensions(width,height) sets the logical dimensions of the application --> [[Special:MyLanguage/Application:setOrientation|Application:setOrientation]] ''<translate>sets the orientation of the application</translate>''<br/><!-- GIDEROSMTD:Application:setOrientation(orientation) sets the orientation of the application --> [[Special:MyLanguage/Application:setScaleMode|Application:setScaleMode]] ''<translate>sets the automatic scale mode of the application</translate>''<br/><!-- GIDEROSMTD:Application:setScaleMode(scaleMode) sets the automatic scale mode of the application --> [[Special:MyLanguage/Application:setWindowSize|Application:setWindowSize]] ''<translate>Sets desktop window to a specific size</translate>''<br/><!-- GIDEROSMTD:Application:setWindowSize(width,height) Sets desktop window to a specific size --> [[Special:MyLanguage/Application:vibrate|Application:vibrate]] ''<translate>vibrates the device</translate>''<br/><!-- GIDEROSMTD:Application:vibrate(ms) vibrates the device --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === [[Special:MyLanguage/Event.APPLICATION_START|Event.APPLICATION_START]]<br/> [[Special:MyLanguage/Event.APPLICATION_RESIZE|Event.APPLICATION_RESIZE]]<br/> [[Special:MyLanguage/Event.APPLICATION_SUSPEND|Event.APPLICATION_SUSPEND]]<br/> [[Special:MyLanguage/Event.APPLICATION_EXIT|Event.APPLICATION_EXIT]]<br/> [[Special:MyLanguage/Event.APPLICATION_RESUME|Event.APPLICATION_RESUME]]<br/> === <translate>Constants</translate> === [[Special:MyLanguage/Application.LANDSCAPE_LEFT|Application.LANDSCAPE_LEFT]]<br/><!-- GIDEROSCST:Application.LANDSCAPE_LEFT landscapeLeft--> [[Special:MyLanguage/Application.LANDSCAPE_RIGHT|Application.LANDSCAPE_RIGHT]]<br/><!-- GIDEROSCST:Application.LANDSCAPE_RIGHT landscapeRight--> [[Special:MyLanguage/Application.PORTRAIT|Application.PORTRAIT]]<br/><!-- GIDEROSCST:Application.PORTRAIT portrait--> [[Special:MyLanguage/Application.PORTRAIT_UPSIDE_DOWN|Application.PORTRAIT_UPSIDE_DOWN]]<br/><!-- GIDEROSCST:Application.PORTRAIT_UPSIDE_DOWN portraitUpsideDown--> |} qel26awwnmpvjsxqeiq73es0scf8b6t Application.LANDSCAPE LEFT 0 1271 13749 13600 2019-12-02T22:46:20Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Value:''' landscapeLeft<br/> '''Defined by:''' [[Application|Application]]<br/> === Description === Representation of landscape left {{Application}} mu302uvx3vsuwk4ppynceb3tlth6k9l Application.LANDSCAPE RIGHT 0 1228 13750 13601 2019-12-02T22:46:38Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Value:''' landscapeRight<br/> '''Defined by:''' [[Application|Application]]<br/> === Description === Representation of landscape right {{Application}} jni0tjga7yurky265gsagyk0g2ey4om Application.PORTRAIT 0 1237 13751 13602 2019-12-02T22:47:06Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Value:''' portrait<br/> '''Defined by:''' [[Application|Application]]<br/> === Description === Representation of portrait {{Application}} svocet3ygzkce1981ged7u53pcu4j0n Application.PORTRAIT UPSIDE DOWN 0 1346 13752 13603 2019-12-02T22:47:22Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Value:''' portraitUpsideDown<br/> '''Defined by:''' [[Application|Application]]<br/> === Description === Representation of portrait upside down {{Application}} c4e9mrcii6efxpc8zav917u3ncvgk1p Application:canOpenUrl 0 903 13748 13642 2019-12-02T22:45:21Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2013.06<br/> '''Class:''' [[Application]]<br/> === Description === Tests if it is possible to open provided url using [[Application:openUrl]] method (it checks only app permissions, so 'true' may be returned even if device is offline) <source lang="lua"> application:canOpenUrl(url) </source> === Parameters === '''url''': (string) url to test if can be opened {{Application}} la0q52x7d7gpqacuqwr7eicxvhsbqhc Application:configureFrustum 0 980 13753 13604 2019-12-02T22:47:56Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2015.04.04<br/> '''Class:''' [[Application|Application]]<br/> === Description === Configure the field of view (fov) and far clipping plane for 3D projection. Setting a fov of 0 selects default orthographic projection (no perspective). The field of view specifies the angle of vision by which the largest side of the scene is seen. It is used to compute the distance of the eye relative to the screen along the Z axis: <br/> <br/> Z=(largest screen dimension/2)/tan(fov/2) <br/> <br/> Z is the eye location. The far clipping plane specifies the maximum distance of an object. Objects more distant than the far clipping plane are not drawn. <br/> '''Note:''' the perspective is oriented so that the full screen is at Z=0 (so sprite:setPosition(x,y,0) will place the sprite at exactly (x,y) pixels on the screen, irrespective of fov) and distant objects are placed at negative Z values. <br/> <br/> If the fov is set at non-zero then perspective projection is activated. If farplane is then not set it takes the default value 100*(screen height). Normally the user should set this value. Note that there is no nearplane in perspective mode (objects are clipped only at the eye position) <br/> If fov is set at 0 then the eye is at +infinity and a near plane is set at z=+farplane. Objects closer than this are clipped. The farplane remains at z=-farplane. <br/> <br/> <source lang="lua"> application:configureFrustum(fov,farplane) </source> <br/> === Parameters === '''fov''': (number) Specifies the field of view angle in degrees If fov>0 a perspective projection is used with the eye at position z=+h/tan(fov/2) where h is half the larger screen dimension (logical coordinates). In this case there is a farplane but no nearplane: clipping is done only at the eye position. If fov=0, an orthographic projection is used with both a farplane and a nearplane (see below) <br/> '''farplane''': (number) The distance of the far clipping plane along Z axis. If fov>0 and this value is not set, the farplane is set at distance 100*(screen height) from the origin (z=0). If fov=0 (orthographic projection), a nearplane is also used at distance farplane from the origin. If fov=0 and no farplane is set then near and farplanes are set at 1 pixel from the origin. '''optional''' <br/> {{Application}} ezvmzhrwxyasfkqc52nji44vol2nj0l Application:exit 0 1020 13754 13606 2019-12-02T22:48:18Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.2.2<br/> '''Class:''' [[Application|Application]]<br/> === Description === Terminates the application. Although this function is available to all platforms, it should be used on Android only. <source lang="lua"> application:exit() </source> {{Application}} tlbmwmlyiel5otpzzr90pk5d1gkumse Application:get 0 2567 13755 13607 2019-12-02T22:48:35Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2015.7<br/> '''Class:''' [[Application|Application]]<br/> === Description === Returns the state of the desktop setting provided as string parameter. <source lang="lua"> -- print list of all available settings print(application:get("help")) </source> {{Application}} nf9cs28ts65n7505in2zelvx9530zl4 Application:getApiVersion 0 310 13756 13608 2019-12-02T22:48:55Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.08.2<br/> '''Class:''' [[Application|Application]]<br/> === Description === Returns the API version. <br/> <source lang="lua"> (string) = application:getApiVersion() </source> === Return values === '''Returns''' (string) The API version.<br/> {{Application}} 13ph9ajj9aaml68trtzndvetgwifcgu Application:getAppId 0 764 13757 13609 2019-12-02T22:49:12Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2017.11.2<br/> '''Class:''' [[Application|Application]]<br/> === Description === Returns the application identifier or bundle identifier. <br/> <source lang="lua"> (string) = application:getAppId() </source> === Return values === '''Returns''' (string) App id<br/> {{Application}} beifegzs59o2h5vqwbd9wr57cvzdnwv Application:getBackgroundColor 0 578 13758 13610 2019-12-02T22:49:31Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Application|Application]]<br/> === Description === Returns the background color (or clear color) of the application in hexadecimal format. <br/> <source lang="lua"> (color) = application:getBackgroundColor() </source> === Return values === '''Returns''' (color) The background color in hexadecimal format. {{Application}} 4ezvuu0tfraikuqlhscp3h4lrbxpayy Application:getContentHeight 0 892 13759 13611 2019-12-02T22:49:49Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Application|Application]]<br/> === Description === If the orientation is portrait, this function returns logical height. If the orientation is landscape, this function returns logical width. <br/> <source lang="lua"> (number) = application:getContentHeight() </source> === Return values === '''Returns''' (number) Logical width or logical height depending on orientation.<br/> {{Application}} 7fzr8mfanhn9lvuqtwtg1aduxqds1sg Application:getContentWidth 0 1024 13760 13614 2019-12-02T22:50:11Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Application|Application]]<br/> === Description === If the orientation is portrait, this function returns logical width. If the orientation is landscape, this function returns logical height. <br/> <source lang="lua"> (number) = application:getContentWidth() </source> === Return values === '''Returns''' (number) Logical width or logical height depending on orientation. {{Application}} 1spooo8efgibcih52vzqvhgwsr1wpy5 Application:getDeviceHeight 0 1003 13761 13613 2019-12-02T22:50:34Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Application|Application]]<br/> === Description === Returns the physical height of the device in pixels. For example, for iPhone 3GS this function returns 480 and for iPhone 4 (with retina display enabled) this function returns 960. <br/> <source lang="lua"> (number) = application:getDeviceHeight() </source> === Return values === '''Returns''' (number) The physical height of the device in pixels {{Application}} dwvuu0bjcy805clr6it1nnu0z4e7nnh Application:getDeviceInfo 0 773 13762 13643 2019-12-02T22:51:08Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Application]]<br/> === Description === Returns information about device. <br/> - For iOS, returns 5 values: "iOS", iOS version, device type, user interface idiom and device model<br/> - For Android, returns 4 values: "Android", Android version, manufacturer and model information<br/> - For Windows returns 1 value: "Windows"<br/> - For Mac OS X returns 1 value: "Mac OS"<br/> - For Win32 returns 1 value: "Win32"<br/> - For HTML5 returns 2 values: "Web", Browser ID string<br/> ==== iOS values ==== 1st value -> "iOS"<br/> 2nd value -> [[UIDevice currentDevice] systemVersion]<br/> 3rd value -> [[UIDevice currentDevice] model]<br/> 4th value -> UI_USER_INTERFACE_IDIOM() (as "iPhone" or "iPad")<br/> 5th value -> hw.machine. <br/> <br/> Here are the possibilities:<br/> iPhone1,1 -> iPhone 1G, M68<br/> iPhone1,2 -> iPhone 3G, N82<br/> iPhone2,1 -> iPhone 3GS, N88<br/> iPhone3,1 -> iPhone 4/AT&T, N89<br/> iPhone3,2 -> iPhone 4/Other Carrier?, ??<br/> iPhone3,3 -> iPhone 4/Verizon, TBD<br/> iPhone4,1 -> (iPhone 4S/GSM), TBD<br/> iPhone4,2 -> (iPhone 4S/CDMA), TBD<br/> iPhone4,3 -> (iPhone 4S/???)<br/> iPhone5,1 -> iPhone Next Gen, TBD<br/> iPhone5,1 -> iPhone Next Gen, TBD<br/> iPhone5,1 -> iPhone Next Gen, TBD<br/> <br/> iPod1,1 -> iPod touch 1G, N45<br/> iPod2,1 -> iPod touch 2G, N72<br/> iPod2,2 -> Unknown, ??<br/> iPod3,1 -> iPod touch 3G, N18<br/> iPod4,1 -> iPod touch 4G, N80<br/> <br/> iPad1,1 -> iPad 1G, WiFi and 3G, K48<br/> iPad2,1 -> iPad 2G, WiFi, K93<br/> iPad2,2 -> iPad 2G, GSM 3G, K94<br/> iPad2,3 -> iPad 2G, CDMA 3G, K95<br/> iPad3,1 -> (iPad 3G, WiFi)<br/> iPad3,2 -> (iPad 3G, GSM)<br/> iPad3,3 -> (iPad 3G, CDMA)<br/> iPad4,1 -> (iPad 4G, WiFi)<br/> iPad4,2 -> (iPad 4G, GSM)<br/> iPad4,3 -> (iPad 4G, CDMA)<br/> <br/> i386, x86_64 -> iPhone Simulator<br/> <br/> ==== Android values ==== 1st value -> "Android"<br/> 2nd value -> android.os.Build.VERSION.SDK_INT<br/> 3rd value -> android.os.Build.MANUFACTURER<br/> 4th value -> android.os.Build.MODEL<br/> <source lang="lua"> (varies) = application:getDeviceInfo() </source> <br/> === Return values === '''Returns''' (varies) Information about device, returned informations varies depending on platform {{Application}} io5ikujpy87if70nqwhoi0x7iekc4vh Application:getDeviceOrientation 0 1085 13763 13618 2019-12-02T22:51:32Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2014.01<br/> '''Class:''' [[Application|Application]]<br/> === Description === Get the device orientation (and not what is that in project properties as done with ''getOrientation'').Check Accelerometer example project for usage. <source lang="lua"> (string) = application:getDeviceOrientation() </source> === Return values === '''Returns''' (string) Values "portrait", "portraitUpsideDown", "landscapeLeft", "landscapeRight" {{Application}} 5muhauy8nmlktfjqcm9zryh8gtjpkk3 Application:getDeviceSafeArea 0 571 13764 13619 2019-12-02T22:51:52Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2017.11.3<br/> '''Class:''' [[Application|Application]]<br/> === Description === Some screens have non rectangular shapes, in which case it is useful to know the bounds of the safe area, that is area that is guaranteed to be visible and user accessible. This functions returns the minimum and maximum coordinates to use, either in physical coordinates or in logical coordinates. <br /> <source lang="lua"> (number), (number), (number), (number) = application:getDeviceSafeArea(logical) </source> === Parameters === '''logical''': (boolean) Returns the margin in logical scale if set to true. '''optional''' <br/> === Return values === '''Returns''' (number) Minimum x<br/> '''Returns''' (number) Minimum y<br/> '''Returns''' (number) Maximum x<br/> '''Returns''' (number) Maximum y<br/> {{Application}} 6ct5a3lhgwdhvzdr2hr21yd9jfya033 Application:getDeviceWidth 0 235 13765 13620 2019-12-02T22:52:14Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Application|Application]]<br/> === Description === Returns the physical width of the device in pixels. For example, for iPhone 3GS this function returns 320 and for iPhone 4 (with retina display enabled) this function returns 640. <br/> <source lang="lua"> (number) = application:getDeviceWidth() </source> === Return values === '''Returns''' (number) The physical width of the device in pixels {{Application}} enqv19s7i3r5uhvldojv5dzvmjd6s9x Application:getFps 0 330 13766 13621 2019-12-02T22:52:32Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.2.2<br/> '''Class:''' [[Application|Application]]<br/> === Description === Returns the frame rate of the application. <br/> <source lang="lua"> (number) = application:getFps() </source> === Return values === '''Returns''' (number) The frame rate of the application. {{Application}} 3jby3nd9i1rtq4uud3z99tylxx8gc94 Application:getKeyboardModifiers 0 2630 13767 13622 2019-12-02T22:52:49Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2019.5<br/> '''Class:''' [[Application|Application]]<br/> === Description === Returns the current keyboard modifiers. <source lang="lua"> (number) = application:getKeyboardModifiers() </source> === Return values === '''Returns''' (number) The current modifiers bitfield. {{Application}} a9a842jxe2enf8bngep59i355nymo70 Application:getLanguage 0 1133 13768 13623 2019-12-02T22:53:07Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Application|Application]]<br/> === Description === Returns the user language in ISO 639-1 format. <source lang="lua"> (string) = application:getLanguage() </source> === Return values === '''Returns''' (string) The user language {{Application}} loumy2kjd4641c9qg5xfbhhzp5hheze Application:getLocale 0 669 13769 13624 2019-12-02T22:53:25Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Application|Application]]<br/> === Description === Returns the device locale. The locale string is a combination of ISO 639-1 and ISO 3166-1. For example, en_US, ja_JP. <source lang="lua"> (string) = application:getLocale() </source> === Return values === '''Returns''' (string) The device locale {{Application}} 8roszyixworbodfl4co1pmab0t4k2dv Application:getLogicalBounds 0 1088 15000 14999 2019-12-10T23:46:02Z Oleg 7 wikitext text/x-wiki '''Available since:''' Gideros 2017.11.3<br/> '''Class:''' [[Application|Application]]<br/> === Description === Returns the minimum and maximum logical space coordinates to cover full screen. <source lang="lua"> minX, minY, maxX, maxY = application:getLogicalBounds() </source> === Return values === '''Returns number''' (minX) Minimum x<br/> '''Returns number''' (minY) Minimum y<br/> '''Returns number''' (maxX) Maximum x<br/> '''Returns number''' (maxY) Maximum y<br/> {{Application}} r7zawbquaw15vwk4zutxz2mczjx75ld Application:getLogicalHeight 0 570 13774 13644 2019-12-02T23:11:22Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Application]]<br/> === Description === Returns the logical height of the application that is specified at the project properties. <source lang="lua"> (number) = application:getLogicalHeight() </source> === Return values === '''Returns''' (number) The logical height of the application {{Application}} 7j6n9ot81pfxgji2gmr85wirn1ksc8e Application:getLogicalScaleX 0 160 13775 13645 2019-12-02T23:11:41Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Application]]<br/> === Description === Returns the scaling of automatic screen scaling on the x-axis. <source lang="lua"> (number) = application:getLogicalScaleX() </source> === Return values === '''Returns''' (number) The scaling of automatic screen scaling on the x-axis. {{Application}} bm68v59seryvntk0ys7nmedjubq7565 Application:getLogicalScaleY 0 157 13779 13646 2019-12-02T23:15:16Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Application]]<br/> === Description === Returns the scaling of automatic screen scaling on the y-axis. <source lang="lua"> (number) = application:getLogicalScaleY() </source> === Return values === '''Returns''' (number) The scaling of automatic screen scaling on the y-axis. {{Application}} 839a3n9k654k3mltffltkbcasudpifr Application:getLogicalTranslateX 0 360 13780 13647 2019-12-02T23:15:35Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Application]]<br/> === Description === Returns the translation of automatic screen scaling on the x-axis. <source lang="lua"> (number) = application:getLogicalTranslateX() </source> === Return values === '''Returns''' (number) The translation of automatic screen scaling on the x-axis. {{Application}} ns9p0wbsm205tljzakqhz5c9y1kjf27 Application:getLogicalTranslateY 0 358 13781 13648 2019-12-02T23:15:54Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Application]]<br/> === Description === Returns the translation of automatic screen scaling on the y-axis. <source lang="lua"> (number) = application:getLogicalTranslateY() </source> === Return values === '''Returns''' (number) The translation of automatic screen scaling on the y-axis. {{Application}} 0hz5vgsnl761dv941lpsvigjht5mq9r Application:getLogicalWidth 0 425 13782 13649 2019-12-02T23:16:17Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Application]]<br/> === Description === Returns the logical width of the application that is specified at the project properties. <source lang="lua"> (number) = application:getLogicalWidth() </source> === Return values === '''Returns''' (number) The logical width of the application {{Application}} on5oz1790k49bckfdobq76lwl1uit95 Application:getOrientation 0 975 13783 13650 2019-12-02T23:16:35Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Application]]<br/> === Description === Returns the orientation of the application. <source lang="lua"> (string) = application:getOrientation() </source> === Return values === '''Returns''' (string) Values "portrait", "portraitUpsideDown", "landscapeLeft", "landscapeRight" {{Application}} q8y0z0yqi612c4nwdlbpep84w03ire5 Application:getScaleMode 0 687 13784 13233 2019-12-02T23:18:49Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.2.2<br/> '''Class:''' [[Application]]<br/> === Description === Returns the automatic scale mode of the application. <source lang="lua"> (string) = application:getScaleMode() </source> === Return values === '''Returns''' (string) The automatic scale mode of the application<br/> {{Application}} btyokbmj6678oxktf2r5j4ddhtdphn3 Application:getScreenDensity 0 540 13785 13234 2019-12-02T23:20:27Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.09.2<br/> '''Class:''' [[Application]]<br/> === Description === Returns the screen density in pixels per inch. If screen density information is not available, returns ''nil''. <source lang="lua"> (number) = application:getScreenDensity() </source> === Return values === '''Returns''' (number) If available returns the screen density in pixels per inch, otherwise returns ''nil''.<br/> {{Application}} 0oucx0fruas9k92u3awtqslcjltcspu Application:getTextureMemoryUsage 0 879 13786 13235 2019-12-02T23:24:05Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.08.3<br/> '''Class:''' [[Application]]<br/> === Description === Returns the texture memory usage (in Kbytes). <source lang="lua"> (number) = application:getTextureMemoryUsage() </source> === Return values === '''Returns''' (number) The texture memory usage (in Kbytes).<br/> {{Application}} rohjwueuol0v2m7sxel2prv1omu0jjc Application:isPlayerMode 0 257 13787 13236 2019-12-02T23:26:47Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2015.03.22<br/> '''Class:''' [[Application]]<br/> === Description === Returns true if app is ran on Gideros player and, false if it is ran as stand alone app. <source lang="lua"> application:isPlayerMode() </source> {{Application}} 9qtstgi8h46qpese6zlusp94rn4tus9 Application:openUrl 0 1018 13788 13237 2019-12-02T23:29:26Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Application]]<br/> === Description === Opens the given URL (Universal Resource Locator) in the appropriate application. URL can be one of the ''http:'', ''https:'', ''tel:'', or ''mailto:'' schemes. The following example opens a web page in the browser: <source lang="lua"> application:openUrl("http://www.giderosmobile.com") </source> If ''mailto:'' scheme is specified, the user's e-mail client will be used to open a composer window containing the options specified in the URL: <source lang="lua"> -- the following URL contains a recipient (user@foo.com), a subject (Test), and a message body (Just a test) application:openUrl("mailto:user@foo.com?subject=Test&body=Just a test") </source> To call a number: <source lang="lua"> application:openUrl("tel:555-123-4567") </source> === Parameters === '''url''': (string) url to open {{Application}} r4uz3gaz8p5zig9axh5jh4bmajh4lrn Application:set 0 2568 13789 13343 2019-12-02T23:32:39Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ '''Available since:''' Gideros 2015.7<br/> '''Class:''' [[Application]]<br/> === Description === Sets the state of the desktop setting provided as string parameter. <source lang="lua"> application:set("windowTitle", "My lovely window title") </source> To get a list of parameters that can be set use: <source lang="lua"> print(application:set("help")) </source> To get help for individual settings use: <source lang="lua"> print(application:set("cursor","help")) </source> === Example === <source lang="lua"> print(application:set("help")) --[[ - windowPosition(x,y) - windowSize(w,h) - minimumSize(w,h) - maximumSize(w,h) - windowColor(r,g,b) - windowTitle(text) - windowModel(type//help) - cursor(type//help) - cursorPosition(x,y) - clipboard(text) - mkdir(path|dirName//help) - documentDirectory(path) - temporaryDirectory(path) ]] application:set("windowPosition", 64, 64) application:set("windowColor", 0, 0, 0) application:set("windowTitle", "My lovely window title") print(application:set("cursor","help")) --[[ - arrow - upArrow - cross - wait - IBeam - sizeVer - sizeHor - sizeBDiag - sizeFDiag - sizeAll - blank - splitV - splitH - pointingHand - forbidden - whatsThis - busy - openHand - closedHand - dragCopy - dragMove - dragLink ]] application:set("cursor", "openHand") </source> {{Application}} d89gvg2kqmvl325mneqbnx5bplrlt2z Application:setBackgroundColor 0 518 13790 13241 2019-12-02T23:34:01Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Application]]<br/> === Description === Sets the background color (or clear color) of the application in hexadecimal format. Default background color is white (0xffffff). <source lang="lua"> application:setBackgroundColor(color) </source> === Parameters === '''color''': (number) background color in hexadecimal format<br/> {{Application}} n0aq5rkwm3fslsunm2u649gfxkn3qvu Application:setFps 0 867 13791 13240 2019-12-02T23:36:50Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.2.2<br/> '''Class:''' [[Application]]<br/> === Description === Sets the frame rate of the application. Accepted values are ''30'' and ''60''. <source lang="lua"> application:setFps(fps) </source> You can also use setFps(-60) or setFps(-30) to maintain an apparent frame rate of 60 or 30 fps by skipping frames if the system notices it is running slow. So for example, it updates the game logic 60 times per second but redraws the screen only 30 times per second. The game is playable but will not be smooth on slow devices (currently available on WinRT). === Parameters === '''fps''': (number) the new frame rate of the application<br/> {{Application}} ld0l0ap2tr494xlya5viywi1isse699 Application:setFullScreen 0 226 13792 13242 2019-12-02T23:38:13Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2015.04.12<br/> '''Class:''' [[Application]]<br/> === Description === Enables full screen mode or windowed mode for desktop app. <source lang="lua"> application:setFullScreen(fullscreen) </source> === Parameters === '''fullscreen''': (bool) true for fullscreen, false for windowed mode<br/> {{Application}} 06q6lbysodux0gkkj9gv68v6ayzt2ns Application:setKeepAwake 0 1058 13793 13243 2019-12-02T23:41:28Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Application]]<br/> === Description === Controls the screen dimming and device sleeping of the device. When the application has no touches as user input for some period, the system puts the device into a sleep state where the screen dims. However some applications have no input and are controlled by accelerometer or gyroscope only. For these kind of applications, the screen should be kept awake by calling this function with parameter ''true''. '''Note''': this function has no effect on desktop. <source lang="lua"> application:setKeepAwake(keepAwake) </source> === Parameters === '''keepAwake''': (boolean) if true, screen is kept awake === Examples === <source lang="lua"> application:setKeepAwake(true) -- disable screen dimming and device sleeping application:setKeepAwake(false) -- enable screen dimming and device sleeping </source> {{Application}} i82ejc0y7d75kl7d0y7isqydzcep7a5 Application:setKeyboardVisibility 0 262 13794 13244 2019-12-02T23:46:52Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2018.6<br/> '''Class:''' [[Application]]<br/> === Description === Show or hide the native on-screen keyboard if available. <source lang="lua"> (boolean) = application:setKeyboardVisibility(visible) </source> === Parameters === '''visible''': (boolean) if the keyboard should be shown === Return values === '''Returns''' (boolean) true if the device support a native on screen keyboard<br/> {{Application}} 9h60f9pbjpdf4k6dw9v26lgy2xw7dfp Application:setLogicalDimensions 0 1095 13795 13245 2019-12-02T23:49:09Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.2.2<br/> '''Class:''' [[Application]]<br/> === Description === Sets the logical dimensions of the application. <source lang="lua"> application:setLogicalDimensions(width,height) </source> === Parameters === '''width''': (number) logical width <br/> '''height''': (number) logical height <br/> {{Application}} 4x8u5euqhjvhzopabaznipz5pr474zp Application:setOrientation 0 1068 13798 13796 2019-12-02T23:54:00Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Application]]<br/> === Description === Sets the orientation of the application. Accepted values are: * Application.PORTRAIT * Application.PORTRAIT_UPSIDE_DOWN * Application.LANDSCAPE_LEFT * Application.LANDSCAPE_RIGHT <source lang="lua"> application:setOrientation(orientation) </source> === Parameters === '''orientation''': (string) <br/> === Examples === <source lang="lua"> application:setOrientation(Application.PORTRAIT) -- the buttons are on the bottom application:setOrientation(Application.PORTRAIT_UPSIDE_DOWN) -- the buttons are at the top application:setOrientation(Application.LANDSCAPE_LEFT) -- the buttons are on the right side application:setOrientation(Application.LANDSCAPE_RIGHT) -- the buttons are on the left side </source> {{Application}} bma7nyo2znjxcx6niq765mkkcdas2pf Application:setScaleMode 0 215 13797 13247 2019-12-02T23:53:38Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.2.2<br/> '''Class:''' [[Application]]<br/> === Description === Sets the automatic scale mode of the application. Accepted values are: * Application.NO_SCALE * Application.CENTER * Application.PIXEL_PERFECT * Application.LETTERBOX * Application.CROP * Application.STRETCH * Application.FIT_WIDTH * Application.FIT_HEIGHT <source lang="lua"> application:setScaleMode(scaleMode) </source> === Parameters === '''scaleMode''': (string) <br/> {{Application}} rrora4y2uod4kucu08814ku9bf3yxaq Application:setWindowSize 0 327 13799 13248 2019-12-02T23:55:23Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2015.04.12<br/> '''Class:''' [[Application]]<br/> === Description === Sets desktop window to a specific size. <source lang="lua"> application:setWindowSize(width,height) </source> === Parameters === '''width''': (number) new width of the window <br/> '''height''': (number) new height of the window <br/> {{Application}} opbtsrq0zn2lf0grxnpuv97kbpeaph5 Application:vibrate 0 1137 13800 13249 2019-12-02T23:56:42Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Application]]<br/> === Description === Vibrates the device. If the device doesn't support vibration, this function has no effect. <source lang="lua"> application:vibrate(ms) </source> === Parameters === '''ms''': (number) time in ms for vibration, if supported by the platform. (Android) '''optional''' <br/> {{Application}} 9ll7hswg30s1b26z47npcu4mv4z0p69 Bitmap 0 110 14943 14587 2019-12-09T22:16:44Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Bitmap --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> The [[Special:MyLanguage/Bitmap|Bitmap]] class is used to display texture related objects in the scene tree. It is possible to create Bitmap object from [[Special:MyLanguage/TextureBase|TextureBase]] or [[Special:MyLanguage/TextureRegion|TextureRegion]] instances.<br /> <br /></translate> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Bitmap.new|Bitmap.new]] ''<translate>creates a new Bitmap object</translate>''<br/><!-- GIDEROSMTD:Bitmap.new(texture) creates a new Bitmap object --> [[Special:MyLanguage/Bitmap:getAnchorPoint|Bitmap:getAnchorPoint]] ''<translate>returns the x and y coordinates of the anchor point</translate>''<br/><!-- GIDEROSMTD:Bitmap:getAnchorPoint() returns the x and y coordinates of the anchor point --> [[Special:MyLanguage/Bitmap:setAnchorPoint|Bitmap:setAnchorPoint]] ''<translate>sets the anchor point</translate>''<br/><!-- GIDEROSMTD:Bitmap:setAnchorPoint(x,y) sets the anchor point --> [[Special:MyLanguage/Bitmap:setTexture|Bitmap:setTexture]] ''<translate>sets the texture</translate>''<br/><!-- GIDEROSMTD:Bitmap:setTexture(texture) sets the texture --> [[Special:MyLanguage/Bitmap:setTextureRegion|Bitmap:setTextureRegion]] ''<translate>sets the texture region</translate>''<br/><!-- GIDEROSMTD:Bitmap:setTextureRegion(textureRegion) sets the texture region --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} m6b8xex8qti84jefr5krmyq40f4zaib Bitmap.new 0 948 15002 14908 2019-12-11T19:03:20Z MoKaLux 19 forgot to add bitmap template to this one wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Bitmap]]<br/> === Description === Creates a new [[Special:MyLanguage/Bitmap|Bitmap]] object. <source lang="lua"> Bitmap.new(texture) </source> === Parameters === '''texture''': (TextureBase or TextureRegion) === Examples === <source lang="lua"> local texture = Texture.new("image.png") local region = TextureRegion.new(texture, 0, 0, 100, 50) local bitmap1 = Bitmap.new(texture) local bitmap2 = Bitmap.new(region) stage:addChild(bitmap1) stage:addChild(bitmap2) </source> {{Bitmap}} syc3eunoq7pmsbeslpy9iqb0k6ojbqt Bitmap:getAnchorPoint 0 738 14909 14880 2019-12-09T02:08:21Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Bitmap]]<br/> === Description === Returns the x and y coordinates of the anchor point. <source lang="lua"> (number), (number) = Bitmap:getAnchorPoint() </source> === Return values === '''Returns''' (number) The x coordinate of the anchor point.<br/> '''Returns''' (number) The y coordinate of the anchor point.<br/> {{Bitmap}} sxi4u3ub59r8ia5a99ccjz9pyjjgusg Bitmap:setAnchorPoint 0 227 15003 14910 2019-12-11T19:05:26Z MoKaLux 19 formatting wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Bitmap]]<br/> === Description === Sets the anchor point of [[Bitmap]] object. Each [[Bitmap]] object has an anchor point that affects the positioning of the texture displayed. By modifying the anchor point, you change the origin of the texture. For example, setting the anchor point to (0.5, 0.5) moves the center of the texture to the origin. If you set the anchor point to (1, 1) instead, the bottom-right corner of the texture will be the origin. The default value of anchor point is (0, 0) which means top-left of the texture is the origin by default. <source lang="lua"> Bitmap:setAnchorPoint(x,y) </source> === Parameters === '''x''': (number) The x coordinate of anchor point. Usually between [0, 1].<br/> '''y''': (number) The y coordinate of anchor point. Usually between [0, 1].<br/> {{Bitmap}} 40bsyq079asv6eveaautev4p7674dlu Bitmap:setTexture 0 133 14911 14720 2019-12-09T02:08:55Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.08.2<br/> '''Class:''' [[Bitmap]]<br/> === Description === Sets the texture. <source lang="lua"> Bitmap:setTexture(texture) </source> === Parameters === '''texture''': (TextureBase)<br/> {{Bitmap}} dtb426lropszpg96yaa14vfbni3s9v5 Bitmap:setTextureRegion 0 713 14912 14721 2019-12-09T02:09:11Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.08.2<br/> '''Class:''' [[Bitmap]]<br/> === Description === Sets the texture region. <source lang="lua"> Bitmap:setTextureRegion(textureRegion) </source> === Parameters === '''textureRegion''': (TextureRegion)<br/> {{Bitmap}} 3lkzx5eytfap05tlcnh56wp9ox6vj0e Core 0 92 14944 14588 2019-12-09T22:18:19Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Core --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2012.2<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> === <translate>Description</translate> === <translate>Gideros Core functions</translate> === <translate>Examples</translate> === <source lang="lua"> MySprite = Core.class(Sprite) --my custom sprite class function MySprite:init() end </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Core.asyncCall|Core.asyncCall]] ''<translate>Launch function on separate thread as background task</translate>''<br/><!-- GIDEROSMTD:Core.asyncCall(task,parameters) Launch function on separate thread as background task --> [[Special:MyLanguage/Core.class|Core.class]] ''<translate>Creates and returns new Gideros class</translate>''<br/><!-- GIDEROSMTD:Core.class(base) Creates and returns new Gideros class --> [[Special:MyLanguage/Core.frameStatistics|Core.frameStatistics]] ''<translate>Return table with data about frame</translate>''<br/><!-- GIDEROSMTD:Core.frameStatistics() Return table with data about frame --> [[Special:MyLanguage/Core.profilerReport|Core.profilerReport]] ''<translate>Output profiling results</translate>''<br/><!-- GIDEROSMTD:Core.profilerReport() Output profiling results --> [[Special:MyLanguage/Core.profilerReset|Core.profilerReset]] ''<translate>Clear recorded profiling data</translate>''<br/><!-- GIDEROSMTD:Core.profilerReset() Clear recorded profiling data --> [[Special:MyLanguage/Core.profilerStart|Core.profilerStart]] ''<translate>Start profiling lua code</translate>''<br/><!-- GIDEROSMTD:Core.profilerStart() Start profiling lua code --> [[Special:MyLanguage/Core.profilerStop|Core.profilerStop]] ''<translate>Stop profiling</translate>''<br/><!-- GIDEROSMTD:Core.profilerStop() Stop profiling --> [[Special:MyLanguage/Core.random|Core.random]] ''<translate>Generate a random number</translate>''<br/><!-- GIDEROSMTD:Core.random(generator,bound1,bound2) Generate a random number --> [[Special:MyLanguage/Core.randomSeed|Core.randomSeed]] ''<translate>Set the random generator seed</translate>''<br/><!-- GIDEROSMTD:Core.randomSeed(generator,seed) Set the random generator seed --> [[Special:MyLanguage/Core.yield|Core.yield]] ''<translate>Yield function running as background task</translate>''<br/><!-- GIDEROSMTD:Core.yield(state) Yield function running as background task --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} 4n7lej7eca2d1spmm5it5cgv7mqe4d3 Core.asyncCall 0 774 13816 13661 2019-12-03T00:09:56Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2016.06<br/> '''Class:''' [[Core]]<br/> === Description === Launch function on separate thread as background task. Background threads are only executed when main thread is not running. <source lang="lua"> Core.asyncCall(task,parameters) </source> === Parameters === '''task''': (function) function to run in background <br/> '''parameters''': (multiple) multiple parameters to pass to function '''optional'''<br/> {{Core}} pf12nqkcyuie0sejznw2f87h4uv65m9 Core.class 0 211 13817 13662 2019-12-03T00:10:14Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.2<br/> '''Class:''' [[Core]]<br/> === Description === Creates and returns new Gideros class. <source lang="lua"> Core.class(base) </source> === Parameters === '''base''': (GiderosClass) Gideros class from which to inherit '''optional'''<br/> {{Core}} nh27g37h7raiyx56bvsusmuixpi5kp1 Core.frameStatistics 0 926 13818 13663 2019-12-03T00:10:44Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2016.08<br/> '''Class:''' [[Core]]<br/> === Description === Returns table with fields: *meanFrameTime - the average duration of a frame (useful to get current fps) *meanFreeTime - the average free cpu time in a frame *frameCounter - frame's number <source lang="lua"> (table) = Core.frameStatistics() </source> === Return values === '''Returns''' (table) table with data<br/> {{Core}} 4fj5e3sg4eqgz3c3gdcji66rhlju1rx Core.profilerReport 0 449 13820 13819 2019-12-03T00:11:21Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2017.8<br/> '''Class:''' [[Core]]<br/> === Description === Returns an associative array of tables describing CPU usage of lua functions. Each table in the array is indexed by an unique function id and has the following content: *name - Name of the function *time - Total time spent in the function (seconds) *count - Number of times this function was called *callers - A table containing the same information has above for each function which called this one <source lang="lua"> (table) = Core.profilerReport() </source> === Return values === '''Returns''' (table) table with profiling data<br/> {{Core}} ask8flrc5o658i708hsrwza8odimpqr Core.profilerReset 0 480 13821 13665 2019-12-03T00:11:41Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2017.8<br/> '''Class:''' [[Core]]<br/> === Description === Drop currently recorded data and reset profiler for a clean subsequent start. <source lang="lua"> Core.profilerReset() </source> {{Core}} qodb2my4oub2p46nsdlb1i1z305f3ts Core.profilerStart 0 413 13822 13666 2019-12-03T00:11:59Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2017.8<br/> '''Class:''' [[Core]]<br/> === Description === Start recording of time spent in each lua function. <source lang="lua"> Core.profilerStart() </source> {{Core}} k36izg8pu3b2ive8ttej9tym476kky6 Core.profilerStop 0 275 13823 13667 2019-12-03T00:12:19Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2017.8<br/> '''Class:''' [[Core]]<br/> === Description === Stop collecting profiling data. <source lang="lua"> Core.profilerStop() </source> {{Core}} 47ev1i7e8x0eibjcainx9r752iw41gd Core.random 0 998 13824 13668 2019-12-03T00:12:42Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2017.9<br/> '''Class:''' [[Core]]<br/> === Description === Generate and return a pseudo random number. The random number sequence is guaranteed to be consistent across devices for a given seed. If bounds aren't specified, the function will return a floating point number between 0 and 1. If one bound is specified, the function will return an integer number between 1 and that bound (inclusive). If both bounds are specified, the function will return an integer between bound1 and bound2. bound2 must be greater than bound1. <source lang="lua"> () = Core.random(generator,bound1,bound2) </source> === Parameters === '''generator''': (number) PRNG algorithm to use, use 0 for default engine (MT19937) '''optional'''<br/> '''bound1''': (number) First bound of the range returned number must be in '''optional'''<br/> '''bound2''': (number) Second bound of the range returned number must be in '''optional'''<br/> === Return values === '''Returns''' () random number<br/> {{Core}} kafjfw7mqp7x4vy7bfuxpp21y1r8z2a Core.randomSeed 0 176 13825 13669 2019-12-03T00:13:11Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2017.9<br/> '''Class:''' [[Core]]<br/> === Description === Set the current seed of the specified random number generator. <source lang="lua"> () = Core.randomSeed(generator,seed) </source> === Parameters === '''generator''': (number) PRNG algorithm to use, use 0 for default engine (MT19937) '''optional'''<br/> '''seed''': (number) Seed for that generator '''optional'''<br/> === Return values === '''Returns''' () A seed usable for later resuming the RNG<br/> {{Core}} 7t1et9p7lhmpgbt6lt2f4ur2pd8s4ow Core.yield 0 608 13826 13670 2019-12-03T00:13:34Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2016.06<br/> '''Class:''' [[Core]]<br/> === Description === Yield function running as background task. Core.yield([number of seconds to wait])<br/> Core.yield(true) -- yield for a single frame and disable auto yield<br/> Core.yield(false) -- don't yield now, but reenable autoyield<br/> <source lang="lua"> Core.yield(state) </source> === Parameters === '''state''': (number or boolean) number of seconds to yield or boolean to enable/disable auto yield<br/> {{Core}} jv3wr86m2aoqkonrvdhfr99jxqz39mf Cryptography 0 33 14946 14945 2019-12-09T22:19:27Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Cryptography --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2016.04<br/> === <translate>Description</translate> === <translate>Cryptographic primitives.</translate> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Cryptography.aesDecrypt|Cryptography.aesDecrypt]] ''<translate>Decrypt an AES string</translate>''<br/><!-- GIDEROSMTD:Cryptography.aesDecrypt(ciphertext,key,iv,paddingType) Decrypt an AES string --> [[Special:MyLanguage/Cryptography.aesEncrypt|Cryptography.aesEncrypt]] ''<translate>Encrypt a string with AES</translate>''<br/><!-- GIDEROSMTD:Cryptography.aesEncrypt(plaintext,key,iv,paddingType) Encrypt a string with AES --> [[Special:MyLanguage/Cryptography.md5|Cryptography.md5]] ''<translate>Compute the MD5 hash of the input string</translate>''<br/><!-- GIDEROSMTD:Cryptography.md5(input) Compute the MD5 hash of the input string --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} 3typtld7m1g4twexwcb7io4w1r2l7ue Cryptography.aesDecrypt 0 142 13829 13672 2019-12-03T00:17:03Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2016.04<br/> '''Class:''' [[Cryptography]]<br/> === Description === Decrypt an AES cipher text, ECB or CBC. <source lang="lua"> (string) = Cryptography.aesDecrypt(ciphertext,key,iv,paddingType) </source> === Parameters === '''ciphertext''': (string) AES encrypted message <br/> '''key''': (string) encryption key as a 16,24 or 32 byte string <br/> '''iv''': (string) a 16 byte IV to be used for CBC mode. If not provided ECB mode is used. '''optional'''<br/> '''paddingType''': (number) Type of padding to be used. Currently defined values are:</br> <ul> <li>0: 0 padding '''optional'''</li> <li>1: PKCS7 padding '''optional'''</li> </ul> === Return values === '''Returns''' (string) deciphered message<br/> {{Cryptography}} 2u7myu6eciabom6qyicsb8kq6lavr8p Cryptography.aesEncrypt 0 757 13830 13673 2019-12-03T00:17:20Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2016.04<br/> '''Class:''' [[Cryptography]]<br/> === Description === Encrypt a string with AES cipher, either in ECB mode or CBC mode. <source lang="lua"> (string) = Cryptography.aesEncrypt(plaintext,key,iv,paddingType) </source> === Parameters === '''plaintext''': (string) The message to be encrypted <br/> '''key''': (string) encryption key as a 16,24 or 32 byte string <br/> '''iv''': (string) a 16 byte IV to be used for CBC mode. If not provided ECB mode is used. '''optional'''<br/> '''paddingType''': (number) Type of padding to be used. Currently defined values are:</br> <ul> <li>0: 0 padding '''optional'''</li> <li>1: PKCS7 padding '''optional'''</li> </ul> === Return values === '''Returns''' (string) ciphered message<br/> {{Cryptography}} 4kga096857cnu9zswx0x3wybhtqoyyy Cryptography.md5 0 816 13831 13674 2019-12-03T00:17:43Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2016.04<br/> '''Class:''' [[Cryptography]]<br/> === Description === Compute the MD5 hash of the input string. <source lang="lua"> (string) = Cryptography.md5(input) </source> === Parameters === '''input''': (string) String whose content is to be hashed <br/> === Return values === '''Returns''' (string) MD5 hash (a 16 byte string)<br/> {{Cryptography}} s5fgbqo9ttrailgx2ipa91ilcrmf0js Event 0 78 14947 14590 2019-12-09T22:22:06Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Event --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> === <translate>Description</translate> === The objects of [[Special:MyLanguage/Event|Event]] class contains information about an event that has occurred. [[Special:MyLanguage/Event|Event]] objects are passed to event listeners when an event occurs. Usually event objects contains specific additional information about the event that has occured. For example, when an [[Special:MyLanguage/Event.MOUSE_DOWN|Event.MOUSE_DOWN]] event occurs, ''x'' and ''y'' fields contain the coordinates. Users can create their own events and dispatch through the event mechanism. === <translate>Examples</translate> === '''Mouse down event example''' <source lang="lua"> function onMouseDown(event) print(event.x, event.y) end mysprite:addEventListener(Event.MOUSE_DOWN, onMouseDown) </source> '''User created event''' <source lang="lua"> local event = Event.new("myevent") event.data1 = "12345" event.data2 = "abcde" mydispatcher:dispatchEvent(event) </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Event.new|Event.new]] ''<translate>creates a new Event object</translate>''<br/><!-- GIDEROSMTD:Event.new(type) creates a new Event object --> [[Special:MyLanguage/Event:getTarget|Event:getTarget]] ''<translate>returns the element on which the event listener was registered</translate>''<br/><!-- GIDEROSMTD:Event:getTarget() returns the element on which the event listener was registered --> [[Special:MyLanguage/Event:getType|Event:getType]] ''<translate>returns the type of Event</translate>''<br/><!-- GIDEROSMTD:Event:getType() returns the type of Event --> [[Special:MyLanguage/Event:stopPropagation|Event:stopPropagation]] ''<translate>stops the propagation of the current event in the scene tree hierarchy</translate>''<br/><!-- GIDEROSMTD:Event:stopPropagation() stops the propagation of the current event in the scene tree hierarchy --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} ai0exi0j1tl9nbg5iappgt71noelixl Event.ADDED TO STAGE 0 177 14353 9563 2019-12-04T00:02:21Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' addedToStage<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched when object is added to the stage hierarchy</translate> {{Sprite}} ile9yot5wvcp0z7uw3lfh3bw878j1es Event.AD ACTION BEGIN 0 946 14504 10409 2019-12-04T04:23:46Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Value</translate>:''' adActionBegin<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Descriptio</translate>n === <translate>Some action like user clicked begin on the ad</translate> {{Ads}} c5fcpzz6vhk8wyloq33ztoqcldor5ha Event.AD ACTION END 0 307 14505 9731 2019-12-04T04:23:58Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Value</translate>:''' adActionEnd<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Descriptio</translate>n === <translate>Some action as, for example, video was watched, ended on the ad</translate> {{Ads}} 5u6uxlfbg74dhrldfjgys52z6gzi2fk Event.AD DISMISSED 0 945 14506 10406 2019-12-04T04:24:09Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Value</translate>:''' adDismissed<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Descriptio</translate>n === <translate>Ad was dismissed/removed from the screen</translate> {{Ads}} o0asvxsy14lz2jfrk8jfqcv6rvrbbj9 Event.AD ERROR 0 473 14507 9952 2019-12-04T04:24:20Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Value</translate>:''' adError<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Descriptio</translate>n === <translate>There was an internal developer error, most probably something was not set up right</translate> === <translate>Parameters</translate> === '''error''': (string) <translate>string describing error</translate><br/> {{Ads}} ky5rf63s47rawpr54ryahjierumum73 Event.AD FAILED 0 961 14508 10789 2019-12-04T04:24:31Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Value</translate>:''' adFailed<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Descriptio</translate>n === <translate>Failed to retrieve ad</translate> === <translate>Parameters</translate> === '''error''': (string) <translate>string describing what failed</translate><br/> {{Ads}} 8ucdzuz3jvqa17draek3i1yxrgytonl Event.AD RECEIVED 0 1091 14509 10537 2019-12-04T04:24:52Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Value</translate>:''' adReceived<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Descriptio</translate>n === <translate>Ad was received</translate> {{Ads}} mp7jfhwcu29al2hh5gbxpwd969r1mlb Event.AD REWARDED 0 2758 14510 2019-12-04T04:30:31Z MoKaLux 19 Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros XX2018.9<br/> '''<translate>Value</translate>:''' adRewarded<br/> '''<translate>Defined by</trans..." wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros XX2018.9<br/> '''<translate>Value</translate>:''' adRewarded<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Descriptio</translate>n === <translate>Ad was rewarded</translate> {{Ads}} rbusu74m0whsqw87nns8lujhoywdqcr Event.ANIMATION COMPLETE 0 2597 12990 2018-12-03T15:10:28Z Hgy29 2 Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.12<br/> '''<translate>Value</translate>:''' animationComplete<br/> '''<translate>Defined by<..." wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.12<br/> '''<translate>Value</translate>:''' animationComplete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Spine|SpineSprite]]<br/> === <translate>Descriptio</translate>n === <translate>Animation completed</translate> === <translate>Parameters</translate> === '''track''': (integer) <translate>animation track</translate><br/> '''animation''': (string) <translate>animation name</translate><br/> bjm8l2oaldadfq49enahza60lhr7pe0 Event.ANIMATION END 0 2596 12989 2018-12-03T15:09:54Z Hgy29 2 Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.12<br/> '''<translate>Value</translate>:''' animationEnd<br/> '''<translate>Defined by</tran..." wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.12<br/> '''<translate>Value</translate>:''' animationEnd<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Spine|SpineSprite]]<br/> === <translate>Descriptio</translate>n === <translate>Animation ended</translate> === <translate>Parameters</translate> === '''track''': (integer) <translate>animation track</translate><br/> '''animation''': (string) <translate>animation name</translate><br/> oqfpgjgg6ua4gta9hqvawhsrf7bv8yy Event.ANIMATION START 0 2595 12988 2018-12-03T15:08:51Z Hgy29 2 Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.12<br/> '''<translate>Value</translate>:''' animationStart<br/> '''<translate>Defined by</tr..." wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.12<br/> '''<translate>Value</translate>:''' animationStart<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Spine|SpineSprite]]<br/> === <translate>Descriptio</translate>n === <translate>Animation started</translate> === <translate>Parameters</translate> === '''track''': (integer) <translate>animation track</translate><br/> '''animation''': (string) <translate>animation name</translate><br/> opowxx92jx3jz833kgd3dfv5kgzfoy5 Event.APPLICATION BACKGROUND 0 447 13846 13776 2019-12-03T00:39:33Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.09<br/> '''Value:''' applicationBackground<br/> '''Defined by:''' [[EventDispatcher|EventDispatcher]]<br/> === Description === This event is dispatched when application gets sent to background. Sent to background also means application is suspended, thus [[Event.APPLICATION_SUSPEND|Event.APPLICATION_SUSPEND]] is dispatched first. {{Application}} {{EventDispatcher}} fzcz62pzox5da23m4evch8fgzcnsq5j Event.APPLICATION EXIT 0 989 13857 13777 2019-12-03T00:52:41Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Value:''' applicationExit<br/> '''Defined by:''' [[EventDispatcher|EventDispatcher]]<br/> === Description === This event is dispatched when application is closed {{Application}} {{EventDispatcher}} j7t11wpvs2do97miguotgkrz7uph27p Event.APPLICATION FOREGROUND 0 766 13858 13778 2019-12-03T00:53:15Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2012.09<br/> '''Value:''' applicationForeground<br/> '''Defined by:''' [[EventDispatcher]]<br/> === Description === This event is dispatched when application gets sent back to foreground. {{Application}} {{EventDispatcher}} 977wok58pmaphsqzitd4mzi6s51mj5x Event.APPLICATION RESIZE 0 470 14982 13859 2019-12-09T23:44:39Z MoKaLux 19 added oleg's example wikitext text/x-wiki '''Available since:''' Gideros 2015.03.22<br/> '''Value:''' applicationResize<br/> '''Defined by:''' [[EventDispatcher]]<br/> === Description === This event is dispatched when app window has changed its size on Desktops. === Examples === <source lang="lua"> stage:addEventListener(Event.APPLICATION_RESIZE, function() print("--- RESIZE ---") end) </source> {{Application}} {{EventDispatcher}} 77o7gb48d5pa67m0hf24jwbxvc4d3kj Event.APPLICATION RESUME 0 931 13860 13802 2019-12-03T00:54:06Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Value:''' applicationResume<br/> '''Defined by:''' [[EventDispatcher]]<br/> === Description === This event is dispatched when application is resumed (become active) {{Application}} {{EventDispatcher}} 2g3exc1tmm2aqn1h8m011aufuku13tt Event.APPLICATION START 0 441 13861 13803 2019-12-03T00:54:33Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Value:''' applicationStart<br/> '''Defined by:''' [[EventDispatcher]]<br/> === Description === This event is dispatched when application is started. {{Application}} {{EventDispatcher}} dojkqp9ozyu5q57ndm8jkxkullutnve Event.APPLICATION SUSPEND 0 348 13862 13804 2019-12-03T00:54:53Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Value:''' applicationSuspend<br/> '''Defined by:''' [[EventDispatcher]]<br/> === Description === This event is dispatched when application is suspended (becomes inactive). It does not always mean that application was sent to background, for example, this event is dispatched, when low battery notification is displayed. {{Application}} {{EventDispatcher}} o6pbnjcpz5qsy0zb67g78epi7cibb97 Event.BANNER ACTION BEGIN 0 338 9774 8540 2018-09-03T08:57:37Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Value</translate>:''' bannerActionBegin<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/iad.Banner|iad.Banner]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched when the user clicks on an ad. At this time, the user will either be taken out of your application to view the app store (in this case ''event.willLeaveApplication'' field will be true), or they will be presented with a fullscreen advertisement to interact with, and ''event.willLeaveApplication'' will be false.</translate> === <translate>Parameters</translate> === '''willLeaveApplication''': (bool) <translate>true if user will leave the app, false if user will not leave the app</translate><br/> lsk6kgyxs1mz37k18ujxjbzyskgjk2i Event.BANNER ACTION FINISHED 0 942 10404 8047 2018-09-03T08:59:05Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Value</translate>:''' bannerActionFinished<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/iad.Banner|iad.Banner]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched when the user gets back to app after interaction with the ad.</translate> p32fa8e68pkqqpvqoe7hhv3mvpg9a9r Event.BANNER AD FAILED 0 794 10304 7936 2018-09-03T08:58:42Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Value</translate>:''' bannerAdFailed<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/iad.Banner|iad.Banner]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched when the loading of ad has failed.</translate> === <translate>Parameters</translate> === '''errorCode''': (number) <translate>code of the error</translate><br/> '''errorDescription''': (string) <translate>description of the error</translate><br/> 5fcra123je01kqu1kcjzgia4sy53jcw Event.BANNER AD LOADED 0 972 10425 8060 2018-09-03T08:59:09Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Value</translate>:''' bannerAdLoaded<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/iad.Banner|iad.Banner]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched when an ad becomes available, and will be displayed on the screen</translate> egh1mq37eenwohnk3m4qja392mmf2iz Event.BEGIN CONTACT 0 729 10640 8650 2018-09-03T08:59:44Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' beginContact<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2.World|b2.World]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched when contact between box2d bodies begin.</translate> === <translate>Parameters</translate> === '''contact''': (b2.Contact) <translate>Contains instance of [[Special:MyLanguage/b2.Contact|b2.Contact]] holding information about this collision</translate><br/> '''fixtureA''': (b2.Fixture) <translate>Contains instance of [[Special:MyLanguage/b2.Fixture|b2.Fixture]] of first colliding body</translate><br/> '''fixtureB''': (b2.Fixture) <translate>Contains instance of [[Special:MyLanguage/b2.Fixture|b2.Fixture]] of second colliding body</translate><br/> 12jyqgwczf75ob85qaw4gs2r26e27yp Event.BEGIN CONTACT PARTICLE 0 148 9527 7177 2018-09-03T08:57:10Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' beginContactParticle<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2.World|b2.World]]<br/> === <translate>Descriptio</translate>n === <translate>Fires when a collision begins between particles within a ParticleSystem</translate> === <translate>Parameters</translate> === '''fixture''': (b2.Fixture) <translate>The fixture which is colliding</translate><br/> '''index''': (number) <translate>The index number of the particle colliding</translate><br/> '''system''': (ParticleSystem) <translate>The ParticleSystem involved in the collision</translate><br/> o6yzuxwf1kpqpe2cp3j6oro702qm06z Event.CHECK BILLING SUPPORTED COMPLETE 0 1060 10527 8750 2018-09-03T08:59:32Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' checkBillingSupportedComplete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/GoogleBilling|GoogleBilling]]<br/> === <translate>Descriptio</translate>n === <translate>Dispatched when [[Special:MyLanguage/GoogleBilling:checkBillingSupported|GoogleBilling:checkBillingSupported]] function completes with these response codes: [[Special:MyLanguage/GoogleBilling.OK|GoogleBilling.OK]] indicates that purchases can be made [[Special:MyLanguage/GoogleBilling.SERVICE_UNAVAILABLE|GoogleBilling.SERVICE_UNAVAILABLE]] indicates that the network connection is down and [[Special:MyLanguage/GoogleBilling.BILLING_UNAVAILABLE|GoogleBilling.BILLING_UNAVAILABLE]] indicates that in-app billing is not available because the API version that you specified is not recognized by the Google Play application or the user is ineligible for in-app billing (for example, the user resides in a country that prohibits in-app purchases).</translate> === <translate>Parameters</translate> === '''responseCode''': (string) <translate>response code</translate><br/> '''productType''': (string) <translate>type of product available or nil if any product type can be used</translate><br/> o6odjxos0j3tkoxa24unjxxx0ssblev Event.COMPLETE 0 1152 10612 8748 2018-09-03T08:59:41Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Value</translate>:''' complete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/AlertDialog|AlertDialog]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched when user presses any button on AlertDialog or the dialog is dismissed by any other reason.</translate> === <translate>Parameters</translate> === '''buttonIndex''': (number) <translate>the index of the button pressed. It is nil when cancel button is pressed, 1 when 1st button is pressed and 2 when 2nd button is pressed.</translate><br/> '''buttonText''': (string) <translate>the text of the button pressed</translate><br/> __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.2.1<br/> '''<translate>Value</translate>:''' complete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/MovieClip|MovieClip]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched when a [[Special:MyLanguage/MovieClip|MovieClip]] object finishes playing (by reaching its final frame or a frame with stop action).</translate> __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' complete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/SoundChannel|SoundChannel]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched when the sound channel has finished playing.</translate> __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Value</translate>:''' complete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/TextInputDialog|TextInputDialog]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched when user presses any button on TextInputDialog or the dialog is dismissed by any other reason.</translate> === <translate>Parameters</translate> === '''text''': (string) <translate>the text entered into text input field</translate><br/> '''buttonIndex''': (number) <translate>the index of the button pressed. It is nil when cancel button is pressed, 1 when 1st button is pressed and 2 when 2nd button is pressed.</translate><br/> '''buttonText''': (string) <translate>the text of the button pressed</translate><br/> __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' complete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/UrlLoader|UrlLoader]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched when [[Special:MyLanguage/UrlLoader|UrlLoader]] has reached the host and loading is complete.</translate> === <translate>Parameters</translate> === '''data''': (string) <translate>The downloaded data.</translate><br/> '''httpStatusCode''': (number) <translate>HTTP Response Code from server</translate><br/> '''headers''': (table) <translate>HTTP response headers</translate><br/> 1bu6cfla0a2vnoryw4p8e6gog6mo2z3 Event.CONFIRM NOTIFICATION COMPLETE 0 482 9954 8577 2018-09-03T08:57:55Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' confirmNotificationComplete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/GoogleBilling|GoogleBilling]]<br/> === <translate>Descriptio</translate>n === <translate>Dispatched when [[Special:MyLanguage/GoogleBilling:confirmNotification|GoogleBilling:confirmNotification]] function completes with these response codes: [[Special:MyLanguage/GoogleBilling.OK|GoogleBilling.OK]] indicates that the request was sent to the server successfully. [[Special:MyLanguage/GoogleBilling.ERROR|GoogleBilling.ERROR]] indicates an unexpected server error. For example, this error is triggered if you try to purchase an item from yourself, which is not allowed by Google Wallet. [[Special:MyLanguage/GoogleBilling.DEVELOPER_ERROR|GoogleBilling.DEVELOPER_ERROR]] indicates that an application is trying to make an in-app billing request but the application has not declared the com.android.vending.BILLING permission in its manifest. Can also indicate that an application is not properly signed, or that you sent a malformed request, such as a request with missing Bundle keys or a request that uses an unrecognized request type.</translate> === <translate>Parameters</translate> === '''responseCode''': (string) <translate>response code</translate><br/> '''notificationId''': (string) <translate>id of notification that was confirmed</translate><br/> rr8d28b8b0q7a8cdaxof5s90thtqazt Event.CONNECTED 0 721 14546 13496 2019-12-04T08:18:44Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' connected<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Controller|Controller]]<br/> === <translate>Descriptio</translate>n === <translate>Event when controller is connected</translate> === <translate>Parameters</translate> === '''playerId''': (number) <translate>id of controller/player</translate><br/> '''vendorId''': (number) <translate>id of controllers vendor/manufacturer</translate><br/> '''productId''': (number) <translate>id of vendors product</translate><br/> {{Controller}} sy89e7nphzeijzf2kxb93wark7332rz Event.CONNECTED TO ROOM 0 1150 14646 9996 2019-12-06T12:27:48Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' conntectedToRoom<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate></translate> === <translate>Parameters</translate> === '''roomId''': (string) <translate>Room identifier</translate><br/> {{Gaming}} epkqflmosa25b7fvysl44b9wn9yl414 Event.DATA AVAILABLE 0 521 10010 7649 2018-09-03T08:58:02Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' dataAvailable<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Microphone|Microphone]]<br/> === <translate>Descriptio</translate>n === <translate>Dispatched as audio samples become available.</translate> === <translate>Parameters</translate> === '''peakAmplitude''': (number) <translate>The audio channel's peak amplitute.</translate><br/> '''averageAmplitude''': (number) <translate>The audio channel's average RMS amplitute.</translate><br/> fe5w1mhqljt5i1g5fpdv8rys5thux2n Event.DATA RECEIVED 0 373 14647 9800 2019-12-06T12:28:01Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' dataReceived<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Data has been received from a peer</translate> === <translate>Parameters</translate> === '''senderId''': (string) <translate>Peer that sent this data</translate><br/> '''data''': (string) <translate>Payload</translate><br/> {{Gaming}} bi28c9no21ha5gtq3dwvjn94qtbul2t Event.DIALOG CANCEL 0 557 10047 7692 2018-09-03T08:58:05Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' dialogCancel<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Facebook|Facebook]]<br/> === <translate>Descriptio</translate>n === <translate>Dispatched when a Facebook dialog is cancelled.</translate> 5hvbpmin87oqw9y8wdgp6hu3o6cb15v Event.DIALOG COMPLETE 0 824 10697 8342 2018-09-03T08:59:49Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' dialogComplete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Facebook|Facebook]]<br/> === <translate>Descriptio</translate>n === <translate>Dispatched when a Facebook dialog has finished.</translate> prdhe6xpf5k2j1da44a64k9jnwxy90r Event.DIALOG ERROR 0 550 10051 7693 2018-09-03T08:58:06Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' dialogError<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Facebook|Facebook]]<br/> === <translate>Descriptio</translate>n === <translate>Dispatched when a Facebook dialog has failed.</translate> === <translate>Parameters</translate> === '''errorCode''': (number) <translate>code of occurred error</translate><br/> '''errorDescription''': (string) <translate>Description of the error</translate><br/> ivs5qjp8djkhba2ymz3osi465y31qly Event.DISCONNECTED 0 818 14547 13497 2019-12-04T08:19:05Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' disconnected<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Controller|Controller]]<br/> === <translate>Descriptio</translate>n === <translate>Event when controller is disconnected</translate> === <translate>Parameters</translate> === '''playerId''': (number) <translate>id of controller/player</translate><br/> '''vendorId''': (number) <translate>id of controllers vendor/manufacturer</translate><br/> '''productId''': (number) <translate>id of vendors product</translate><br/> {{Controller}} qlsmev1aql6tnyfpa4invubqcfvn8mj Event.DISCONNECTED FROM ROOM 0 999 14648 10803 2019-12-06T12:28:14Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' disconntectedFromRoom<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate></translate> === <translate>Parameters</translate> === '''roomId''': (string) <translate>Room identifier</translate><br/> {{Gaming}} 9wotfc6m5n31qp4k69bauwln8ryqnra Event.END CONTACT 0 692 10240 8644 2018-09-03T08:58:26Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' endContact<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2.World|b2.World]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched when collision is ended and objects have been separated.</translate> === <translate>Parameters</translate> === '''contact''': (b2.Contact) <translate>Contains instance of [[Special:MyLanguage/b2.Contact|b2.Contact]] holding information about this collision</translate><br/> '''fixtureA''': (b2.Fixture) <translate>Contains instance of [[Special:MyLanguage/b2.Fixture|b2.Fixture]] of first colliding body</translate><br/> '''fixtureB''': (b2.Fixture) <translate>Contains instance of [[Special:MyLanguage/b2.Fixture|b2.Fixture]] of second colliding body</translate><br/> 4l90z3vj6aibpmrrj1ks8uod413074a Event.ENTER FRAME 0 204 14354 9603 2019-12-04T00:02:48Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' enterFrame<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Descriptio</translate>n === <translate>The Gideros runtime dispatches the built-in [[Special:MyLanguage/Event.ENTER_FRAME|Event.ENTER_FRAME]] event to [[Special:MyLanguage/Sprite|Sprite]] instances before rendering the screen. Visual changes made by any [[Special:MyLanguage/Event.ENTER_FRAME|Event.ENTER_FRAME]] listener function will be visible at next frame.</translate> === <translate>Parameters</translate> === '''deltaTime''': (number) <translate>time passed from previous frame</translate><br/> '''time''': (number) <translate>time passed from app start</translate><br/> '''frameCount''': (number) <translate>frame count from app start</translate><br/> {{Sprite}} mc14ztz2sa11xnwnitxnz5gr809t2cg Event.ERROR 0 829 13922 10698 2019-12-03T20:02:19Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' error<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Geolocation|Geolocation]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched, when there is an error and [[Special:MyLanguage/Geolocation|Geolocation]] can not be used currently</translate> __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' error<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/UrlLoader|UrlLoader]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched when [[Special:MyLanguage/UrlLoader|UrlLoader]] can't reach the provided host.</translate> {{Geolocation}} 5n9be8a0pzyuw8w4spyd0vv2di3da5i Event.GAME STARTED 0 589 14649 10106 2019-12-06T12:28:27Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' gameStarted<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Game has begun</translate> {{Gaming}} 9mhlwku1myrs75w7in0ccrz7nx1jccg Event.HEADING UPDATE 0 868 13923 13500 2019-12-03T20:02:38Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' headingUpdate<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Geolocation|Geolocation]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched on each user heading direction update</translate> === <translate>Parameters</translate> === '''magneticHeading''': (number) <translate>The value in this property represents the heading relative to the magnetic North Pole, which is different from the geographic North Pole. The value 0 means the device is pointed toward magnetic north, 90 means it is pointed east, 180 means it is pointed south, and so on.</translate><br/> '''trueHeading''': (number) <translate>The value in this property represents the heading relative to the geographic North Pole. The value 0 means the device is pointed toward true north, 90 means it is pointed due east, 180 means it is pointed due south, and so on. A negative value indicates that the heading could not be determined.</translate><br/> '''magneticX''': (number) <translate>Magnetic field in the X direction, in µT.</translate><br/> '''magneticY''': (number) <translate>Magnetic field in the Y direction, in µT.</translate><br/> '''magneticZ''': (number) <translate>Magnetic field in the Z direction, in µT.</translate><br/> {{Geolocation}} tcdhwlzjme1uf0830lcraorq0x18q10 Event.INVITATION RECEIVED 0 1115 14650 10578 2019-12-06T12:28:40Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' invitationReceived<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Invitation received</translate> {{Gaming}} ireeuaf058trviomsojpbnj2ys3j9gd Event.JOINED ROOM 0 770 14651 10664 2019-12-06T12:28:53Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' joinedRoom<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Room has been joined</translate> === <translate>Parameters</translate> === '''roomId''': (string) <translate>Room identifier</translate><br/> {{Gaming}} qy1dsb4qz53whonhpj5vs38qutszlxa Event.KEY DOWN 0 610 14356 14355 2019-12-04T00:24:38Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' keyDown<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Controller|Controller]]<br/> === <translate>Descriptio</translate>n === <translate>Button on controller was pushed down</translate> === <translate>Parameters</translate> === '''playerId''': (number) <translate>id of controller/player that pressed the button</translate><br/> '''keyCode''': (number) <translate>button key code that was pressed</translate><br/> __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' keyDown<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched when a supported key is pressed. For the list of supported keys, check [[Special:MyLanguage/KeyCode|KeyCode]] class.</translate> === <translate>Parameters</translate> === '''keyCode''': (number) <translate>code of the key pressed.</translate><br/> '''realCode''': (number) <translate>real keyCode underneath</translate><br/> gpxm7qg1htairvoplczsreejdl5saei Event.KEY UP 0 700 10624 8647 2018-09-03T08:59:42Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' keyUp<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Controller|Controller]]<br/> === <translate>Descriptio</translate>n === <translate>Button on controller was released up</translate> === <translate>Parameters</translate> === '''playerId''': (number) <translate>id of controller/player that released the button</translate><br/> '''keyCode''': (number) <translate>button key code that was released</translate><br/> __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' keyUp<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched when a supported key is released. For the list of supported keys, check [[Special:MyLanguage/KeyCode|KeyCode]] class.</translate> === <translate>Parameters</translate> === '''keyCode''': (number) <translate>code of the key pressed.</translate><br/> '''realCode''': (number) <translate>real keyCode underneath</translate><br/> lb7prb0e2z6dy29fh21k2bbt200dwz6 Event.LAYOUT RESIZED 0 996 14357 10443 2019-12-04T00:25:56Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.5<br/> '''<translate>Value</translate>:''' layout_resized<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Descriptio</translate>n === <translate>Dispatched to a sprite when its size has been set by the layout system.</translate> === <translate>Parameters</translate> === '''width''': (number) <translate>the computed width of the sprite</translate><br/> '''height''': (number) <translate>the computed height of the sprite</translate><br/> {{Sprite}} esu4m9tf6kz8v3wxzco9mjz9621altn Event.LEFT JOYSTICK 0 319 14548 9755 2019-12-04T08:20:02Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' leftJoystick<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Controller|Controller]]<br/> === <translate>Descriptio</translate>n === <translate>Event for movement of the left joystick</translate> === <translate>Parameters</translate> === '''x''': (number) <translate>x vector from -1 to 1</translate><br/> '''y''': (number) <translate>y vector from -1 to 1</translate><br/> '''angle''': (number) <translate>angle at which joystick is positioned in radians, left being 0 and increasing in clockwise direction</translate><br/> '''strength''': (number) <translate>distance vector from the center to current position from 0 to 1</translate><br/> '''playerId''': (number) <translate>id of controller/player</translate><br/> {{Controller}} hgva43i3xvnz4ihnskfbe3u1ttqrivi Event.LEFT ROOM 0 562 14652 10069 2019-12-06T12:29:07Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' leftRoom<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Room has been left</translate> === <translate>Parameters</translate> === '''roomId''': (string) <translate>Room identifier</translate><br/> {{Gaming}} 9z30bacbmwio1a0o5nmp74zwh6hkk6z Event.LEFT TRIGGER 0 873 14549 10361 2019-12-04T08:20:20Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' leftTrigger<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Controller|Controller]]<br/> === <translate>Descriptio</translate>n === <translate>Event for analog left trigger</translate> === <translate>Parameters</translate> === '''strength''': (number) <translate>strength of the press, from 0 to 1</translate><br/> '''playerId''': (number) <translate>id of controller/player using trigger</translate><br/> {{Controller}} 4rej8ramp0d4ddlzfzz91r9km87f2s1 Event.LOAD ACHIEVEMENTS COMPLETE 0 741 14653 10266 2019-12-06T12:29:22Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' loadAchievementsComplete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Each entry of the ''achievements'' table contains:<br /> <ul> <li>id: Achievement id</li> <li>name: Achievement name</li> <li>description: Achievement description</li> <li>status: Achievement status</li> <li>lastUpdate: The achivement's last update</li> <li>currentSteps: Currently achieved steps</li> <li>totalSteps: Total steps</li> </ul></translate> === <translate>Parameters</translate> === '''achievements''': (table) <translate>Achievements tabled</translate><br/> {{Gaming}} 5d9tukom62aqeil057izm5tt39400fs Event.LOAD ACHIEVEMENTS ERROR 0 742 14654 10263 2019-12-06T12:29:36Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' loadAchievementsError<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Error while loading achievements</translate> === <translate>Parameters</translate> === '''error''': (string) <translate>Error information</translate><br/> {{Gaming}} i6qczwirv1cp4pb54f3jv1azbk9fo7j Event.LOAD SCORES COMPLETE 0 163 14655 9542 2019-12-06T12:31:33Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' loadScoresComplete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Scores have been loaded from leaderboard. The ''scores'' field contains leaderboards entries comprised of the following fields:<br /> <ul> <li>name: The player's name</li> <li>score: The player's score</li> <li>rank: The player's rank</li> <li>playerId: The player's id</li> <li>picture: The player's picture (URL) if supported</li> <li>timestamp: The timestamp of the entry</li> </ul></translate> === <translate>Parameters</translate> === '''id''': (string) <translate>Leaderboard id</translate><br/> '''name''': (string) <translate>Leaderboard name</translate><br/> '''scores''': (table) <translate>Scores tabled</translate><br/> {{Gaming}} c57hwi70ev7ufoqjfq9zyn03vhx6mhk Event.LOAD SCORES ERROR 0 749 14656 10652 2019-12-06T12:31:48Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' loadScoresComplete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Error while loading scores</translate> === <translate>Parameters</translate> === '''id''': (string) <translate>Leaderboard id</translate><br/> '''error''': (string) <translate>Error information</translate><br/> {{Gaming}} 8i0zecz56wzqhsshubdpfvxs9lj7x78 Event.LOCAL NOTIFICATION 0 152 9540 7190 2018-09-03T08:57:12Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' localNotification<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/NotificationManager|NotificationManager]]<br/> === <translate>Descriptio</translate>n === <translate>Event is dispatched when application is opened by clicking on local notification. Or when notification is received while application is in foreground (because in this case notification will not be displayed on the device).</translate> rog2bba162yxd2htvn2chztg1l3dxrd Event.LOCATION UPDATE 0 697 13924 13501 2019-12-03T20:02:57Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' locationUpdate<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Geolocation|Geolocation]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched on each user location update</translate> === <translate>Parameters</translate> === '''latitude''': (number) <translate>The latitude of current user position</translate><br/> '''longitude''': (number) <translate>The longitude of current user position</translate><br/> '''altitude''': (number) <translate>The possible altitude of user</translate><br/> '''speed''': (number) <translate>The possible speed of user in m/s</translate><br/> '''course''': (number) <translate>The possible course of user in degrees</translate><br/> '''accuracy''': (number) <translate>The position accuracy, in meters, if available</translate><br/> '''source''': (number) <translate>The source of the position, if available: P for GPS, N for Network,C for cellular, W for Wifi, F for fixed (simulator), O for obfuscated. </translate><br/> {{Geolocation}} 5o91hj4m03sd8n8xq1e6cwosmh119qy Event.LOGIN CANCEL 0 502 9986 7625 2018-09-03T08:57:59Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' loginCancel<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Facebook|Facebook]]<br/> === <translate>Descriptio</translate>n === <translate>Dispatched when the user cancelled Facebook login.</translate> s7ybspbhu4yqe5j7bdq3qk46ufj1gy1 Event.LOGIN COMPLETE 0 736 10259 7892 2018-09-03T08:58:32Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' loginComplete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Facebook|Facebook]]<br/> === <translate>Descriptio</translate>n === <translate>Dispatched when the user has logged in with Facebook</translate> __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' loginComplete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Login successful</translate> 9c71k92lqxsqg5vd5nc46a2j06epkhq Event.LOGIN ERROR 0 888 10379 8699 2018-09-03T08:58:58Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' loginError<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Facebook|Facebook]]<br/> === <translate>Descriptio</translate>n === <translate>Dispatched when a Facebook dialog has failed. ''event.errorCode'' and ''event.errorDescription'' fields give detailed information about the fail reason.</translate> __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' loginError<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Error while trying to log in</translate> === <translate>Parameters</translate> === '''error''': (string) <translate>Error information</translate><br/> jv02rhmolqo2mu6syr66hv0ookqsz5l Event.LOGOUT COMPLETE 0 143 9520 7172 2018-09-03T08:57:10Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' logoutComplete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Facebook|Facebook]]<br/> === <translate>Descriptio</translate>n === <translate>Dispatched when the user has logged out with Facebook.</translate> k40tvwqjs4jdinxk8tn2oqbc3r47xfq Event.MEDIA CANCEL 0 2652 13375 13371 2019-08-03T02:38:12Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.1<br/> '''<translate>Value</translate>:''' complete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Media|Media]]<br/> === <translate>Description</translate> === <translate> This event is dispatched when a media selection is cancelled by user. </translate> === <translate>Example</translate> === <source lang="lua"> --user cancelled selecting image mediamanager:addEventListener(Event.MEDIA_CANCEL, function() print("User cancelled media input") end) </source> === <translate>Parameters</translate> === <br/> <br/> qf66hxmidtn8ckoiqlaa3fs1d988zmh Event.MEDIA RECEIVE 0 2651 13374 13370 2019-08-03T02:37:47Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.1<br/> '''<translate>Value</translate>:''' complete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Media|Media]]<br/> === <translate>Description</translate> === <translate> This event is dispatched when a media is received via a call to mediamanager. </translate> === <translate>Example</translate> === <source lang="lua"> require "media" mediamanager:addEventListener(Event.MEDIA_RECEIVE, function(e) local media = Media.new(e.path) media:resize(200, 200) print(media:getPixel(1, 1)) for x = 50, 100 do for y = 50, 100 do media:setPixel(x, y, 255, 0, 0, 0.5) end end media:save() local bmp = Bitmap.new(Texture.new(e.path, true)) stage:addChild(bmp) end) </source> === <translate>Parameters</translate> === '''e.path''': (string) <translate>path to image.</translate><br/> <br/> <br/> fzo4sux9h9qkh57s8vcvuhs8gn8fj9f Event.MEMORY WARNING 0 484 13863 13698 2019-12-03T00:55:46Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2013.09<br/> '''Value:''' memoryWarning<br/> '''Defined by:''' [[EventDispatcher]]<br/> === Description === This event is dispatched when device has low memory and you can try to free memory in your app, by releasing unnecessary resources. {{EventDispatcher}} ps7lv5r4u1xi98angqg8u5vv4yen24r Event.MOUSE DOWN 0 202 14776 14358 2019-12-07T02:06:28Z MoKaLux 19 added example wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' mouseDown<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Descriptio</translate>n === This event is dispatched on mouse down action. It is possible to generate this event using touch actions, by enabling this option through project settings. Mouse button can have values of: [[Special:MyLanguage/KeyCode.MOUSE_NONE|KeyCode.MOUSE_NONE]] [[Special:MyLanguage/KeyCode.MOUSE_LEFT|KeyCode.MOUSE_LEFT]] [[Special:MyLanguage/KeyCode.MOUSE_RIGHT|KeyCode.MOUSE_RIGHT]] [[Special:MyLanguage/KeyCode.MOUSE_MIDDLE|KeyCode.MOUSE_MIDDLE]] Modifiers can have values of: [[Special:MyLanguage/KeyCode.MODIFIER_NONE|KeyCode.MODIFIER_NONE]] [[Special:MyLanguage/KeyCode.MODIFIER_SHIFT|KeyCode.MODIFIER_SHIFT]] [[Special:MyLanguage/KeyCode.MODIFIER_CTRL|KeyCode.MODIFIER_CTRL]] [[Special:MyLanguage/KeyCode.MODIFIER_ALT|KeyCode.MODIFIER_ALT]] [[Special:MyLanguage/KeyCode.MODIFIER_META|KeyCode.MODIFIER_META]] === <translate>Parameters</translate> === '''x''': (number) <translate>x coordinate of the click</translate><br/> '''y''': (number) <translate>y coordinate of the click</translate><br/> '''rx''': (number) <translate>unrounded x coordinate of the click</translate><br/> '''ry''': (number) <translate>unrounded y coordinate of the click</translate><br/> '''button''': (number) <translate>Mouse button pressed</translate><br/> '''modifiers''': (number) <translate>Modifiers present</translate><br/> === <translate>Example</translate> === <source lang="lua"> mypixel:addEventListener(Event.MOUSE_DOWN, function(e) if mypixel:hitTestPoint(e.x, e.y) then iszoom = true local x, y = mypixel:globalToLocal(e.x, e.y) e:stopPropagation() end end) </source> {{Sprite}} ts2nsjzydsvxcomyfe1toc41sqzy1or Event.MOUSE HOVER 0 483 14359 9963 2019-12-04T00:26:42Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.08<br/> '''<translate>Value</translate>:''' mouseHover<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched when mouse is moved and not button is pressed. The event is available only on desktops as Windows, MacOS and WinRT Difference between [[Special:MyLanguage/Event.MOUSE_MOVE|Event.MOUSE_MOVE]] is that mouse hover does not have any mouse buttons pressed, but mouse move has at least 1 mouse button pressed. Modifiers can have values of: [[Special:MyLanguage/KeyCode.MODIFIER_NONE|KeyCode.MODIFIER_NONE]] [[Special:MyLanguage/KeyCode.MODIFIER_SHIFT|KeyCode.MODIFIER_SHIFT]] [[Special:MyLanguage/KeyCode.MODIFIER_CTRL|KeyCode.MODIFIER_CTRL]] [[Special:MyLanguage/KeyCode.MODIFIER_ALT|KeyCode.MODIFIER_ALT]] [[Special:MyLanguage/KeyCode.MODIFIER_META|KeyCode.MODIFIER_META]]</translate> === <translate>Parameters</translate> === '''x''': (number) <translate>x coordinate of mouse cursor</translate><br/> '''y''': (number) <translate>y coordinate of mouse cursor</translate><br/> '''rx''': (number) <translate>unrounded x coordinate of the mouse cursor</translate><br/> '''ry''': (number) <translate>unrounded y coordinate of the mouse cursor</translate><br/> '''button''': (number) <translate>button pressed - none</translate><br/> '''modifiers''': (number) <translate>Modifiers present</translate><br/> {{Sprite}} 1agxp21s9wy0whyqxh01128q18q8uaa Event.MOUSE MOVE 0 1098 14360 10548 2019-12-04T00:27:00Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' mouseMove<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched when mouse is moved. It is possible to generate this event using touch actions, by enabling this option through project settings. Difference between [[Special:MyLanguage/Event.MOUSE_HOVER|Event.MOUSE_HOVER]] is that mouse move have at least 1 button pressed, but mouse hover does not have any mouse buttons pressed. Mouse move events that are emulated on mobiles have left button pressed by default. Mouse button can have values of: [[Special:MyLanguage/KeyCode.MOUSE_NONE|KeyCode.MOUSE_NONE]] [[Special:MyLanguage/KeyCode.MOUSE_LEFT|KeyCode.MOUSE_LEFT]] [[Special:MyLanguage/KeyCode.MOUSE_RIGHT|KeyCode.MOUSE_RIGHT]] [[Special:MyLanguage/KeyCode.MOUSE_MIDDLE|KeyCode.MOUSE_MIDDLE]] Modifiers can have values of: [[Special:MyLanguage/KeyCode.MODIFIER_NONE|KeyCode.MODIFIER_NONE]] [[Special:MyLanguage/KeyCode.MODIFIER_SHIFT|KeyCode.MODIFIER_SHIFT]] [[Special:MyLanguage/KeyCode.MODIFIER_CTRL|KeyCode.MODIFIER_CTRL]] [[Special:MyLanguage/KeyCode.MODIFIER_ALT|KeyCode.MODIFIER_ALT]] [[Special:MyLanguage/KeyCode.MODIFIER_META|KeyCode.MODIFIER_META]]</translate> === <translate>Parameters</translate> === '''x''': (number) <translate>x coordinate of the click</translate><br/> '''y''': (number) <translate>y coordinate of the click</translate><br/> '''rx''': (number) <translate>unrounded x coordinate of the click</translate><br/> '''ry''': (number) <translate>unrounded y coordinate of the click</translate><br/> '''button''': (number) <translate>Mouse button pressed</translate><br/> '''modifiers''': (number) <translate>Modifiers present</translate><br/> {{Sprite}} du0ifau65avn5et3n2v8rv3ob4lkgor Event.MOUSE UP 0 140 14361 9518 2019-12-04T00:27:24Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' mouseUp<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched when mouse button is released. It is possible to generate this event using touch actions, by enabling this option through project settings. Mouse button can have values of: [[Special:MyLanguage/KeyCode.MOUSE_NONE|KeyCode.MOUSE_NONE]] [[Special:MyLanguage/KeyCode.MOUSE_LEFT|KeyCode.MOUSE_LEFT]] [[Special:MyLanguage/KeyCode.MOUSE_RIGHT|KeyCode.MOUSE_RIGHT]] [[Special:MyLanguage/KeyCode.MOUSE_MIDDLE|KeyCode.MOUSE_MIDDLE]] Modifiers can have values of: [[Special:MyLanguage/KeyCode.MODIFIER_NONE|KeyCode.MODIFIER_NONE]] [[Special:MyLanguage/KeyCode.MODIFIER_SHIFT|KeyCode.MODIFIER_SHIFT]] [[Special:MyLanguage/KeyCode.MODIFIER_CTRL|KeyCode.MODIFIER_CTRL]] [[Special:MyLanguage/KeyCode.MODIFIER_ALT|KeyCode.MODIFIER_ALT]] [[Special:MyLanguage/KeyCode.MODIFIER_META|KeyCode.MODIFIER_META]]</translate> === <translate>Parameters</translate> === '''x''': (number) <translate>x coordinate of the click</translate><br/> '''y''': (number) <translate>y coordinate of the click</translate><br/> '''rx''': (number) <translate>unrounded x coordinate of the click</translate><br/> '''ry''': (number) <translate>unrounded y coordinate of the click</translate><br/> '''button''': (number) <translate>Mouse button pressed</translate><br/> '''modifiers''': (number) <translate>Modifiers present</translate><br/> {{Sprite}} 6uh9s7ymkq6emlb308zxuodgfz5e2og Event.MOUSE WHEEL 0 1146 14775 14774 2019-12-07T02:00:55Z MoKaLux 19 added example wikitext text/x-wiki __NOTOC__ <languages/> '''<translate>Available since</translate>:''' Gideros 2015.04.26<br/> '''<translate>Value</translate>:''' mouseWheel<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === Event that fires when mouse wheel is used. Modifiers can have values of: [[Special:MyLanguage/KeyCode.MODIFIER_NONE|KeyCode.MODIFIER_NONE]] [[Special:MyLanguage/KeyCode.MODIFIER_SHIFT|KeyCode.MODIFIER_SHIFT]] [[Special:MyLanguage/KeyCode.MODIFIER_CTRL|KeyCode.MODIFIER_CTRL]] [[Special:MyLanguage/KeyCode.MODIFIER_ALT|KeyCode.MODIFIER_ALT]] [[Special:MyLanguage/KeyCode.MODIFIER_META|KeyCode.MODIFIER_META]] === <translate>Parameters</translate> === '''x''': (number) <translate>x coordinate of the click</translate><br/> '''y''': (number) <translate>y coordinate of the click</translate><br/> '''rx''': (number) <translate>unrounded x coordinate of the click</translate><br/> '''ry''': (number) <translate>unrounded y coordinate of the click</translate><br/> '''wheel''': (number) <translate>negative value when scrolled down and positive value when scrolled up</translate><br/> '''modifiers''': (number) <translate>Modifiers present</translate><br/> === <translate>Example</translate> === <source lang="lua"> local myscale = 0 mybitmap:addEventListener(Event.MOUSE_WHEEL, function(e) myscale = mybitmap:getScale() + e.wheel / 32 mybitmap:setScale(myscale) end) </source> {{Sprite}} 6q2lro88009iuojixckxwaif3kb47xl Event.OPEN URL 0 178 13864 13699 2019-12-03T00:56:26Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2018.5<br/> '''Value:''' openUrl<br/> '''Defined by:''' [[EventDispatcher]]<br/> === Description === This event is dispatched when the app is launched in response to an open url request. === Parameters === '''url''': (string) the url that triggered the application launch<br/> {{EventDispatcher}} fv0dlzk9ss13dakgy229fnjysihvo3j Event.PEER CONNECTED 0 705 14657 10625 2019-12-06T12:34:34Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' peerConnected<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate></translate> {{Gaming}} 4hvhsq7onvxl1waeyeev78k8qdbzfgv Event.PEER DECLINED 0 629 14658 10166 2019-12-06T12:34:47Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' peerDeclined<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate></translate> {{Gaming}} n0gphcel9c8slylm41ks2m9iltidfcq Event.PEER DISCONNECTED 0 1006 14659 10805 2019-12-06T12:34:58Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' peerDisconnected<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate></translate> {{Gaming}} ie6qvo3r04zoc6m3tf6v2xantnj6sbz Event.PEER INVITED 0 247 14660 9653 2019-12-06T12:35:12Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' peerInvited<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate></translate> {{Gaming}} jtlr7x7r41cn7osi36svmica10v47lr Event.PEER JOINED 0 429 14661 9885 2019-12-06T12:35:26Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' peerJoined<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate></translate> {{Gaming}} 2uvateazj5s0j6pi8b701ktevgu4iec Event.PEER LEFT 0 624 14662 10156 2019-12-06T12:35:41Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' peerLeft<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate></translate> {{Gaming}} 02r050y1s5em72sixbx7mnlhiys1mpd Event.PLAYER INFORMATION COMPLETE 0 781 14663 10294 2019-12-06T12:35:58Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' playerInformationComplete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Received player information</translate> === <translate>Parameters</translate> === '''id''': (string) <translate>Player id</translate><br/> '''name''': (string) <translate>Player name</translate><br/> '''picture''': (string) <translate>Player picture (url)</translate><br/> {{Gaming}} 989awzs23ntow7v38sdg9q2eou4abmb Event.PLAYER INFORMATION ERROR 0 704 14664 10628 2019-12-06T12:36:14Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' playerInformationError<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Error while fetching player information</translate> === <translate>Parameters</translate> === '''error''': (string) <translate>Error information</translate><br/> {{Gaming}} ko0rnv21cjfgqebiabyfh12jfqyt3wd Event.PLAYER SCORE COMPLETE 0 183 14665 9579 2019-12-06T12:36:29Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' playerScoreComplete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Received player score</translate> === <translate>Parameters</translate> === '''rank''': (number) <translate>Player rank</translate><br/> '''score''': (number) <translate>Player score</translate><br/> '''formattedScore''': (string) <translate>Player formatted score</translate><br/> '''timestamp''': (number) <translate>Score timestamp</translate><br/> {{Gaming}} bvk0f052nbodr22a0izifj728a4rfwk Event.PLAYER SCORE ERROR 0 921 14666 10758 2019-12-06T12:36:44Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' playerScoreError<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Error while retrieving player score</translate> === <translate>Parameters</translate> === '''error''': (string) <translate>Error information</translate><br/> {{Gaming}} d5czrkeedz5vhndnpblm54vjexl9tq6 Event.POST SOLVE 0 368 9811 8542 2018-09-03T08:57:41Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' postSolve<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2.World|b2.World]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched after the reaction between box2d objects and contains some additional information which has been calculated, like, maximal impulse of collision in ''e.maxImpulse''.</translate> === <translate>Parameters</translate> === '''contact''': (b2.Contact) <translate>Contains instance of [[Special:MyLanguage/b2.Contact|b2.Contact]] holding information about this collision</translate><br/> '''fixtureA''': (b2.Fixture) <translate>Contains instance of [[Special:MyLanguage/b2.Fixture|b2.Fixture]] of first colliding body</translate><br/> '''fixtureB''': (b2.Fixture) <translate>Contains instance of [[Special:MyLanguage/b2.Fixture|b2.Fixture]] of second colliding body</translate><br/> '''maxImpulse''': (number) <translate>The maximal impulse (strength) of collision</translate><br/> d6d9jl5fkbplxueo7fl066r2cg5d3nl Event.PRE SOLVE 0 831 10330 8688 2018-09-03T08:58:48Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' preSolve<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2.World|b2.World]]<br/> === <translate>Descriptio</translate>n === <translate>This event is usually dispatched after [[Special:MyLanguage/Event.BEGIN_CONTACT|Event.BEGIN_CONTACT]] and can be dispatched multiple times on each reaction between objects. Usually in this event you can cancel or modify collisions in other ways using ''event.contact'' object.</translate> === <translate>Parameters</translate> === '''contact''': (b2.Contact) <translate>Contains instance of [[Special:MyLanguage/b2.Contact|b2.Contact]] holding information about this collision</translate><br/> '''fixtureA''': (b2.Fixture) <translate>Contains instance of [[Special:MyLanguage/b2.Fixture|b2.Fixture]] of first colliding body</translate><br/> '''fixtureB''': (b2.Fixture) <translate>Contains instance of [[Special:MyLanguage/b2.Fixture|b2.Fixture]] of second colliding body</translate><br/> tqt045n1qme8b5km34v2k5ygdxla47z Event.PROGRESS 0 934 14478 10401 2019-12-04T01:51:56Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' progress<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/UrlLoader|UrlLoader]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched to notify of how far the download has progressed.</translate> === <translate>Parameters</translate> === '''bytesLoaded''': (number) <translate>The number of bytes loaded.</translate><br/> '''bytesTotal''': (number) <translate>The total number of bytes that will be loaded or -1 if the length can't be determined.</translate><br/> {{UrlLoader}} bv6994f9dd8d1iva2ddik6iv78lfyks Event.PURCHASE STATE CHANGE 0 813 10326 8682 2018-09-03T08:58:46Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' purchaseStateChange<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/GoogleBilling|GoogleBilling]]<br/> === <translate>Descriptio</translate>n === <translate>Dispatched when information about a transaction is received with these purchase states: [[Special:MyLanguage/GoogleBilling.CANCELED|GoogleBilling.CANCELED]] indicates that purchase was canceled [[Special:MyLanguage/GoogleBilling.PURCHASED|GoogleBilling.PURCHASED]] indicates that item was purchased you can enable it in your app [[Special:MyLanguage/GoogleBilling.REFUNDED|GoogleBilling.REFUNDED]] indicates that item previously purchased was refunded, remove purchased item from users app [[Special:MyLanguage/GoogleBilling.EXPIRED|GoogleBilling.EXPIRED]] indicates that item previously subscribed is expired, disable any subscription services</translate> === <translate>Parameters</translate> === '''purchaseState''': (string) <translate>purchase state</translate><br/> '''productId''': (string) <translate>your assigned product id</translate><br/> '''notificationId''': (string) <translate>id of notification, that you need to confirm</translate><br/> '''purchaseTime''': (string) <translate>time when purchase was made</translate><br/> '''developerPayload''': (string) <translate>A developer-specified string that can be specified when you make a purchase request.</translate><br/> tducwoda1hr4weulau9k3skn6kfhkar Event.PUSH NOTIFICATION 0 236 9646 7295 2018-09-03T08:57:23Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' pushNotification<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/NotificationManager|NotificationManager]]<br/> === <translate>Descriptio</translate>n === <translate>Event is received when application is opened by clicking on push notification. Or when notification is received while application is in foreground (because in this case notification will not be displayed on the device).</translate> 0z2zcx0x6onl7u0s63vuuuq4296isf5 Event.PUSH REGISTRATION 0 740 10262 8652 2018-09-03T08:58:32Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' pushRegistration<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/NotificationManager|NotificationManager]]<br/> === <translate>Descriptio</translate>n === <translate>Event is received when application is successfully registered for push notifications, after calling ''registerForPushNotifications''</translate> j4thbsdxrv1az5aqhjljgsjbyskz1yn Event.PUSH REGISTRATION ERROR 0 905 10748 8704 2018-09-03T08:59:54Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' pushRegistrationError<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/NotificationManager|NotificationManager]]<br/> === <translate>Descriptio</translate>n === <translate>Event is received when application failed to register for push notifications, after calling ''registerForPushNotifications'', which means you should retry later. There might be different reasons, but most common is that server was unavailable or there was no Internet connection.</translate> e4kqtumpwrzlj08b2tfa8faaxrd4cv1 Event.RECEIVED SHARE OPENED 0 2513 12693 2018-10-04T06:51:18Z Anthony 1 Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.10<br/> '''<translate>Value</translate>:''' receivedShareOpened<br/> '''<translate>Defined b..." wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.10<br/> '''<translate>Value</translate>:''' receivedShareOpened<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Megacool|Megacool]]<br/> === <translate>Description</translate> === <translate>The device has received a share and installed the app for the first time.</translate> k1agxjafdwxi8r7j7c1r4zbry2j0ucp Event.REMOVED FROM STAGE 0 529 14363 10014 2019-12-04T00:28:12Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' removedFromStage<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched when object is removed from stage hierarchy</translate> {{Sprite}} mu5qswb1a7p9k9go08lwcug3fu8yjt2 Event.REPORT ACHIEVEMENT COMPLETE 0 134 14667 9513 2019-12-06T12:36:58Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' reportAchievementComplete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Achievement was successfully reported</translate> === <translate>Parameters</translate> === '''id''': (string) <translate>Achievement id</translate><br/> {{Gaming}} kdosqrzqchevymahyyui0eaohppt9jd Event.REPORT ACHIEVEMENT ERROR 0 545 14668 10045 2019-12-06T12:37:12Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' reportAchievementError<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Error while reporting achievement</translate> === <translate>Parameters</translate> === '''id''': (string) <translate>Achievement id</translate><br/> '''error''': (string) <translate>Error information</translate><br/> {{Gaming}} 15pxt4dwz1y0gwyzcfxlun18mg6jow2 Event.REPORT SCORE COMPLETE 0 963 14669 10785 2019-12-06T12:37:26Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' reportScoreComplete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Score successfully reported</translate> === <translate>Parameters</translate> === '''id''': (string) <translate>Leaderboard id</translate><br/> '''score''': (number) <translate>Score</translate><br/> {{Gaming}} pyils3xk2jxvepd27fw1fjmz0awxlnp Event.REPORT SCORE ERROR 0 297 14670 9720 2019-12-06T12:37:43Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' reportScoreError<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Error while reporting score</translate> === <translate>Parameters</translate> === '''id''': (string) <translate>Leaderboard id</translate><br/> '''score''': (number) <translate>Score</translate><br/> '''error''': (string) <translate>Error information</translate><br/> {{Gaming}} d7b8yr2gv796978dphjqcuojfj8cnqr Event.REQUEST COMPLETE 0 603 10126 7761 2018-09-03T08:58:14Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' requestComplete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Facebook|Facebook]]<br/> === <translate>Descriptio</translate>n === <translate>Dispatched when a Facebook graph request returns a response.</translate> === <translate>Parameters</translate> === '''response''': (string) <translate>contains the raw response of the completed Facebook graph request.</translate><br/> 152ubi3794synd1v99hha0uz38k8c1b Event.REQUEST ERROR 0 827 10693 8339 2018-09-03T08:59:48Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' requestError<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Facebook|Facebook]]<br/> === <translate>Descriptio</translate>n === <translate>Dispatched when a Facebook graph request has failed.</translate> === <translate>Parameters</translate> === '''errorCode''': (number) <translate>code of occurred error</translate><br/> '''errorDescription''': (string) <translate>Description of the error</translate><br/> 12wcerraximgk0sxx1gupe8cbiialiv Event.REQUEST PRODUCTS COMPLETE 0 1110 10567 8770 2018-09-03T08:59:36Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.2.2<br/> '''<translate>Value</translate>:''' requestProductsComplete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/StoreKit|StoreKit]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched after the method [[Special:MyLanguage/StoreKit:requestProducts|StoreKit:requestProducts]] is called and completed request. It provides information about products available.</translate> === <translate>Parameters</translate> === '''error''': (number) <translate>error code if the request failed to execute</translate><br/> '''errorDescription''': (string) <translate>error description if the request failed to execute</translate><br/> '''invalidProductIdentifiers''': (table) <translate>array of product identifier strings that were not recognized by the Apple App Store</translate><br/> '''products''': (table) <translate>array of products where each element is a table which contains the product information</translate><br/> '''products[].title''': (string) <translate>localized name of the product</translate><br/> '''products[].description''': (string) <translate>localized description of the product</translate><br/> '''products[].price''': (price) <translate>cost of the product in the local currency</translate><br/> '''products[].productIdentifier''': (string) <translate>string that identifies the product in the Apple App Store</translate><br/> i2i3d532yp9vet4ptilgsafrx3ri05e Event.REQUEST PURCHASE COMPLETE 0 667 10211 8637 2018-09-03T08:58:23Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' requestPurchaseComplete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/GoogleBilling|GoogleBilling]]<br/> === <translate>Descriptio</translate>n === <translate>Dispatched when [[Special:MyLanguage/GoogleBilling:requestPurchase|GoogleBilling:requestPurchase]] function completes with these response codes: [[Special:MyLanguage/GoogleBilling.USER_CANCELED|GoogleBilling.USER_CANCELED]] indicates that the user pressed the back button on the checkout page instead of buying the item. [[Special:MyLanguage/GoogleBilling.SERVICE_UNAVAILABLE|GoogleBilling.SERVICE_UNAVAILABLE]] indicates that the network connection is down. [[Special:MyLanguage/GoogleBilling.BILLING_UNAVAILABLE|GoogleBilling.BILLING_UNAVAILABLE]] indicates that in-app billing is not available because the API version that you specified is not recognized by the Google Play application or the user is ineligible for in-app billing (for example, the user resides in a country that prohibits in-app purchases). [[Special:MyLanguage/GoogleBilling.ITEM_UNAVAILABLE|GoogleBilling.ITEM_UNAVAILABLE]] indicates that Google Play cannot find the requested item in the application's product list. [[Special:MyLanguage/GoogleBilling.DEVELOPER_ERROR|GoogleBilling.DEVELOPER_ERROR]] Indicates that an application is trying to make an in-app billing request but the application has not declared the com.android.vending.BILLING permission in its manifest. Can also indicate that an application is not properly signed, or that you sent a malformed request, such as a request with missing Bundle keys or a request that uses an unrecognized request type. [[Special:MyLanguage/GoogleBilling.ERROR|GoogleBilling.ERROR]] indicates an unexpected server error. For example, this error is triggered if you try to purchase an item from yourself, which is not allowed by Google Wallet.</translate> === <translate>Parameters</translate> === '''productId''': (string) <translate>your given id of the product purchased</translate><br/> '''responseCode''': (string) <translate>response code.</translate><br/> '''productType''': (string) <translate>type of the product purchased</translate><br/> '''developerPayload''': (string) <translate>A developer-specified string that can be specified when you make a purchase request.</translate><br/> 9did1etnqra5j5v8619suw396ikv99r Event.RESTORE TRANSACTIONS COMPLETE 0 922 10440 8712 2018-09-03T08:59:13Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' restoreTransactionsComplete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/GoogleBilling|GoogleBilling]]<br/> === <translate>Descriptio</translate>n === <translate>Dispatched when [[Special:MyLanguage/GoogleBilling:restoreTransactions|GoogleBilling:restoreTransactions]] function completes with these response codes: [[Special:MyLanguage/GoogleBilling.OK|GoogleBilling.OK]] indicates that the request was sent to the server successfully. [[Special:MyLanguage/GoogleBilling.ERROR|GoogleBilling.ERROR]] indicates an unexpected server error. For example, this error is triggered if you try to purchase an item from yourself, which is not allowed by Google Wallet. [[Special:MyLanguage/GoogleBilling.DEVELOPER_ERROR|GoogleBilling.DEVELOPER_ERROR]] indicates that an application is trying to make an in-app billing request but the application has not declared the com.android.vending.BILLING permission in its manifest. Can also indicate that an application is not properly signed, or that you sent a malformed request, such as a request with missing Bundle keys or a request that uses an unrecognized request type.</translate> === <translate>Parameters</translate> === '''responseCode''': (string) <translate>response code</translate><br/> __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.2.2<br/> '''<translate>Value</translate>:''' restoreTransactionsComplete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/StoreKit|StoreKit]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched after call of [[Special:MyLanguage/StoreKit:restoreCompletedTransactions|StoreKit:restoreCompletedTransactions]] and when it's request is completed.</translate> === <translate>Parameters</translate> === '''errorCode''': (number) <translate>error code if an error occurred while restoring transactions</translate><br/> '''errorDescription''': (string) <translate>description of the error if an error occurred while restoring transactions</translate><br/> syk7t64bdh7spelnp8n8wrfiyr501kh Event.RIGHT JOYSTICK 0 957 14550 10417 2019-12-04T08:20:40Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' rightJoystick<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Controller|Controller]]<br/> === <translate>Descriptio</translate>n === <translate>Event for movement of the right joystick</translate> === <translate>Parameters</translate> === '''x''': (number) <translate>x vector from -1 to 1</translate><br/> '''y''': (number) <translate>y vector from -1 to 1</translate><br/> '''angle''': (number) <translate>angle at which joystick is positioned in radians, left being 0 and increasing in clockwise direction</translate><br/> '''strength''': (number) <translate>distance vector from the center to current position from 0 to 1</translate><br/> '''playerId''': (number) <translate>id of controller/player</translate><br/> {{Controller}} a7djkktxew1rcyufgk2vyc7jyatqvd8 Event.RIGHT TRIGGER 0 201 14551 9599 2019-12-04T08:20:55Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' rightTrigger<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Controller|Controller]]<br/> === <translate>Descriptio</translate>n === <translate>Event for analog right trigger</translate> === <translate>Parameters</translate> === '''strength''': (number) <translate>strength of the press, from 0 to 1</translate><br/> '''playerId''': (number) <translate>id of controller/player using trigger</translate><br/> {{Controller}} ozqso0biwovbcz0yu9i3gsskysce55q Event.ROOM AUTO MATCHING 0 370 14671 9822 2019-12-06T12:37:59Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' roomAutoMatching<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate></translate> === <translate>Parameters</translate> === '''roomId''': (string) <translate>Room identifier</translate><br/> {{Gaming}} qez1pxa12a2beacgqijneunys8kvrfr Event.ROOM CONNECTED 0 950 14672 10775 2019-12-06T12:38:12Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' roomConnected<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Room is connected</translate> === <translate>Parameters</translate> === '''roomId''': (string) <translate>Room identifier</translate><br/> {{Gaming}} cl09qy8o9ec44cq4icgpbqclfm5zzwp Event.ROOM CONNECTING 0 779 14673 10291 2019-12-06T12:38:27Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' roomConnecting<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate></translate> === <translate>Parameters</translate> === '''roomId''': (string) <translate>Room identifier</translate><br/> {{Gaming}} oiqwtjikxz9tjhtrgzue6he0qjrb4cu Event.ROOM CREATED 0 1109 14674 10560 2019-12-06T12:40:10Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' roomCreated<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Room is created</translate> === <translate>Parameters</translate> === '''roomId''': (string) <translate>Room identifier</translate><br/> {{Gaming}} s7rrlv8o6xxkxua74mcc2k3zkg0sy2f Event.SENT SHARE OPENED 0 2514 12694 2018-10-04T06:52:27Z Anthony 1 Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.10<br/> '''<translate>Value</translate>:''' receivedShareOpened<br/> '''<translate>Defined b..." wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.10<br/> '''<translate>Value</translate>:''' receivedShareOpened<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Megacool|Megacool]]<br/> === <translate>Description</translate> === <translate>A share sent from this device has been opened, and the receiver installed the app for the first time.</translate> e75hwfj06vq65kbd58fgj9wv2s4xamn Event.STATE CONFLICT 0 419 14675 9878 2019-12-06T12:40:35Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' stateConflict<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>A conflict was detected between local data and server data. <br/> Call [[Special:MyLanguage/Gaming:resolveState|Gaming:resolveState]] to fix.<br/></translate> === <translate>Parameters</translate> === '''key''': (number) <translate>State key</translate><br/> '''version''': (string) <translate>Version information</translate><br/> '''localData''': (string) <translate>Local data</translate><br/> '''serverData''': (stringr) <translate>Server data</translate><br/> {{Gaming}} k6cls788rixw6toyijvmctsydzmumh3 Event.STATE DELETED 0 1144 14676 10606 2019-12-06T12:40:53Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' stateDeleted<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>The specified game state has been deleted</translate> === <translate>Parameters</translate> === '''key''': (number) <translate>State key</translate><br/> {{Gaming}} ma7f0lgume3xcbej381mc9cwv3038c9 Event.STATE ERROR 0 901 14677 10739 2019-12-06T12:41:08Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' stateError<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>Game state related error</translate> === <translate>Parameters</translate> === '''key''': (number) <translate>State key</translate><br/> '''error''': (string) <translate>Error information</translate><br/> {{Gaming}} de29svvduaaet8sqm6l478q7b2278a1 Event.STATE LOADED 0 633 14678 10167 2019-12-06T12:41:24Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' stateLoaded<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Descriptio</translate>n === <translate>The given state has been loaded</translate> === <translate>Parameters</translate> === '''key''': (number) <translate>State key</translate><br/> '''data''': (string) <translate>State data</translate><br/> {{Gaming}} 0yvdxwvl8ylrf3pju2jvazp1rqqeisb Event.TIMER 0 422 14465 9880 2019-12-04T01:32:56Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' timer<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Timer|Timer]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched on every [[Special:MyLanguage/Timer|Timer]] repeat until timer is stopped or the provided amount of repeat count is reached</translate> {{Timer}} 4wp9ftud6mkw8unln6uusualsbdyyjk Event.TIMER COMPLETE 0 164 14466 9545 2019-12-04T01:36:09Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' timerComplete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Timer|Timer]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched only when [[Special:MyLanguage/Timer|Timer]] reached the provided amount of repeat count.</translate> {{Timer}} lq846flrc812gutlt9us9at710mlx52 Event.TOUCHES BEGIN 0 361 14364 9796 2019-12-04T00:28:32Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' touchesBegin<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched on touch begin action. It is possible to generate this event using mouse actions, by enabling this option through project settings. Modifiers can have values of: [[Special:MyLanguage/KeyCode.MODIFIER_NONE|KeyCode.MODIFIER_NONE]] [[Special:MyLanguage/KeyCode.MODIFIER_SHIFT|KeyCode.MODIFIER_SHIFT]] [[Special:MyLanguage/KeyCode.MODIFIER_CTRL|KeyCode.MODIFIER_CTRL]] [[Special:MyLanguage/KeyCode.MODIFIER_ALT|KeyCode.MODIFIER_ALT]] [[Special:MyLanguage/KeyCode.MODIFIER_META|KeyCode.MODIFIER_META]]</translate> === <translate>Parameters</translate> === '''touch.x''': (number) <translate>x coordinate of the current touch</translate><br/> '''touch.y''': (number) <translate>y coordinate of the current touch</translate><br/> '''touch.rx''': (number) <translate>unrounded x coordinate of the touch</translate><br/> '''touch.ry''': (number) <translate>unrounded y coordinate of the touch</translate><br/> '''touch.id''': (number) <translate>the id of current touch. This number is 1 if this is a first touch, 2 if it is a second, etc.</translate><br/> '''touch.type''': (string) <translate>Input type, possible values: finger, pen, mouse, penTablet</translate><br/> '''touch.pressure''': (number) <translate>Pressure on screen, 0 if not able to detect</translate><br/> '''touch.mouseButton''': (number) <translate>Mouse button which triggered this event, if any</translate><br/> '''touch.modifiers''': (number) <translate>Modifiers present</translate><br/> '''allTouches''': (table) <translate>lua table containing previously described touch table with x, y, rx, ry and id properties for all touches that are currently on device.</translate><br/> {{Sprite}} mt44bknp90nkiesjz7hyc0xhvl6v04b Event.TOUCHES CANCEL 0 938 14365 10770 2019-12-04T00:28:53Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' touchesCancel<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched when touch is interrupted, for example, by a phone call, or any sort of modal dialog. This event is dispatched only on devices. Modifiers can have values of: [[Special:MyLanguage/KeyCode.MODIFIER_NONE|KeyCode.MODIFIER_NONE]] [[Special:MyLanguage/KeyCode.MODIFIER_SHIFT|KeyCode.MODIFIER_SHIFT]] [[Special:MyLanguage/KeyCode.MODIFIER_CTRL|KeyCode.MODIFIER_CTRL]] [[Special:MyLanguage/KeyCode.MODIFIER_ALT|KeyCode.MODIFIER_ALT]] [[Special:MyLanguage/KeyCode.MODIFIER_META|KeyCode.MODIFIER_META]]</translate> === <translate>Parameters</translate> === '''touch.x''': (number) <translate>x coordinate of the current touch</translate><br/> '''touch.y''': (number) <translate>y coordinate of the current touch</translate><br/> '''touch.rx''': (number) <translate>unrounded x coordinate of the touch</translate><br/> '''touch.ry''': (number) <translate>unrounded y coordinate of the touch</translate><br/> '''touch.id''': (number) <translate>the id of current touch. This number is 1 if this is a first touch, 2 if it is a second, etc.</translate><br/> '''touch.type''': (string) <translate>Input type, possible values: finger, pen, mouse, penTablet</translate><br/> '''touch.pressure''': (number) <translate>Pressure on screen, 0 if not able to detect</translate><br/> '''touch.mouseButton''': (number) <translate>Mouse button which triggered this event, if any</translate><br/> '''touch.modifiers''': (number) <translate>Modifiers present</translate><br/> '''allTouches''': (table) <translate>lua table containing previously described touch table with x, y, rx, ry and id properties for all touches that are currently on device.</translate><br/> {{Sprite}} rb1k8atupaghr1gs4zvncsqz3datlcz Event.TOUCHES END 0 743 14366 10270 2019-12-04T00:29:13Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' touchesEnd<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched then touch is ended. It is possible to generate this event using mouse actions, by enabling this option through project settings. Modifiers can have values of: [[Special:MyLanguage/KeyCode.MODIFIER_NONE|KeyCode.MODIFIER_NONE]] [[Special:MyLanguage/KeyCode.MODIFIER_SHIFT|KeyCode.MODIFIER_SHIFT]] [[Special:MyLanguage/KeyCode.MODIFIER_CTRL|KeyCode.MODIFIER_CTRL]] [[Special:MyLanguage/KeyCode.MODIFIER_ALT|KeyCode.MODIFIER_ALT]] [[Special:MyLanguage/KeyCode.MODIFIER_META|KeyCode.MODIFIER_META]]</translate> === <translate>Parameters</translate> === '''touch.x''': (number) <translate>x coordinate of the current touch</translate><br/> '''touch.y''': (number) <translate>y coordinate of the current touch</translate><br/> '''touch.rx''': (number) <translate>unrounded x coordinate of the touch</translate><br/> '''touch.ry''': (number) <translate>unrounded y coordinate of the touch</translate><br/> '''touch.id''': (number) <translate>the id of current touch. This number is 1 if this is a first touch, 2 if it is a second, etc.</translate><br/> '''touch.type''': (string) <translate>Input type, possible values: finger, pen, mouse, penTablet</translate><br/> '''touch.pressure''': (number) <translate>Pressure on screen, 0 if not able to detect</translate><br/> '''touch.mouseButton''': (number) <translate>Mouse button which triggered this event, if any</translate><br/> '''touch.modifiers''': (number) <translate>Modifiers present</translate><br/> '''allTouches''': (table) <translate>lua table containing previously described touch table with x, y, rx, ry and id properties for all touches that are currently on device.</translate><br/> {{Sprite}} 22oopowf57uko9jnvp4pjwrd0p9mbz1 Event.TOUCHES MOVE 0 1111 14367 10563 2019-12-04T00:29:37Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' touchesMove<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched on touch move action. It is possible to generate this event using mouse actions, by enabling this option through project settings. Modifiers can have values of: [[Special:MyLanguage/KeyCode.MODIFIER_NONE|KeyCode.MODIFIER_NONE]] [[Special:MyLanguage/KeyCode.MODIFIER_SHIFT|KeyCode.MODIFIER_SHIFT]] [[Special:MyLanguage/KeyCode.MODIFIER_CTRL|KeyCode.MODIFIER_CTRL]] [[Special:MyLanguage/KeyCode.MODIFIER_ALT|KeyCode.MODIFIER_ALT]] [[Special:MyLanguage/KeyCode.MODIFIER_META|KeyCode.MODIFIER_META]]</translate> === <translate>Parameters</translate> === '''touch.x''': (number) <translate>x coordinate of the current touch</translate><br/> '''touch.y''': (number) <translate>y coordinate of the current touch</translate><br/> '''touch.rx''': (number) <translate>unrounded x coordinate of the touch</translate><br/> '''touch.ry''': (number) <translate>unrounded y coordinate of the touch</translate><br/> '''touch.id''': (number) <translate>the id of current touch. This number is 1 if this is a first touch, 2 if it is a second, etc.</translate><br/> '''touch.type''': (string) <translate>Input type, possible values: finger, pen, mouse, penTablet</translate><br/> '''touch.pressure''': (number) <translate>Pressure on screen, 0 if not able to detect</translate><br/> '''touch.mouseButton''': (number) <translate>Mouse button which triggered this event, if any</translate><br/> '''touch.modifiers''': (number) <translate>Modifiers present</translate><br/> '''allTouches''': (table) <translate>lua table containing previously described touch table with x, y, rx, ry and id properties for all touches that are currently on device.</translate><br/> {{Sprite}} d5d6a9w6zc0d4au1fg21hvt30m8xxuv Event.TRANSACTION 0 689 10231 8643 2018-09-03T08:58:25Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.2.2<br/> '''<translate>Value</translate>:''' transaction<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/StoreKit|StoreKit]]<br/> === <translate>Descriptio</translate>n === <translate>This event is dispatched when a transaction is updated. The event listener should process all successful transactions, unlock the functionality purchased by the user, and then finish the transaction by calling [[Special:MyLanguage/StoreKit:finishTransaction|StoreKit:finishTransaction]] method.</translate> === <translate>Parameters</translate> === '''errorCode''': (number) <translate>error code if the request failed to execute and event.transaction.state is set to StoreKit.FAILED</translate><br/> '''errorDescription''': (string) <translate>error description if the request failed to execute and event.transaction.state is set to StoreKit.FAILED</translate><br/> '''payment.productIdentifier''': (string) <translate>product identifier for this transaction</translate><br/> '''payment.quantity''': (number) <translate>number of items the user wants to purchase</translate><br/> '''transaction.state''': (string) <translate>current state of the transaction</translate><br/> '''transaction.identifier''': (string) <translate>string that uniquely identifies a successful payment transaction</translate><br/> '''transaction.receipt''': (string) <translate>signed receipt that records all information about a successful payment transaction</translate><br/> '''transaction.date''': (string) <translate>date the transaction was added to the App Store’s payment queue</translate><br/> '''originalTransaction.identifier''': (string) <translate>identifier of original transaction</translate><br/> '''originalTransaction.date''': (string) <translate>date of the original transaction</translate><br/> g1e8vc5jr9rv5rl20zomz8pov0blg9h Event.VIDEO COMPLETE 0 2653 13376 13369 2019-08-03T02:38:34Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.1<br/> '''<translate>Value</translate>:''' complete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Media|Media]]<br/> === <translate>Description</translate> === <translate> This event is dispatched when a video is finished playing. </translate> === <translate>Example</translate> === <source lang="lua"> mediamanager:addEventListener(Event.VIDEO_COMPLETE, function() print("Video completed") end) </source> === <translate>Parameters</translate> === <br/> <br/> opbl34flvhexfxejt4r5k2gwby25age Event.new 0 296 13834 13676 2019-12-03T00:27:34Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Event]]<br/> === Description === Creates a new [[Event]] object to be dispatched from an [[EventDispatcher]]. <source lang="lua"> (any), (any) = Event.new(type) </source> === Parameters === '''type''': (string) <br/> === Return values === '''Returns''' (any) New [[Event]] object.<br/> '''Returns''' (any) New [[Event]] object.<br/> {{Event}} plwah3dnlka0fvzj1z1pw16elmatgke Event:getTarget 0 472 13835 13677 2019-12-03T00:28:00Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Event]]<br/> === Description === Returns the element on which the event listener was registered. <source lang="lua"> (object) = Event:getTarget() </source> === Return values === '''Returns''' (object) Target of event.<br/> {{Event}} hyhb49m8kg749xg8aaym7urettpklqx Event:getType 0 660 13836 13678 2019-12-03T00:28:19Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Event]]<br/> === Description === Returns a string that represents the type of the event. <source lang="lua"> (string) = Event:getType() </source> === Return values === '''Returns''' (string) Type of event.<br/> {{Event}} 9dfpf1cpbzcb968u4awq48cfs2kguik Event:stopPropagation 0 525 13837 13679 2019-12-03T00:28:38Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Event]]<br/> === Description === Disables the propagation of the current event in the scene tree hierarchy. <source lang="lua"> Event:stopPropagation() </source> {{Event}} 5lnr5644yxnaj352dpks8v5e83m5wu7 EventDispatcher 0 62 14948 14591 2019-12-09T22:26:07Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:EventDispatcher --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> === <translate>Description</translate> === All classes that dispatch events inherit from [[Special:MyLanguage/EventDispatcher|EventDispatcher]]. The target of an event is a listener function and an optional data value. When an event is dispatched, the registered function is called. If the optional data value is given, it is used as a first parameter while calling the listener function. Event dispatching and event targets are the core part of the Gideros event model. Different event types (such as [[Special:MyLanguage/Event.ENTER_FRAME|Event.ENTER_FRAME]], [[Special:MyLanguage/Event.TOUCHES_BEGIN|Event.TOUCHES_BEGIN]] or [[Special:MyLanguage/Event.MOUSE_DOWN|Event.MOUSE_DOWN]]) flow through the scene tree hierarchy differently. When a touch or mouse event occurs, Gideros dispatches an event object into the event flow from the root of the scene tree. On the other hand, [[Special:MyLanguage/Event.ENTER_FRAME|Event.ENTER_FRAME]] event is dispatched to all [[Special:MyLanguage/Sprite|Sprite]] objects. If you want to define a class that dispatches events, you can inherit your class from [[Special:MyLanguage/EventDispatcher|EventDispatcher]]. === <translate>Examples</translate> === <source lang="lua"> -- example 1 ClassA = Core.class(EventDispatcher) ClassB = Core.class(EventDispatcher) function ClassA:funcA(event) print("funcA", self, event:getType(), event:getTarget()) end local a = ClassA.new() local b = ClassB.new() b:addEventListener("myevent", a.funcA, a) -- when b dispatches an "myevent" event, -- a.funcA will be called with 'a' -- as first parameter b:dispatchEvent(Event.new("myevent")) -- will print "funcA" -- example 2 Ball = Core.class(Sprite) function Ball:onEnterFrame() self:setX(self:getX() + 1) end ball = Ball.new() ball:addEventListener(Event.ENTER_FRAME, ball.onEnterFrame, ball)</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/EventDispatcher.new|EventDispatcher.new]] ''<translate>creates a new EventDispatcher object</translate>''<br/><!-- GIDEROSMTD:EventDispatcher.new() creates a new EventDispatcher object --> [[Special:MyLanguage/EventDispatcher:addEventListener|EventDispatcher:addEventListener]] ''<translate>registers a listener function</translate>''<br/><!-- GIDEROSMTD:EventDispatcher:addEventListener(type,listener,data) registers a listener function --> [[Special:MyLanguage/EventDispatcher:dispatchEvent|EventDispatcher:dispatchEvent]] ''<translate>dispatches an event</translate>''<br/><!-- GIDEROSMTD:EventDispatcher:dispatchEvent(event) dispatches an event --> [[Special:MyLanguage/EventDispatcher:hasEventListener|EventDispatcher:hasEventListener]] ''<translate>checks if the EventDispatcher object has a event listener</translate>''<br/><!-- GIDEROSMTD:EventDispatcher:hasEventListener(type) checks if the EventDispatcher object has a event listener --> [[Special:MyLanguage/EventDispatcher:removeAllListeners|EventDispatcher:removeAllListeners]] ''<translate>remove all listeners</translate>''<br/><!-- GIDEROSMTD:EventDispatcher:removeAllListeners() remove all listeners --> [[Special:MyLanguage/EventDispatcher:removeEventListener|EventDispatcher:removeEventListener]] ''<translate>removes a listener function</translate>''<br/><!-- GIDEROSMTD:EventDispatcher:removeEventListener(type,listener,data) removes a listener function --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === [[Special:MyLanguage/Event.APPLICATION_BACKGROUND|Event.APPLICATION_BACKGROUND]]<br/><!-- GIDEROSEVT:Event.APPLICATION_BACKGROUND applicationBackground--> [[Special:MyLanguage/Event.APPLICATION_EXIT|Event.APPLICATION_EXIT]]<br/><!-- GIDEROSEVT:Event.APPLICATION_EXIT applicationExit--> [[Special:MyLanguage/Event.APPLICATION_FOREGROUND|Event.APPLICATION_FOREGROUND]]<br/><!-- GIDEROSEVT:Event.APPLICATION_FOREGROUND applicationForeground--> [[Special:MyLanguage/Event.APPLICATION_RESIZE|Event.APPLICATION_RESIZE]]<br/><!-- GIDEROSEVT:Event.APPLICATION_RESIZE applicationResize--> [[Special:MyLanguage/Event.APPLICATION_RESUME|Event.APPLICATION_RESUME]]<br/><!-- GIDEROSEVT:Event.APPLICATION_RESUME applicationResume--> [[Special:MyLanguage/Event.APPLICATION_START|Event.APPLICATION_START]]<br/><!-- GIDEROSEVT:Event.APPLICATION_START applicationStart--> [[Special:MyLanguage/Event.APPLICATION_SUSPEND|Event.APPLICATION_SUSPEND]]<br/><!-- GIDEROSEVT:Event.APPLICATION_SUSPEND applicationSuspend--> [[Special:MyLanguage/Event.MEMORY_WARNING|Event.MEMORY_WARNING]]<br/><!-- GIDEROSEVT:Event.MEMORY_WARNING memoryWarning--> [[Special:MyLanguage/Event.OPEN_URL|Event.OPEN_URL]]<br/><!-- GIDEROSEVT:Event.OPEN_URL openUrl--> === <translate>Constants</translate> === |} tiexw59evoy2gp1n3zv7xq8ky3op12h EventDispatcher.new 0 763 13840 13685 2019-12-03T00:33:58Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[EventDispatcher]]<br/> === Description === Creates a new EventDispatcher object. <source lang="lua"> EventDispatcher.new() </source> {{EventDispatcher}} 46098s320tdxgsyhdyi1erlsia75y22 EventDispatcher:addEventListener 0 345 13841 13686 2019-12-03T00:34:28Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[EventDispatcher]]<br/> === Description === Registers a listener function and an optional data value so that the listener function is called when an event of a particular type occurs. <source lang="lua"> EventDispatcher:addEventListener(type,listener,data) </source> === Parameters === '''type''': (string) The type of event. <br/> '''listener''': (function) The listener function that processes the event. <br/> '''data''': (any) An optional data parameter that is passed as a first argument to the listener function. '''optional'''<br/> {{EventDispatcher}} tvcv8sgp8gab5pijnh4ti2ei1j1lrv5 EventDispatcher:dispatchEvent 0 913 13842 13687 2019-12-03T00:34:47Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[EventDispatcher]]<br/> === Description === Dispatches an event to this [[EventDispatcher]] instance. <source lang="lua"> EventDispatcher:dispatchEvent(event) </source> === Parameters === '''event''': (Event) The [[Event]] object to be dispatched.<br/> {{EventDispatcher}} ixan310y7ki88ql6i0sbvj04lfuydwr EventDispatcher:hasEventListener 0 775 13843 13688 2019-12-03T00:35:06Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[EventDispatcher]]<br/> === Description === Checks if the [[EventDispatcher]] object has an event listener registered for the specified type of event. <source lang="lua"> (bool) = EventDispatcher:hasEventListener(type) </source> === Parameters === '''type''': (string) The type of event.<br/> === Return values === '''Returns''' (bool) A value of ''true'' if a listener of the specified type is registered; ''false'' otherwise.<br/> {{EventDispatcher}} ehywh4lm1r3rtdmfit5chkc4w7ydok2 EventDispatcher:removeAllListeners 0 1067 13844 13689 2019-12-03T00:35:26Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2018.6.1<br/> '''Class:''' [[EventDispatcher]]<br/> === Description === Removes all attached event listeners. <source lang="lua"> EventDispatcher:removeAllListeners() </source> {{EventDispatcher}} cug3c98nh9ib0q6ihpbb4w5zu5lscfj EventDispatcher:removeEventListener 0 501 13845 13690 2019-12-03T00:35:45Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[EventDispatcher]]<br/> === Description === Removes a listener from the [[EventDispatcher]] object. <br/> ''removeEventListener()'' function expects the same arguments than the ''addEventListener()'' to remove the event. If there is no matching listener registered, a call to this function has no effect. <source lang="lua"> EventDispatcher:removeEventListener(type,listener,data) </source> === Parameters === '''type''': (string) The type of event. <br/> '''listener''': (function) The listener object to remove. <br/> '''data''': (any) The data parameter that is used while registering the event. <br/> {{EventDispatcher}} p72ngzs3pemezcxl0bquiwfttmwgtqf Event system 0 2647 13680 13302 2019-12-02T17:53:03Z MoKaLux 19 ---- wikitext text/x-wiki The Ultimate Guide to Gideros Studio __TOC__ == Event system == == Introduction to events == Events are the central mechanism to handle responses and they allow to create interactive applications. All classes that dispatch events inherit from EventDispatcher. The target of an event is a listener function and an optional data value. When an event is dispatched, the registered function is called. If the optional data value is given, it is used as a first parameter while calling the listener function. <br/> In Gideros, events can be divided into two categories: * built-in events which are generated by the system (e.g. ENTER_FRAME event, touch events, timer events, etc.) * and custom events which can be generated by the user. <br/> According to their event type, built-in events can be broadcasted to multiple targets (e.g. ENTER_FRAME event, touch events, etc.) or can be dispatched to a single target (e.g. timer event). == ENTER_FRAME Event == The Gideros runtime dispatches the built-in Event.ENTER_FRAME event to Sprite instances before rendering the screen. Visual changes made by anyEvent.ENTER_FRAME listener function will be visible at next frame. <br/> This first basic example shows a moving sprite one pixel to the right at each frame. In this example, onEnterFrame function increases the x-coordinate of a sprite object at each frame: <br/> <source lang="lua"> local sprite = Sprite.new() local function onEnterFrame(event) sprite:setX(sprite:getX() + 1) end sprite:addEventListener(Event.ENTER_FRAME, onEnterFrame) </source> <br/> The next example shows 3 independent sprites moving one pixel to the right at each frame. In this example, we use the optional data parameter to move independent sprites with one common listener function: <br/> <source lang="lua"> local sprite1 = Sprite.new() local sprite2 = Sprite.new() local sprite3 = Sprite.new() local function onEnterFrame(self, event) self:setX(self:getX() + 1) end sprite1:addEventListener(Event.ENTER_FRAME, onEnterFrame, sprite1) sprite2:addEventListener(Event.ENTER_FRAME, onEnterFrame, sprite2) sprite3:addEventListener(Event.ENTER_FRAME, onEnterFrame, sprite3) </source> <br/> The last example shows subclassing of the Sprite class and registering Event.ENTER_FRAME: <br/> <source lang="lua"> MySprite = gideros.class(Sprite) function MySprite:init() self:addEventListener(Event.ENTER_FRAME, self.onEnterFrame, self) end function MySprite:onEnterFrame(event) self:setX(self:getX() + 1) end </source> <br/> '''Note:''' Event.ENTER_FRAME event is dispatched to all Sprite instances no matter these instances are on the scene tree or not. '''Note:''' When the ENTER_FRAME event dispatches, the event object contains time and deltaTime. Consider the following example: <br/> <source lang="lua"> local function onEnterFrame(event) print(event.time, event.deltaTime) end stage:addEventListener(Event.ENTER_FRAME, onEnterFrame) </source> == Mouse and touch events == Gideros runtime dispatches mouse and touch events when the the user’s finger touches the screen. Mouse events are mainly used in single-touch whereas touch events are used in multi-touch applications. <br/> The mouse and touch events are dispatched to Sprite instances which are on the scene tree. If a Sprite instance is not on the scene tree, this instance doesn’t receive mouse and touch events. <br/> '''Note:''' Even if touch or mouse doesn’t hit the Sprite instance, the instance receives mouse/touch events. <br/> The order of dispatch is determined by the hierachy of the scene tree. The Sprite instance that is drawn last (top-most sprite) receives the event first. The next sprite at the bottom of the top-most sprite receives the event second and so on. For example, assume that we have an sprite hierachy like this: <br/> [[File:Sprite_hierarchy.png]] <br/> which is constructed by the code below: <br/> <source lang="lua"> local A = Sprite.new() local B = Sprite.new() local C = Sprite.new() local D = Sprite.new() local E = Sprite.new() local F = Sprite.new() A:addChild(B) A:addChild(C) B:addChild(D) B:addChild(E) C:addChild(F) </source> <br/> In this hiearchy, the drawing order is A, B, C, D, E, F while mouse/touch event receive order is F, E, D, C, B, A. == Stopping an event dispatch == It is possible to stop the propagation of mouse and touch events. To stop an event dispatch, invoke the Event:stopPropagation() function on the Eventobject passed to the listener function. In this example below, MOUSE_DOWN event is dispatched only to F, E, D and C: <br/> <source lang="lua"> local A = Sprite.new() local B = Sprite.new() local C = Sprite.new() local D = Sprite.new() local E = Sprite.new() local F = Sprite.new() -- stop propagation at sprite C C:addEventListener(Event.MOUSE_DOWN, function(event) event:stopPropagation() end) A:addChild(B) A:addChild© B:addChild(D) B:addChild(E) C:addChild(F) </source> <br/> '''Note:''' stopPropagation is only for mouse and touch events. Because only for them there is a definite dispatching order (the display object on top receives the event first). == Timer events == The Timer class is used for executing code at specified time intervals. Each Timer object dispatches Event.TIMER event at specified frequency. The steps to use Timer class are as follows: <br/> 1- Create a new Timer object with specified frequency and specified total number of Event.TIMER events to be triggered. For example, the following code sets the frequency to 1000 miliseconds and sets the count to 5: <br/> <source lang="lua"> local timer = Timer.new(1000, 5) </source> <br/> 2- Register to the Event.TIMER event with a listener function: <br/> <source lang="lua"> local function onTimer(event) -- will be executed 5 times at 1000 milliseconds intervals end timer:addEventListener(Event.TIMER, onTimer) </source> <br/> 3- Start the timer. <br/> <source lang="lua"> timer:start() </source> <br/> 4- To stop the timer, you can use Timer:stop() function: <br/> <source lang="lua"> timer:stop() </source> <br/> Event.TIMER_COMPLETE event is triggered after finishing the specified number of timer events. <br/> <source lang="lua"> local function onTimerComplete(event) -- will be executed after the specified -- number of timer events (5) are dispatched end timer:addEventListener(Event.TIMER_COMPLETE, onTimerComplete) </source> <br/> Also, it is possible to pause and resume all the timers in your application. It is very useful when you are implementing a pause/resume functionality in your game: <br/> <source lang="lua"> -- pause all timers. -- if all timers are alredy paused, does nothing. Timer.pauseAllTimers() -- resume all timers. if all timers -- are alredy running, does nothing. Timer.resumeAllTimers() </source> == ADDED_TO_STAGE and REMOVED_FROM_STAGE Events == If a sprite is added to the scene tree, the sprite instance and all of it’s descendants receive Event.ADDED_TO_STAGE event. Similarly, if a sprite is removed from the scene tree, the sprite instance and all of it’s descendants receive Event.REMOVED_FROM_STAGE event. These events are used to detect when a Sprite instance is added to, or removed from, the scene tree. For example, by the help of these events, it is possible to register Event.ENTER_FRAME event only for the sprites that are on the scene tree: <br/> <source lang="lua"> MySprite = gideros.class(Sprite) function MySprite:init() self:addEventListener(Event.ADDED_TO_STAGE, self.onAddedToStage, self) self:addEventListener(Event.REMOVED_FROM_STAGE, self.onRemovedFromStage, self) end function MySprite:onAddedToStage(event) self:addEventListener(Event.ENTER_FRAME, self.onEnterFrame, self) end function MySprite:onRemovedFromStage(event) self:removeEventListener(Event.ENTER_FRAME, self.onEnterFrame, self) end function MySprite:onEnterFrame(event) -- enter frame logic end </source> == Custom events == To dispatch a new custom user defined event, create the event with Event.new() function and dispatch it with EventDispatcher:dispatchEvent(). Example: <br/> <source lang="lua"> ClassA = gideros.class(EventDispatcher) ClassB = gideros.class(EventDispatcher) function ClassA:funcA(event) print("funcA", self, event:getType(), event:getTarget()) end local a = ClassA.new() local b = ClassB.new() b:addEventListener("myevent", a.funcA, a) -- when b dispatches an "myevent" event, -- a.funcA will be called with 'a'as first parameter b:dispatchEvent(Event.new("myevent")) -- will print "funcA" </source> == List of all built-in events == The following tables show a list of all built-in events in Gideros SDK, with a brief explanation of what they are for. === Frame & stage events === {| class="wikitable" style="width: 70%;" |- | ENTER_FRAME || Dispatched to all Sprite instances before rendering the screen. • event.frameCount: The total number of frames that have passed since the start of the application • event.time: Time in seconds since the start of the application • event.deltaTime: The time in seconds between the last frame and the current frame |- | ADDED_TO_STAGE || Dispatched when target Sprite instance is added to the stage. |- | REMOVED_FROM_STAGE || Dispatched when target Sprite instance is removed from the stage. |} === Mouse events === {| class="wikitable" style="width: 70%;" |- | MOUSE_DOWN || Dispatched to all Sprite instances on the scene tree when user presses the mouse button or starts the first touch. • event.x: The x-coordinate of the mouse or touch • event.y: The y-coordinate of the mouse or touch |- | MOUSE_MOVE || Dispatched to all Sprite instances on the scene tree when user moves the mouse or moves the first touch. • event.x: The x-coordinate of the mouse or touch • event.y: The y-coordinate of the mouse or touch |- | MOUSE_UP || Dispatched to all Sprite instances on the scene tree when user releases the mouse button or ends the first touch. • event.x: The x-coordinate of the mouse or touch • event.y: The y-coordinate of the mouse or touch |} === Touch events === {| class="wikitable" style="width: 70%;" |- | TOUCHES_BEGIN || Dispatched to all Sprite instances on the scene tree when one or more fingers touch down. • event.touches: Array of current touches where each element contains x, y and id • event.allTouches: Array of all touches where each element contains x, y and id |- | TOUCHES_MOVE || Dispatched to all Sprite instances on the scene tree when one or more fingers move. • event.touches: Array of current touches where each element contains x, y and id • event.allTouches: Array of all touches where each element contains x, y and id |- | TOUCHES_END || Dispatched to all Sprite instances on the scene tree when one or more fingers are raised. • event.touches: Array of current touches where each element contains x, y and id • event.allTouches: Array of all touches where each element contains x, y and id |- | TOUCHES_CANCEL || Dispatched to all Sprite instances on the scene tree when a system event (such as a low-memory warning) cancels a touch event. • event.touches: Array of current touches where each element contains x, y and id • event.allTouches: Array of all touches where each element contains x, y and id |} === Application events === {| class="wikitable" style="width: 70%;" |- | APPLICATION_START || Dispatched to all event listeners (broadcast event) right after the application is launched and all Lua codes are executed. |- | APPLICATION_EXIT || Dispatched to all event listeners (broadcast event) when the application is about to exit. If an application is forced to be terminated (e.g. by double tapping the home button and kill the application), this event may not be dispatched. If you want to save your game state before exiting, save your state also on APPLICATION_SUSPEND event. |- | APPLICATION_SUSPEND || Dispatched to all event listeners (broadcast event) when the application goes to background. When an application goes to background, ENTER_FRAME and TIMER events are not dispatched until the application is resumed from background. |- | APPLICATION_RESUME || Dispatched to all event listeners (broadcast event) when the application is resumed from background. |} === Sound & Timer events === {| class="wikitable" style="width: 70%;" |- | SOUND_COMPLETE || Dispatched when a sound has finished playing. |- | TIMER || Dispatched whenever a Timer object reaches an interval specified according to the delay property. |- | TIMER_COMPLETE || Dispatched whenever a Timer object has completed the number of requests specified according to the repeatCount property. |} === UrlLoader events === {| class="wikitable" style="width: 70%;" |- | COMPLETE || Dispatched after all data is received and placed in the data property of the UrlLoader object. |- | ERROR || Dispatched when UrlLoader fails and terminates the download. |- | PROGRESS || Dispatched by UrlLoader as the notification of how far the download has progressed. • event.bytesLoaded: The number of bytes loaded • event.bytesTotal: The total number of bytes that will be loaded |} === Physics events === {| class="wikitable" style="width: 70%;" |- | BEGIN_CONTACT || Dispatched by b2.World when two fixtures begin to overlap. This is dispatched for sensors and non-sensors. This event can only occur inside the time step. • event.fixtureA: The first fixture in this contact • event.fixtureB: The second fixture in this contact |- | END_CONTACT || Dispatched by b2.World when two fixtures cease to overlap. This is dispatched for sensors and non-sensors. This may be dispatched when a body is destroyed, so this event can occur outside the time step. • event.fixtureA: The first fixture in this contact • event.fixtureB: The second fixture in this contact |- | PRE_SOLVE || Dispatched by b2.World after collision detection, but before collision resolution. • event.fixtureA: The first fixture in this contact • event.fixtureB: The second fixture in this contact |- | POST_SOLVE || Dispatched by b2.World after collision resolution. • event.fixtureA: The first fixture in this contact • event.fixtureB: The second fixture in this contact |} ---- {{Special:PrefixIndex/Event}} <br/> n8mfoun8mcgd7f9s9azlvbp9w66l9jy Font 0 58 14949 14592 2019-12-09T22:28:00Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Font --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/FontBase|FontBase]]<br/> === <translate>Description</translate> === The [[Special:MyLanguage/Font|Font]] class is used to load fonts created by "Gideros Font Creator". [[File:Font creator.png]] Gideros Font Creator exports two files: A ''.txt'' file that specifies the positions of character glyph a ''.png'' file of font. === <translate>Examples</translate> === '''Use these two files to create `Font` object as:'''<br/> <source lang="lua"> local font = Font.new("font.txt", "font.png") </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Font.getDefault|Font.getDefault]] ''<translate>Get default font</translate>''<br/><!-- GIDEROSMTD:Font.getDefault() Get default font --> [[Special:MyLanguage/Font.new|Font.new]] ''<translate>creates a new Font object</translate>''<br/><!-- GIDEROSMTD:Font.new(txtfile,imagefile,filtering) creates a new Font object --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} fjg8ahmil92cbppu89kft0i0fza75a2 Font.getDefault 0 132 13876 13701 2019-12-03T19:14:15Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2015.08<br/> '''Class:''' [[Font]]<br/> === Description === Returns Font object used as default font in Gideros. <source lang="lua"> Font.getDefault() </source> {{Font}} gfw13sg8h5vmnn2eg4c4t47i5uel7o9 Font.new 0 400 13877 13702 2019-12-03T19:14:44Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[Font]]<br/> === Description === Creates a new [[Special:MyLanguage/Font|Font]] object. <source lang="lua"> Font.new(txtfile,imagefile,filtering) </source> === Parameters === '''txtfile''': (string) <br/> '''imagefile''': (string) <br/> '''filtering''': (boolean, default = false) Whether or not the font texture is filtered. <br/> {{Font}} 74baatdvz4u61d04p4tg08sizgma0bk FontBase 0 79 14950 14593 2019-12-09T22:29:02Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:FontBase --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> === <translate>Description</translate> === [[Special:MyLanguage/FontBase|FontBase]] is the base class for [[Special:MyLanguage/Font|Font]] and [[Special:MyLanguage/TTFont|TTFont]] classes. {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/FontBase:getAdvanceX|FontBase:getAdvanceX]] <br/><!-- GIDEROSMTD:FontBase:getAdvanceX(text,letterSpacing,size) --> [[Special:MyLanguage/FontBase:getAscender|FontBase:getAscender]] ''<translate>returns the ascender of the font</translate>''<br/><!-- GIDEROSMTD:FontBase:getAscender() returns the ascender of the font --> [[Special:MyLanguage/FontBase:getBounds|FontBase:getBounds]] ''<translate>returns the tight bounding rectangle of the characters in the string specified by text</translate>''<br/><!-- GIDEROSMTD:FontBase:getBounds(text) returns the tight bounding rectangle of the characters in the string specified by text --> [[Special:MyLanguage/FontBase:getCharIndexAtOffset|FontBase:getCharIndexAtOffset]] <br/><!-- GIDEROSMTD:FontBase:getCharIndexAtOffset(text,offset,letterSpacing,size) --> [[Special:MyLanguage/FontBase:getLineHeight|FontBase:getLineHeight]] ''<translate>returns the distance from one base line to the next</translate>''<br/><!-- GIDEROSMTD:FontBase:getLineHeight() returns the distance from one base line to the next --> [[Special:MyLanguage/FontBase:layoutText|FontBase:layoutText]] ''<translate>compute layout of text with given constraints</translate>''<br/><!-- GIDEROSMTD:FontBase:layoutText(text,width,height,flags,letterSpacing,lineSpacing,tabSpace,breakChar) compute layout of text with given constraints --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === [[Special:MyLanguage/FontBase.TLF_BOTTOM|FontBase.TLF_BOTTOM]]<br/><!-- GIDEROSCST:FontBase.TLF_BOTTOM TLF_BOTTOM--> [[Special:MyLanguage/FontBase.TLF_BREAKWORDS|FontBase.TLF_BREAKWORDS]]<br/><!-- GIDEROSCST:FontBase.TLF_BREAKWORDS TLF_BREAKWORDS--> [[Special:MyLanguage/FontBase.TLF_CENTER|FontBase.TLF_CENTER]]<br/><!-- GIDEROSCST:FontBase.TLF_CENTER TLF_CENTER--> [[Special:MyLanguage/FontBase.TLF_JUSTIFIED|FontBase.TLF_JUSTIFIED]]<br/><!-- GIDEROSCST:FontBase.TLF_JUSTIFIED TLF_JUSTIFIED--> [[Special:MyLanguage/FontBase.TLF_LEFT|FontBase.TLF_LEFT]]<br/><!-- GIDEROSCST:FontBase.TLF_LEFT TLF_LEFT--> [[Special:MyLanguage/FontBase.TLF_NOWRAP|FontBase.TLF_NOWRAP]]<br/><!-- GIDEROSCST:FontBase.TLF_NOWRAP TLF_NOWRAP--> [[Special:MyLanguage/FontBase.TLF_REF_BASELINE|FontBase.TLF_REF_BASELINE]]<br/><!-- GIDEROSCST:FontBase.TLF_REF_BASELINE TLF_REF_BASELINE--> [[Special:MyLanguage/FontBase.TLF_REF_BOTTOM|FontBase.TLF_REF_BOTTOM]]<br/><!-- GIDEROSCST:FontBase.TLF_REF_BOTTOM TLF_REF_BOTTOM--> [[Special:MyLanguage/FontBase.TLF_REF_MIDDLE|FontBase.TLF_REF_MIDDLE]]<br/><!-- GIDEROSCST:FontBase.TLF_REF_MIDDLE TLF_REF_MIDDLE--> [[Special:MyLanguage/FontBase.TLF_REF_ASCENT|FontBase.TLF_REF_ASCENT]]<br/><!-- GIDEROSCST:FontBase.TLF_REF_ASCENT TLF_REF_ASCENT--> [[Special:MyLanguage/FontBase.TLF_REF_DESCENT|FontBase.TLF_REF_DESCENT]]<br/><!-- GIDEROSCST:FontBase.TLF_REF_DESCENT TLF_REF_DESCENT--> [[Special:MyLanguage/FontBase.TLF_REF_MEDIAN|FontBase.TLF_REF_MEDIAN]]<br/><!-- GIDEROSCST:FontBase.TLF_REF_MEDIAN TLF_REF_MEDIAN--> [[Special:MyLanguage/FontBase.TLF_REF_TOP|FontBase.TLF_REF_TOP]]<br/><!-- GIDEROSCST:FontBase.TLF_REF_TOP TLF_REF_TOP--> [[Special:MyLanguage/FontBase.TLF_RIGHT|FontBase.TLF_RIGHT]]<br/><!-- GIDEROSCST:FontBase.TLF_RIGHT TLF_RIGHT--> [[Special:MyLanguage/FontBase.TLF_TOP|FontBase.TLF_TOP]]<br/><!-- GIDEROSCST:FontBase.TLF_TOP TLF_TOP--> [[Special:MyLanguage/FontBase.TLF_VCENTER|FontBase.TLF_VCENTER]]<br/><!-- GIDEROSCST:FontBase.TLF_VCENTER TLF_VCENTER--> [[Special:MyLanguage/FontBase.TLF_RTL|FontBase.TLF_RTL]]<br/><!-- GIDEROSCST:FontBase.TLF_RTL TLF_RTL--> [[Special:MyLanguage/FontBase.TLF_LTR|FontBase.TLF_LTR]]<br/><!-- GIDEROSCST:FontBase.TLF_LTR TLF_LTR--> [[Special:MyLanguage/FontBase.TLF_NOBIDI|FontBase.TLF_NOBIDI]]<br/><!-- GIDEROSCST:FontBase.TLF_NOBIDI TLF_NOBIDI--> [[Special:MyLanguage/FontBase.TLF_NOSHAPING|FontBase.TLF_NOSHAPING]]<br/><!-- GIDEROSCST:FontBase.TLF_NOSHAPING TLF_NOSHAPING--> |} 522tl2izfangmoezmbqq9jt5rh406qi FontBase.TLF BOTTOM 0 1217 13887 13710 2019-12-03T19:47:56Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2017.10<br/> '''Value:''' TLF_BOTTOM<br/> '''Defined by:''' [[FontBase]]<br/> === Description === Align text to the bottom. {{FontBase}} kpff8ukg0fz8fdtrlpirlb6ptqw21vz FontBase.TLF BREAKWORDS 0 1226 13888 13711 2019-12-03T19:48:13Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2018.3.2<br/> '''Value:''' TLF_BREAKWORDS<br/> '''Defined by:''' [[FontBase]]<br/> === Description === Allow Gideros to break words that exceed required width. {{FontBase}} 4dxkkgwl61864t0q8xff3agedyesydo FontBase.TLF CENTER 0 1243 13889 13712 2019-12-03T19:48:29Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2017.10<br/> '''Value:''' TLF_CENTER<br/> '''Defined by:''' [[FontBase]]<br/> === Description === Center text horizontally. {{FontBase}} 4ewiq8vbd7lqx02onsn40huzf52lwlj FontBase.TLF JUSTIFIED 0 1367 13890 13713 2019-12-03T19:48:45Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2017.10<br/> '''Value:''' TLF_JUSTIFIED<br/> '''Defined by:''' [[FontBase]]<br/> === Description === Justify text horizontally. {{FontBase}} e2furklwe6ks1gsu5klyrue41s6mkf4 FontBase.TLF LEFT 0 1341 13891 13714 2019-12-03T19:49:03Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2017.10<br/> '''Value:''' TLF_LEFT<br/> '''Defined by:''' [[FontBase]]<br/> === Description === Align text to the left. {{FontBase}} g1ja7prxdal5h236i67swedx494w3yd FontBase.TLF LTR 0 2708 13892 13727 2019-12-03T19:49:25Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2019.XX<br/> '''Value:''' TLF_LTR<br/> '''Defined by:''' [[FontBase]]<br/> === Description === XXX Center text vertically. {{FontBase}} 18fv3vyjkx5a9bvm8zws7a6elu24mke FontBase.TLF NOBIDI 0 2709 13893 13728 2019-12-03T19:49:47Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2019.XX<br/> '''Value:''' TLF_NOBIDI<br/> '''Defined by:''' [[FontBase]]<br/> === Description === XXX Center text vertically. {{FontBase}} km4s7p2skdkh49geokeom3ci7ybfmx0 FontBase.TLF NOSHAPING 0 2710 13894 13729 2019-12-03T19:50:03Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2019.XX<br/> '''Value:''' TLF_NOSHAPING<br/> '''Defined by:''' [[FontBase]]<br/> === Description === XXX Center text vertically. {{FontBase}} niqh1kn0zjnt7biisve7as7xokl37y6 FontBase.TLF NOWRAP 0 1194 13895 13715 2019-12-03T19:50:20Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2017.10<br/> '''Value:''' TLF_NOWRAP<br/> '''Defined by:''' [[FontBase]]<br/> === Description === Don't wrap long lines. {{FontBase}} br2mjeg5pqeputfi4ue3ck08taakb6p FontBase.TLF REF ASCENT 0 2704 13896 13723 2019-12-03T19:50:36Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2019.XX<br/> '''Value:''' TLF_REF_ASCENT<br/> '''Defined by:''' [[FontBase]]<br/> === Description === XXX Center text vertically. {{FontBase}} 9dbycpv1o09c1aax8zojxmvd3w0o53n FontBase.TLF REF BASELINE 0 1331 13897 13716 2019-12-03T19:50:59Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2017.10<br/> '''Value:''' TLF_REF_BASELINE<br/> '''Defined by:''' [[FontBase]]<br/> === Description === Use baseline as reference (default). {{FontBase}} 28pxoupqtjxm1v2rt830py12sx26d3b FontBase.TLF REF BOTTOM 0 1229 13898 13717 2019-12-03T19:51:18Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2017.10<br/> '''Value:''' TLF_REF_BOTTOM<br/> '''Defined by:''' [[FontBase]]<br/> === Description === Use bottom of line as reference. {{FontBase}} nbojmy1kgadpqbhrmaxgawsrs06f3zw FontBase.TLF REF DESCENT 0 2705 13899 13724 2019-12-03T19:51:36Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2019.XX<br/> '''Value:''' TLF_REF_DESCENT<br/> '''Defined by:''' [[FontBase]]<br/> === Description === XXX Center text vertically. {{FontBase}} gwhcg78cgoxamejaf772yfm2zg9k0jr FontBase.TLF REF MEDIAN 0 2706 13900 13725 2019-12-03T19:51:53Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2019.XX<br/> '''Value:''' TLF_REF_MEDIAN<br/> '''Defined by:''' [[FontBase]]<br/> === Description === XXX Center text vertically. {{FontBase}} 201fzw0e1hqwluxqlk4s86ggxgb6upc FontBase.TLF REF MIDDLE 0 1213 13901 13718 2019-12-03T19:52:10Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2017.10<br/> '''Value:''' TLF_REF_MIDDLE<br/> '''Defined by:''' [[FontBase]]<br/> === Description === Use middle of line as reference. {{FontBase}} cywx84u9xae7ht3phijq6huelm9plty FontBase.TLF REF TOP 0 1337 13902 13719 2019-12-03T19:52:28Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2017.10<br/> '''Value:''' TLF_REF_TOP<br/> '''Defined by:''' [[FontBase]]<br/> === Description === Use top of line as reference. {{FontBase}} 4lw3o5ruz9s7bq3hg5i3xo9fe8i5ap1 FontBase.TLF RIGHT 0 1265 13903 13720 2019-12-03T19:52:45Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2017.10<br/> '''Value:''' TLF_RIGHT<br/> '''Defined by:''' [[FontBase]]<br/> === Description === Align text to the right. {{FontBase}} g6hpooj17rajt51uxph76e2kusio00r FontBase.TLF RTL 0 2707 13904 13726 2019-12-03T19:53:03Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2019.XX<br/> '''Value:''' TLF_RTL<br/> '''Defined by:''' [[FontBase]]<br/> === Description === XXX Center text vertically. {{FontBase}} trvfvlf5wsiygz0ncyjh19gxfdp8x5c FontBase.TLF TOP 0 1264 13905 13721 2019-12-03T19:53:20Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2017.10<br/> '''Value:''' TLF_TOP<br/> '''Defined by:''' [[FontBase]]<br/> === Description === Align text to the top. {{FontBase}} ercy3ox3v4mcc3dc8g7jb8x44v5flqv FontBase.TLF VCENTER 0 1187 13906 13722 2019-12-03T19:53:37Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2017.10<br/> '''Value:''' TLF_VCENTER<br/> '''Defined by:''' [[FontBase]]<br/> === Description === Center text vertically. {{FontBase}} t1bny6r4i5m6fctb401k0469uuo51ac FontBase:getAdvanceX 0 498 13881 13704 2019-12-03T19:45:17Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[FontBase]]<br/> === Description === Returns the width of the first ''size'' characters of ''text''. Note that this value is not equal to the 3rd return value (width) of ''getBounds()''. ''getBounds()'' returns a rectangle describing the bounds this string will cover<br/> whereas ''getAdvanceX()'' returns the distance to where the next string should be drawn. <source lang="lua"> (number) = FontBase:getAdvanceX(text,letterSpacing,size) </source> === Parameters === '''text''': (string) <br/> '''letterSpacing''': (number, default = 0) <br/> '''size''': (number, optional) <br/> === Return values === '''Returns''' (number) The width of the first size characters of text.<br/> {{FontBase}} 6e1yzac2l7czrdai8guivmzmcyu7j3w FontBase:getAscender 0 726 13882 13705 2019-12-03T19:45:36Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[FontBase]]<br/> === Description === Returns the ascender of the font. The ascender of a font is the distance from the baseline to the highest position characters extend to. <source lang="lua"> (number) = FontBase:getAscender() </source> === Return values === '''Returns''' (number) The ascender of the font<br/> {{FontBase}} rz6ih63i6civomz70dhfkd2gxjfe4oc FontBase:getBounds 0 170 13883 13706 2019-12-03T19:45:57Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[FontBase]]<br/> === Description === Returns the tight bounding rectangle of the characters in the string specified by ''text''. <source lang="lua"> (number), (number), (number), (number) = FontBase:getBounds(text) </source> === Parameters === '''text''': (string) <br/> === Return values === '''Returns''' (number) x coordinate of the bound <br/> '''Returns''' (number) y coordinate of the bound <br/> '''Returns''' (number) width of the bound <br/> '''Returns''' (number) height of the bound <br/> {{FontBase}} 2xyr7jzse5kjveki4f1tm14w6uryxwc FontBase:getCharIndexAtOffset 0 941 13884 13707 2019-12-03T19:46:20Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2018.3.1<br/> '''Class:''' [[FontBase]]<br/> === Description === Returns the the offset within the given text string to which correponds the given X offset in the drawn text. <source lang="lua"> (number) = FontBase:getCharIndexAtOffset(text,offset,letterSpacing,size) </source> === Parameters === '''text''': (string) <br/> '''offset''': (number) <br/> '''letterSpacing''': (number, default = 0) <br/> '''size''': (number, optional) <br/> === Return values === '''Returns''' (number) The offset within the text string. The decimal part indicate the relative distance throughout the character itself.<br/> {{FontBase}} 3907otgsarj6v50qh4apex03cuglkvp FontBase:getLineHeight 0 291 13885 13708 2019-12-03T19:46:44Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2011.6<br/> '''Class:''' [[FontBase]]<br/> === Description === Returns the distance from one base line to the next. <source lang="lua"> (number) = FontBase:getLineHeight() </source> === Return values === '''Returns''' (number) The distance from one base line to the next.<br/> {{FontBase}} hjgukzk889ss2hql8x7xoqvp577h2fr FontBase:layoutText 0 627 13886 13709 2019-12-03T19:47:14Z MoKaLux 19 wikitext text/x-wiki '''Available since:''' Gideros 2017.10<br/> '''Class:''' [[FontBase]]<br/> === Description === Compute the layout of the given text according to a given rectangular region size, layout flags and other parameters. Refer to [[TextField:setLayout]] for a description of the arguments. The returned table contains the following fields: * x,y,w,h: Computed bounding box of the full text * lines: The number of lines used to display the text * parts: Information about individual chunks of texts Each table in the part field of the returned table describes the placement of chunks of text. Their fields are: * text: The text to display in this chunk * x,y,w,h: Computed bounding box of this chunk * dx,dy: Coordinates to draw this chunk at * sep: separator character that came just after this chunk in text block * line: line number this chunk belongs to <source lang="lua"> (table) = FontBase:layoutText(text,width,height,flags,letterSpacing,lineSpacing,tabSpace,breakChar) </source> === Parameters === '''text''': (string) <br/> '''width''': (number) <br/> '''height''': (number) <br/> '''flags''': (number, default=FontBase.TLF_NOWRAP) <br/> '''letterSpacing''': (number, default = 0) <br/> '''lineSpacing''': (number, default = 0) <br/> '''tabSpace''': (number, default = 4) <br/> '''breakChar''': (string) '''optional''' <br/> === Return values === '''Returns''' (table) A table describing how to draw the given text. <br/> {{FontBase}} f1fke81vt96cjiw0yibuhmo3uzhg06i Fonts and Text 0 1745 13099 11076 2019-04-01T01:52:54Z Apollo14 8 /* TrueType Fonts */ wikitext text/x-wiki Gideros supports for both bitmap fonts (also known as BMFonts) and TrueType Fonts. Font and TTFont classes are used to load fonts and TextField class is used to create display objects for text display. === Bitmap Fonts === A bitmap font consists of an image that contains all the glyphs, and a descriptor file that defines the properties and bounds for each glyph. Also font descriptor file can contain kerning information between each glyph. You need to use an external tool to create bitmap fonts. Gideros Font Creator is one of these and you can find it inside the installation directory. Other noticeable bitmap font creator tools are: * BMFont from AngelCode (windows only) http://www.angelcode.com/products/bmfont/ * Glyph Designer (mac only) http://www.71squared.com/glyphdesigner * Hiero (java, multiplatform) http://slick.cokeandcode.com/demos/hiero.jnlp Usually these tools have the ability to enhance the bitmap fonts with effects like shadows, outlines, color gradients, and so on. And this is the main advantage of using bitmap fonts. After creating the image (e.g. font.png) and the descriptor file (e.g. font.txt or font.fnt), you can load the bitmap font as: <source lang="lua"> local font = Font.new("font.txt", "font.png") </source> And after loading the font, you can create a TextField object to display a text as: <source lang="lua"> local textField = TextField.new(font, "Hello World") </source> Finally you can add the resulting TextField object to the stage to display it: <source lang="lua"> stage:addChild(textField) </source> TextField inherits from Sprite class and therefore has all the properties and capabilities of sprites. Bitmap fonts are fast to render and fast to update. But they should be created with a tool beforehand and therefore the size of any bitmap font is fixed. Also you need to create separate bitmap fonts for each automatic image resolution suffix (e.g. @2x, @4x, etc.) and Gideros automatically selects the best bitmap font according to your scaling. === TrueType Fonts === Gideros also can load and use .ttf (TrueType font) files directly: <source lang="lua"> local font = TTFont.new("arial.ttf", 20) local text = TextField.new(font, "Hello world") text:setPosition(10, 20) stage:addChild(text) </source> Here the first parameter is the font file and second parameter is the size. While using TrueType fonts, whenever a text is created or updated, the given TrueType font is used to render the text on a texture and unfortunately it's a slow operation. This is the main disadvantage of using TrueType fonts but can be avoided with caching. You can add extra fonts in a sequence, so the first font is priority then if the character isn't found then it moves to the next. <source lang="lua"> fonts={{file="fonts/main_font.ttf",sizeMult=1.0},{file="fonts/secondary_font.ttf",sizeMult=1.0}} font=TTFont.new(fonts,100,"",3) </source> === TrueType Fonts with Caching === It's possible to cache TrueType font glyphs into an internal texture so that updating the font text won't be a slow operation anymore. For example, to create a TrueType font with all uppercase characters: <source lang="lua"> local font = TTFont.new("arial.ttf", 20, " ABCDEFGHIJKLMNOPQRSTUVWXYZ") local text = TextField.new(font, "HELLO WORLD") text:setPosition(10, 20) stage:addChild(text) </source> '''Note:''' If a character is not found in the internal cache, it simply won't be displayed. === Font Metrics === In Gideros, TextField object are positioned according to their baselines: [[File:Typography Line Terms.png]] The ascender of a font is the distance from the baseline to the highest position characters extend to. So that... <source lang="lua"> local font = TTFont.new("arial.ttf", 20) local text = TextField.new(font, "Hello world") text:setY(font:getAscender()) stage:addChild(text) </source> 67iexstywiogxu4yq3phhnegeh9j8hi Geolocation 0 81 14951 14594 2019-12-09T22:30:26Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Geolocation --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform winrt.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> === <translate>Description</translate> === The [[Special:MyLanguage/Geolocation|Geolocation]] class is used to configure the parameters and dispatching of location and heading related events. === <translate>Examples</translate> === <source lang="lua"> geolocation = Geolocation.new() local function onLocationUpdate(event) print("location: ", event.latitude, event.longitude, event.altitude) end local function onHeadingUpdate(event) print("heading: ", event.magneticHeading, event.trueHeading) end geolocation:addEventListener(Event.LOCATION_UPDATE, onLocationUpdate) geolocation:addEventListener(Event.HEADING_UPDATE, onHeadingUpdate) geolocation:start() </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Geolocation.getAccuracy|Geolocation.getAccuracy]] ''<translate>returns the previously set desired accuracy</translate>''<br/><!-- GIDEROSMTD:Geolocation.getAccuracy() returns the previously set desired accuracy --> [[Special:MyLanguage/Geolocation.getThreshold|Geolocation.getThreshold]] ''<translate>returns the previously set minimum distance threshold</translate>''<br/><!-- GIDEROSMTD:Geolocation.getThreshold() returns the previously set minimum distance threshold --> [[Special:MyLanguage/Geolocation.isAvailable|Geolocation.isAvailable]] ''<translate>does this device have the capability to determine current location?</translate>''<br/><!-- GIDEROSMTD:Geolocation.isAvailable() does this device have the capability to determine current location? --> [[Special:MyLanguage/Geolocation.isHeadingAvailable|Geolocation.isHeadingAvailable]] ''<translate>does this device have the capability to determine heading?</translate>''<br/><!-- GIDEROSMTD:Geolocation.isHeadingAvailable() does this device have the capability to determine heading? --> [[Special:MyLanguage/Geolocation.new|Geolocation.new]] ''<translate>Creates new Geolocation instance</translate>''<br/><!-- GIDEROSMTD:Geolocation.new() Creates new Geolocation instance --> [[Special:MyLanguage/Geolocation.setAccuracy|Geolocation.setAccuracy]] ''<translate>of the location data</translate>''<br/><!-- GIDEROSMTD:Geolocation.setAccuracy(accuracy) of the location data --> [[Special:MyLanguage/Geolocation.setThreshold|Geolocation.setThreshold]] ''<translate>threshold</translate>''<br/><!-- GIDEROSMTD:Geolocation.setThreshold(threshold) threshold --> [[Special:MyLanguage/Geolocation:start|Geolocation:start]] ''<translate>starts the generation of updates that report the current location and heading</translate>''<br/><!-- GIDEROSMTD:Geolocation:start() starts the generation of updates that report the current location and heading --> [[Special:MyLanguage/Geolocation:startUpdatingHeading|Geolocation:startUpdatingHeading]] ''<translate>starts the generation of updates that report the heading</translate>''<br/><!-- GIDEROSMTD:Geolocation:startUpdatingHeading() starts the generation of updates that report the heading --> [[Special:MyLanguage/Geolocation:startUpdatingLocation|Geolocation:startUpdatingLocation]] ''<translate>starts the generation of updates that report the current location</translate>''<br/><!-- GIDEROSMTD:Geolocation:startUpdatingLocation() starts the generation of updates that report the current location --> [[Special:MyLanguage/Geolocation:stop|Geolocation:stop]] ''<translate>stops the generation of updates that report the current location and heading</translate>''<br/><!-- GIDEROSMTD:Geolocation:stop() stops the generation of updates that report the current location and heading --> [[Special:MyLanguage/Geolocation:stopUpdatingHeading|Geolocation:stopUpdatingHeading]] ''<translate>stops the generation of updates that report the heading</translate>''<br/><!-- GIDEROSMTD:Geolocation:stopUpdatingHeading() stops the generation of updates that report the heading --> [[Special:MyLanguage/Geolocation:stopUpdatingLocation|Geolocation:stopUpdatingLocation]] ''<translate>stops the generation of updates that report the current location</translate>''<br/><!-- GIDEROSMTD:Geolocation:stopUpdatingLocation() stops the generation of updates that report the current location --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === [[Special:MyLanguage/Event.ERROR|Event.ERROR]]<br/><!-- GIDEROSEVT:Event.ERROR error--> [[Special:MyLanguage/Event.HEADING_UPDATE|Event.HEADING_UPDATE]]<br/><!-- GIDEROSEVT:Event.HEADING_UPDATE headingUpdate--> [[Special:MyLanguage/Event.LOCATION_UPDATE|Event.LOCATION_UPDATE]]<br/><!-- GIDEROSEVT:Event.LOCATION_UPDATE locationUpdate--> === <translate>Constants</translate> === |} gfq9ufm813kqj2a1sdnwh3pi7oh1k38 Geolocation.getAccuracy 0 180 13909 9574 2019-12-03T19:58:37Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Geolocation|Geolocation]]<br/> === <translate>Description</translate> === <translate><br /> Returns the previously set desired accuracy.<br /> <br /></translate> <source lang="lua"> (number) = Geolocation.getAccuracy() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The previously set desired accuracy</translate><br/> {{Geolocation}} l4l6llg7s7s4xvwartjakrcwk3bbokv Geolocation.getThreshold 0 801 13910 10314 2019-12-03T19:58:54Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Geolocation|Geolocation]]<br/> === <translate>Description</translate> === <translate><br /> Returns the previously set minimum distance threshold.<br /> <br /></translate> <source lang="lua"> (number) = Geolocation.getThreshold() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The previously set minimum distance threshold</translate><br/> {{Geolocation}} fdvwym5occcawcthxqwdc99kafu83vt Geolocation.isAvailable 0 1034 13911 10479 2019-12-03T19:59:12Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Geolocation|Geolocation]]<br/> === <translate>Description</translate> === <translate><br /> Returns ''true'' if the device has the capability to determine current location and this capability is enabled, ''false'' otherwise.<br /> <br /></translate> <source lang="lua"> (bool) = Geolocation.isAvailable() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>''true'' if geolocation is available, ''false'' otherwise</translate><br/> {{Geolocation}} pn03sxnl0a1511o7nj1zf2o5euterc1 Geolocation.isHeadingAvailable 0 488 13912 9967 2019-12-03T19:59:29Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Geolocation|Geolocation]]<br/> === <translate>Description</translate> === <translate><br /> Returns ''true'' if the device has the capability to determine heading, ''false'' otherwise.<br /> <br /></translate> <source lang="lua"> (bool) = Geolocation.isHeadingAvailable() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>''true'' if heading is available, ''false'' otherwise</translate><br/> {{Geolocation}} bhfl53mtqu8f8qd11vm6hoez0zh735g Geolocation.new 0 403 13913 9851 2019-12-03T19:59:48Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Geolocation|Geolocation]]<br/> === <translate>Description</translate> === <translate>Creates new Geolocation instance</translate> <source lang="lua"> Geolocation.new() </source> {{Geolocation}} 4pmu32b665y6kasdh34nbkjc75adyhs Geolocation.setAccuracy 0 1107 13914 10556 2019-12-03T20:00:03Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Geolocation|Geolocation]]<br/> === <translate>Description</translate> === <translate><br /> Sets the desired accuracy (in meters) of the location data. The receiver does its best to achieve the requested <br /> accuracy. However the actual accuracy is not guaranteed. The default value is 0 (best accuracy).<br /> <br /></translate> <source lang="lua"> Geolocation.setAccuracy(accuracy) </source> === <translate>Parameters</translate> === '''accuracy''': (number) <translate>the desired accuracy</translate> <br/> {{Geolocation}} 7zms6e0tjjx7l3we0sylxq958cs0wt1 Geolocation.setThreshold 0 563 13915 10079 2019-12-03T20:00:19Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Geolocation|Geolocation]]<br/> === <translate>Description</translate> === <translate><br /> Sets the minimum distance (in meters) threshold. If threshold distance is greater than 0, <br /> a location event will only be dispatched if the device moves by threshold. The default value <br /> is 0 (as frequently as possible).<br /> <br /></translate> <source lang="lua"> Geolocation.setThreshold(threshold) </source> === <translate>Parameters</translate> === '''threshold''': (number) <translate>the minimum distance threshold</translate> <br/> {{Geolocation}} 8szlo7c0fisjr6nyr2g9rhz2p2p2r5v Geolocation:start 0 789 13916 10680 2019-12-03T20:00:34Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Geolocation|Geolocation]]<br/> === <translate>Description</translate> === <translate><br /> Starts the generation of updates that report the current location and heading.<br /> <br /></translate> <source lang="lua"> Geolocation:start() </source> {{Geolocation}} foml8252zrvyw9t8n6tbp76254jgp2c Geolocation:startUpdatingHeading 0 893 13917 10737 2019-12-03T20:00:49Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Geolocation|Geolocation]]<br/> === <translate>Description</translate> === <translate><br /> Starts the generation of updates that report the heading.<br /> <br /></translate> <source lang="lua"> Geolocation:startUpdatingHeading() </source> {{Geolocation}} joctao4qlbblcc7xjb2wmij9wba0vy8 Geolocation:startUpdatingLocation 0 1056 13918 10844 2019-12-03T20:01:07Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Geolocation|Geolocation]]<br/> === <translate>Description</translate> === <translate><br /> Starts the generation of updates that report the current location.<br /> <br /></translate> <source lang="lua"> Geolocation:startUpdatingLocation() </source> {{Geolocation}} cudrz5t59hfk9nhkswh6qjg1tsig2sb Geolocation:stop 0 136 13919 9515 2019-12-03T20:01:23Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Geolocation|Geolocation]]<br/> === <translate>Description</translate> === <translate><br /> Stops the generation of updates that report the current location and heading.<br /> <br /></translate> <source lang="lua"> Geolocation:stop() </source> {{Geolocation}} intw8v7wt0fwq7qc5v3vz5vzrtswzh6 Geolocation:stopUpdatingHeading 0 859 13920 10711 2019-12-03T20:01:38Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Geolocation|Geolocation]]<br/> === <translate>Description</translate> === <translate><br /> Stops the generation of updates that report the heading.<br /> <br /></translate> <source lang="lua"> Geolocation:stopUpdatingHeading() </source> {{Geolocation}} lgan48qrarbrdvdudr0r6k2efma5xjx Geolocation:stopUpdatingLocation 0 285 13921 9706 2019-12-03T20:01:58Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Geolocation|Geolocation]]<br/> === <translate>Description</translate> === <translate><br /> Stops the generation of updates that report the current location.<br /> <br /></translate> <source lang="lua"> Geolocation:stopUpdatingLocation() </source> {{Geolocation}} 6qad70bqbwqv6ps3bz1cv4xny3r7kbs Gyroscope 0 41 14952 14933 2019-12-09T22:31:06Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Gyroscope --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform winrt.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> === <translate>Description</translate> === The [[Special:MyLanguage/Gyroscope|Gyroscope]] class is used to access gyroscope data. === <translate>Examples</translate> === <source lang="lua"> local gyroscope = Gyroscope.new() gyroscope:start() local angx = 0 local angy = 0 local angz = 0 local function onEnterFrame(event) local x, y, z = gyroscope:getRotationRate() angx = angx + x * event.deltaTime angy = angy + y * event.deltaTime angz = angz + z * event.deltaTime print(angx * 180 / math.pi, angy * 180 / math.pi, angz * 180 / math.pi) end stage:addEventListener("enterFrame",onEnterFrame,self) </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Gyroscope.isAvailable|Gyroscope.isAvailable]] ''<translate>does the gyroscope available?</translate>''<br/><!-- GIDEROSMTD:Gyroscope.isAvailable() does the gyroscope available? --> [[Special:MyLanguage/Gyroscope.new|Gyroscope.new]] ''<translate>Creates new Gyroscope instance</translate>''<br/><!-- GIDEROSMTD:Gyroscope.new() Creates new Gyroscope instance --> [[Special:MyLanguage/Gyroscope:getRotationRate|Gyroscope:getRotationRate]] ''<translate>returns the rotation rate in radians per second</translate>''<br/><!-- GIDEROSMTD:Gyroscope:getRotationRate() returns the rotation rate in radians per second --> [[Special:MyLanguage/Gyroscope:start|Gyroscope:start]] ''<translate>starts gyroscope updates</translate>''<br/><!-- GIDEROSMTD:Gyroscope:start() starts gyroscope updates --> [[Special:MyLanguage/Gyroscope:stop|Gyroscope:stop]] ''<translate>stops gyroscope updates</translate>''<br/><!-- GIDEROSMTD:Gyroscope:stop() stops gyroscope updates --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} 8gnnqaw89si3ytqvc9h1bjx5htbkjnc Gyroscope.isAvailable 0 277 13927 9702 2019-12-03T20:06:43Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gyroscope|Gyroscope]]<br/> === <translate>Description</translate> === <translate><br /> Returns ''true'' if gyroscope is available for this platform, ''false'' otherwise.<br /> <br /></translate> <source lang="lua"> (bool) = Gyroscope.isAvailable() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>''true'' if gyroscope is available for this platform, ''false'' otherwise.</translate><br/> {{Gyroscope}} kqbdo0em5muxjdah77glsjk16yy28x1 Gyroscope.new 0 567 13928 10074 2019-12-03T20:06:59Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gyroscope|Gyroscope]]<br/> === <translate>Description</translate> === <translate>Creates new Gyroscope instance</translate> <source lang="lua"> Gyroscope.new() </source> {{Gyroscope}} pxbxmepw3g0nxlhblzq5kwnfm14gaqa Gyroscope:getRotationRate 0 711 13929 10247 2019-12-03T20:07:18Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gyroscope|Gyroscope]]<br/> === <translate>Description</translate> === <translate><br /> Returns the device&#039;s rate of rotation around three axes in radians per second.<br /> <br /></translate> <source lang="lua"> (number), (number), (number) = Gyroscope:getRotationRate() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>rate of rotation around x</translate><br/> '''<translate>Returns</translate>''' (number) <translate>rate of rotation around y</translate><br/> '''<translate>Returns</translate>''' (number) <translate>rate of rotation around z</translate><br/> {{Gyroscope}} 1pizwlsvjtc8ue9lnm1x1o8uivwwqft Gyroscope:start 0 656 13930 10199 2019-12-03T20:07:36Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gyroscope|Gyroscope]]<br/> === <translate>Description</translate> === <translate><br /> Starts the generation of gyroscope samples.<br /> <br /></translate> <source lang="lua"> Gyroscope:start() </source> {{Gyroscope}} e45xfrnb7gl8x7mmrz8y0ldi62fhkmh Gyroscope:stop 0 405 13931 9860 2019-12-03T20:07:51Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gyroscope|Gyroscope]]<br/> === <translate>Description</translate> === <translate><br /> Stops the generation of gyroscope samples.<br /> <br /></translate> <source lang="lua"> Gyroscope:stop() </source> {{Gyroscope}} d8mcqe5qb5ofdw1uns6174ev4pxdnts JS 0 53 14953 13933 2019-12-09T22:31:56Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:JS --> '''<translate>Supported platforms</translate>:''' [[File:Platform html5.png]]<br/> '''<translate>Available since</translate>:''' in development<br/> === <translate>Description</translate> === <translate>Run JavaScript code.</translate> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/JS.eval|JS.eval]] <br/><!-- GIDEROSMTD:JS.eval(code) --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} mfckimpxogx9k0k0lsug6j66wbyl5sp JS.eval 0 732 13934 10648 2019-12-03T20:10:22Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/JS|JS]]<br/> === <translate>Description</translate> === <translate>execute arbitrary Javascript code on HTML5 platform</translate> <source lang="lua"> JS.eval(code) </source> === <translate>Parameters</translate> === '''code''': (string) <translate>JavaScript code to execute</translate> <br/> {{JS}} 4mp4jt48smgq15mrtuayyhxhaj8cisy KeyCode 0 64 14954 13936 2019-12-09T22:33:26Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:KeyCode --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> === <translate>Description</translate> === KeyCode table holds the key code constants. These map directly to a physical key on the keyboard. === <translate>Examples</translate> === '''Listening for back button''' <source lang="lua"> stage:addEventListener(Event.KEY_DOWN, function(event) if event.keyCode == KeyCode.BACK then application:exit() end end) </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === [[Special:MyLanguage/KeyCode.A|KeyCode.A]]<br/><!-- GIDEROSCST:KeyCode.A 65--> [[Special:MyLanguage/KeyCode.ALT|KeyCode.ALT]]<br/><!-- GIDEROSCST:KeyCode.ALT 18--> [[Special:MyLanguage/KeyCode.B|KeyCode.B]]<br/><!-- GIDEROSCST:KeyCode.B 66--> [[Special:MyLanguage/KeyCode.BACK|KeyCode.BACK]]<br/><!-- GIDEROSCST:KeyCode.BACK 301--> [[Special:MyLanguage/KeyCode.BACKSPACE|KeyCode.BACKSPACE]]<br/><!-- GIDEROSCST:KeyCode.BACKSPACE 8--> [[Special:MyLanguage/KeyCode.C|KeyCode.C]]<br/><!-- GIDEROSCST:KeyCode.C 67--> [[Special:MyLanguage/KeyCode.CENTER|KeyCode.CENTER]]<br/><!-- GIDEROSCST:KeyCode.CENTER 304--> [[Special:MyLanguage/KeyCode.CTRL|KeyCode.CTRL]]<br/><!-- GIDEROSCST:KeyCode.CTRL 17--> [[Special:MyLanguage/KeyCode.D|KeyCode.D]]<br/><!-- GIDEROSCST:KeyCode.D 68--> [[Special:MyLanguage/KeyCode.DELETE|KeyCode.DELETE]]<br/><!-- GIDEROSCST:KeyCode.DELETE 403--> [[Special:MyLanguage/KeyCode.DOWN|KeyCode.DOWN]]<br/><!-- GIDEROSCST:KeyCode.DOWN 40--> [[Special:MyLanguage/KeyCode.E|KeyCode.E]]<br/><!-- GIDEROSCST:KeyCode.E 69--> [[Special:MyLanguage/KeyCode.END|KeyCode.END]]<br/><!-- GIDEROSCST:KeyCode.END 401--> [[Special:MyLanguage/KeyCode.ENTER|KeyCode.ENTER]]<br/><!-- GIDEROSCST:KeyCode.ENTER 13--> [[Special:MyLanguage/KeyCode.ESC|KeyCode.ESC]]<br/><!-- GIDEROSCST:KeyCode.ESC 27--> [[Special:MyLanguage/KeyCode.F|KeyCode.F]]<br/><!-- GIDEROSCST:KeyCode.F 70--> [[Special:MyLanguage/KeyCode.G|KeyCode.G]]<br/><!-- GIDEROSCST:KeyCode.G 71--> [[Special:MyLanguage/KeyCode.H|KeyCode.H]]<br/><!-- GIDEROSCST:KeyCode.H 72--> [[Special:MyLanguage/KeyCode.HOME|KeyCode.HOME]]<br/><!-- GIDEROSCST:KeyCode.HOME 400--> [[Special:MyLanguage/KeyCode.I|KeyCode.I]]<br/><!-- GIDEROSCST:KeyCode.I 73--> [[Special:MyLanguage/KeyCode.INSERT|KeyCode.INSERT]]<br/><!-- GIDEROSCST:KeyCode.INSERT 402--> [[Special:MyLanguage/KeyCode.J|KeyCode.J]]<br/><!-- GIDEROSCST:KeyCode.J 74--> [[Special:MyLanguage/KeyCode.K|KeyCode.K]]<br/><!-- GIDEROSCST:KeyCode.K 75--> [[Special:MyLanguage/KeyCode.L|KeyCode.L]]<br/><!-- GIDEROSCST:KeyCode.L 76--> [[Special:MyLanguage/KeyCode.L1|KeyCode.L1]]<br/><!-- GIDEROSCST:KeyCode.L1 307--> [[Special:MyLanguage/KeyCode.LEFT|KeyCode.LEFT]]<br/><!-- GIDEROSCST:KeyCode.LEFT 37--> [[Special:MyLanguage/KeyCode.M|KeyCode.M]]<br/><!-- GIDEROSCST:KeyCode.M 77--> [[Special:MyLanguage/KeyCode.MENU|KeyCode.MENU]]<br/><!-- GIDEROSCST:KeyCode.MENU 303--> [[Special:MyLanguage/KeyCode.MODIFIER_ALT|KeyCode.MODIFIER_ALT]]<br/><!-- GIDEROSCST:KeyCode.MODIFIER_ALT 2--> [[Special:MyLanguage/KeyCode.MODIFIER_CTRL|KeyCode.MODIFIER_CTRL]]<br/><!-- GIDEROSCST:KeyCode.MODIFIER_CTRL 4--> [[Special:MyLanguage/KeyCode.MODIFIER_META|KeyCode.MODIFIER_META]]<br/><!-- GIDEROSCST:KeyCode.MODIFIER_META 8--> [[Special:MyLanguage/KeyCode.MODIFIER_NONE|KeyCode.MODIFIER_NONE]]<br/><!-- GIDEROSCST:KeyCode.MODIFIER_NONE 0--> [[Special:MyLanguage/KeyCode.MODIFIER_SHIFT|KeyCode.MODIFIER_SHIFT]]<br/><!-- GIDEROSCST:KeyCode.MODIFIER_SHIFT 1--> [[Special:MyLanguage/KeyCode.MOUSE_LEFT|KeyCode.MOUSE_LEFT]]<br/><!-- GIDEROSCST:KeyCode.MOUSE_LEFT 1--> [[Special:MyLanguage/KeyCode.MOUSE_MIDDLE|KeyCode.MOUSE_MIDDLE]]<br/><!-- GIDEROSCST:KeyCode.MOUSE_MIDDLE 4--> [[Special:MyLanguage/KeyCode.MOUSE_NONE|KeyCode.MOUSE_NONE]]<br/><!-- GIDEROSCST:KeyCode.MOUSE_NONE 0--> [[Special:MyLanguage/KeyCode.MOUSE_RIGHT|KeyCode.MOUSE_RIGHT]]<br/><!-- GIDEROSCST:KeyCode.MOUSE_RIGHT 2--> [[Special:MyLanguage/KeyCode.N|KeyCode.N]]<br/><!-- GIDEROSCST:KeyCode.N 78--> [[Special:MyLanguage/KeyCode.NUM_0|KeyCode.NUM_0]]<br/><!-- GIDEROSCST:KeyCode.NUM_0 48--> [[Special:MyLanguage/KeyCode.NUM_1|KeyCode.NUM_1]]<br/><!-- GIDEROSCST:KeyCode.NUM_1 49--> [[Special:MyLanguage/KeyCode.NUM_2|KeyCode.NUM_2]]<br/><!-- GIDEROSCST:KeyCode.NUM_2 50--> [[Special:MyLanguage/KeyCode.NUM_3|KeyCode.NUM_3]]<br/><!-- GIDEROSCST:KeyCode.NUM_3 51--> [[Special:MyLanguage/KeyCode.NUM_4|KeyCode.NUM_4]]<br/><!-- GIDEROSCST:KeyCode.NUM_4 52--> [[Special:MyLanguage/KeyCode.NUM_5|KeyCode.NUM_5]]<br/><!-- GIDEROSCST:KeyCode.NUM_5 53--> [[Special:MyLanguage/KeyCode.NUM_6|KeyCode.NUM_6]]<br/><!-- GIDEROSCST:KeyCode.NUM_6 54--> [[Special:MyLanguage/KeyCode.NUM_7|KeyCode.NUM_7]]<br/><!-- GIDEROSCST:KeyCode.NUM_7 55--> [[Special:MyLanguage/KeyCode.NUM_8|KeyCode.NUM_8]]<br/><!-- GIDEROSCST:KeyCode.NUM_8 56--> [[Special:MyLanguage/KeyCode.NUM_9|KeyCode.NUM_9]]<br/><!-- GIDEROSCST:KeyCode.NUM_9 57--> [[Special:MyLanguage/KeyCode.O|KeyCode.O]]<br/><!-- GIDEROSCST:KeyCode.O 79--> [[Special:MyLanguage/KeyCode.P|KeyCode.P]]<br/><!-- GIDEROSCST:KeyCode.P 80--> [[Special:MyLanguage/KeyCode.PAGEDOWN|KeyCode.PAGEDOWN]]<br/><!-- GIDEROSCST:KeyCode.PAGEDOWN 405--> [[Special:MyLanguage/KeyCode.PAGEUP|KeyCode.PAGEUP]]<br/><!-- GIDEROSCST:KeyCode.PAGEUP 404--> [[Special:MyLanguage/KeyCode.Q|KeyCode.Q]]<br/><!-- GIDEROSCST:KeyCode.Q 81--> [[Special:MyLanguage/KeyCode.R|KeyCode.R]]<br/><!-- GIDEROSCST:KeyCode.R 82--> [[Special:MyLanguage/KeyCode.R1|KeyCode.R1]]<br/><!-- GIDEROSCST:KeyCode.R1 308--> [[Special:MyLanguage/KeyCode.RIGHT|KeyCode.RIGHT]]<br/><!-- GIDEROSCST:KeyCode.RIGHT 39--> [[Special:MyLanguage/KeyCode.S|KeyCode.S]]<br/><!-- GIDEROSCST:KeyCode.S 83--> [[Special:MyLanguage/KeyCode.SEARCH|KeyCode.SEARCH]]<br/><!-- GIDEROSCST:KeyCode.SEARCH 302--> [[Special:MyLanguage/KeyCode.SELECT|KeyCode.SELECT]]<br/><!-- GIDEROSCST:KeyCode.SELECT 305--> [[Special:MyLanguage/KeyCode.SHIFT|KeyCode.SHIFT]]<br/><!-- GIDEROSCST:KeyCode.SHIFT 16--> [[Special:MyLanguage/KeyCode.SPACE|KeyCode.SPACE]]<br/><!-- GIDEROSCST:KeyCode.SPACE 32--> [[Special:MyLanguage/KeyCode.START|KeyCode.START]]<br/><!-- GIDEROSCST:KeyCode.START 306--> [[Special:MyLanguage/KeyCode.T|KeyCode.T]]<br/><!-- GIDEROSCST:KeyCode.T 84--> [[Special:MyLanguage/KeyCode.TAB|KeyCode.TAB]]<br/><!-- GIDEROSCST:KeyCode.TAB 9--> [[Special:MyLanguage/KeyCode.U|KeyCode.U]]<br/><!-- GIDEROSCST:KeyCode.U 85--> [[Special:MyLanguage/KeyCode.UP|KeyCode.UP]]<br/><!-- GIDEROSCST:KeyCode.UP 38--> [[Special:MyLanguage/KeyCode.V|KeyCode.V]]<br/><!-- GIDEROSCST:KeyCode.V 86--> [[Special:MyLanguage/KeyCode.W|KeyCode.W]]<br/><!-- GIDEROSCST:KeyCode.W 87--> [[Special:MyLanguage/KeyCode.X|KeyCode.X]]<br/><!-- GIDEROSCST:KeyCode.X 88--> [[Special:MyLanguage/KeyCode.Y|KeyCode.Y]]<br/><!-- GIDEROSCST:KeyCode.Y 89--> [[Special:MyLanguage/KeyCode.Z|KeyCode.Z]]<br/><!-- GIDEROSCST:KeyCode.Z 90--> |} 02rwd73m5cp3tjcms8wzb8flbudwc43 KeyCode.A 0 1299 13937 10453 2019-12-03T20:14:30Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 65<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} 6700b67jtcmbvid73tg82quf38vma83 KeyCode.ALT 0 1268 13938 10676 2019-12-03T20:15:03Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 18<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} sdqpsivxsirfk93xfvrt1rj6pb4s1yx KeyCode.B 0 1317 13939 10822 2019-12-03T20:15:14Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 66<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} 60r63on2fljlypv4da96s5gi39shmp7 KeyCode.BACK 0 1375 13940 10120 2019-12-03T20:15:28Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 301<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} ao8sfbt6llgwmzxo25uxdoxn3y7ni8s KeyCode.BACKSPACE 0 1281 13941 10371 2019-12-03T20:15:42Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 8<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} ga4fhuofcwsj2ieyeog0i1kru1tr1q0 KeyCode.C 0 1316 13942 10824 2019-12-03T20:15:56Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 67<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} t3bwcb4rmesou05pzho5iavayh0rcu1 KeyCode.CENTER 0 1269 13943 10678 2019-12-03T20:16:07Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 304<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} 4cjq68tf8caybnaqakvy7eh7w45o9ib KeyCode.CTRL 0 1377 13944 10299 2019-12-03T20:16:20Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 17<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} r4srxd8694y1qcdowbffpsyx511goow KeyCode.D 0 1319 13945 10475 2019-12-03T20:16:32Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 68<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} 7akbikgf6i85fu7i57djd446cf327s5 KeyCode.DELETE 0 1376 13946 10673 2019-12-03T20:16:44Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 403<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} bp8apdul3zfk3h17kn0qpjlfjpuhxlp KeyCode.DOWN 0 1371 13947 10163 2019-12-03T20:16:55Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 40<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} lg3bbqhh7byiqn3d3ksy97r9sc0iwdn KeyCode.E 0 1318 13948 10826 2019-12-03T20:17:07Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 69<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} ehy10soz0b3mafgg41lquylebfkvn2e KeyCode.END 0 1385 13949 10645 2019-12-03T20:17:18Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 401<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} lhxp7mhepptjrs7w6edfwx2d1tluczt KeyCode.ENTER 0 1261 13950 10246 2019-12-03T20:17:31Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 13<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} dxxpymecphn8de7ryi1xpguyrhe5nm7 KeyCode.ESC 0 1273 13951 10704 2019-12-03T20:17:42Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 27<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} 4u26d1xwi4mz4rmjirj8lb3fjivznqx KeyCode.F 0 1312 13952 10467 2019-12-03T20:17:53Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 70<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} 2e0kn0e4xhgoa2wazbqdbjfgz4dns1z KeyCode.G 0 1310 13953 10465 2019-12-03T20:18:05Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 71<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} 7tsnca1d8y003x418lyf3q637b7bn8c KeyCode.H 0 1315 13954 10862 2019-12-03T20:18:17Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 72<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} pfck0a5izuu23pvheuyoy6xa7rsrm2u KeyCode.HOME 0 1250 13955 10112 2019-12-03T20:18:31Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 400<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} f75e47w26wkwkx6ol5etpfgn2cih7fi KeyCode.I 0 1314 13956 10469 2019-12-03T20:18:42Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 73<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} dfdckka30gpfpjmnqlidg2pone8v0l4 KeyCode.INSERT 0 1247 13957 10040 2019-12-03T20:18:54Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 402<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} 0den6qslvsj8d1myhpycjc6vx14ewbj KeyCode.J 0 1326 13958 10474 2019-12-03T20:19:06Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 74<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} pul6jv2zktpnm2n8mj53kzlweg1yzw6 KeyCode.K 0 1325 13959 10477 2019-12-03T20:19:18Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 75<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} ib2vian6atclskgkknanpu9wbhkim40 KeyCode.L 0 1328 13960 10478 2019-12-03T20:19:29Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 76<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} spp3b6si1pzbg9tplaxgtnv5f70ercu KeyCode.L1 0 1260 13961 10623 2019-12-03T20:19:40Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 307<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} 7q26a99mmryok0kqnhlucavg16oujko KeyCode.LEFT 0 1197 13962 9594 2019-12-03T20:19:51Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 37<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} b3ythaexxr79hgjmojmylg1twggmrax KeyCode.M 0 1327 13963 10476 2019-12-03T20:20:00Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 77<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} pt5kg6eyiytithiz0z4fm9npcynxiwp KeyCode.MENU 0 1231 13964 9855 2019-12-03T20:20:11Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 303<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} 58lfpidq4rmpsfudhe47fmwx7knsklu KeyCode.MODIFIER ALT 0 1223 13965 9763 2019-12-03T20:20:22Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.4<br/> '''<translate>Value</translate>:''' 2<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate>Alt key is pressed</translate> {{KeyCode}} 7gp6ymom78bwnrucg8qc2jb2c5ddn46 KeyCode.MODIFIER CTRL 0 1297 13966 10797 2019-12-03T20:20:32Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.4<br/> '''<translate>Value</translate>:''' 4<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate>Ctrl key is pressed</translate> {{KeyCode}} chiyyq9hkmzaru0wvdfm3llsg92sr6r KeyCode.MODIFIER META 0 1364 13967 10048 2019-12-03T20:20:47Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.4<br/> '''<translate>Value</translate>:''' 8<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate>Meta key is pressed</translate> {{KeyCode}} nu6bvjnjvzp7qyawos6my2httix4t90 KeyCode.MODIFIER NONE 0 1233 13968 9879 2019-12-03T20:20:59Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.4<br/> '''<translate>Value</translate>:''' 0<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate>No modifiers</translate> {{KeyCode}} mws969gmoiqbrs3nw72jwyw895susle KeyCode.MODIFIER SHIFT 0 1241 13969 9960 2019-12-03T20:21:11Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.4<br/> '''<translate>Value</translate>:''' 1<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate>Shift key is pressed</translate> {{KeyCode}} 1d9vegslblgccz2lhalpr6fg5f79lio KeyCode.MOUSE LEFT 0 1296 13970 10788 2019-12-03T20:21:24Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.08<br/> '''<translate>Value</translate>:''' 1<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate>Left mouse button is pressed</translate> {{KeyCode}} nrul6si8a7f3ujegsldck8o19rofbue KeyCode.MOUSE MIDDLE 0 1384 13971 10200 2019-12-03T20:21:37Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.08<br/> '''<translate>Value</translate>:''' 4<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate>Mouse middle button or wheel is pressed</translate> {{KeyCode}} rtw6x5ol9e6u4hv6ac4rx33rulzpjta KeyCode.MOUSE NONE 0 1295 13972 10424 2019-12-03T20:21:50Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.08<br/> '''<translate>Value</translate>:''' 0<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate>Mouse button is not pressed</translate> {{KeyCode}} 3wfa2nl478x5yjzsgifuqy3zoyzr6t2 KeyCode.MOUSE RIGHT 0 1313 13973 10464 2019-12-03T20:22:02Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.08<br/> '''<translate>Value</translate>:''' 2<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate>Mouse right button is pressed</translate> {{KeyCode}} 7bao2mn73te0sgkunymo3gbmox71srs KeyCode.N 0 1323 13974 10471 2019-12-03T20:22:16Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 78<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} 34cymki7ta0myxuxze0q7ef13q6ovot KeyCode.NUM 0 0 1278 13975 10364 2019-12-03T20:22:28Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 48<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} tr7p02343gu3fwvqycw0np1zdz25oxi KeyCode.NUM 1 0 1277 13976 10363 2019-12-03T20:22:39Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 49<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} gilc02043bbbag2pjuxzxhsc7klzy9g KeyCode.NUM 2 0 1276 13977 10723 2019-12-03T20:22:51Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 50<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} 3lkx948zi4j9zymuja9jx3xxuqjqtbr KeyCode.NUM 3 0 1283 13978 10726 2019-12-03T20:23:02Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 51<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} 4d5ibwdu5khv3j2x1f7uuka04sho43r KeyCode.NUM 4 0 1282 13979 10369 2019-12-03T20:23:14Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 52<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} 7x7galfue6ppu7hqmwm2g7aslsy9v77 KeyCode.NUM 5 0 1280 13980 10370 2019-12-03T20:23:26Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 53<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} pebq50p8397gmen93uaucc0u7t6di45 KeyCode.NUM 6 0 1279 13981 10366 2019-12-03T20:23:37Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 54<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} 13o2ydh5ktileq2pqcv5r4puu6gwrfg KeyCode.NUM 7 0 1286 13982 10729 2019-12-03T20:23:48Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 55<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} 1yoef9s4mtvmrbcfm1cngutmcsy9rsx KeyCode.NUM 8 0 1285 13983 10727 2019-12-03T20:24:00Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 56<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} m9exesug0nzy9t3crx5wqfsk0ndymay KeyCode.NUM 9 0 1284 13984 10728 2019-12-03T20:24:12Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 57<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} glfucxn0yo969n9k6voww9poi06z7zu KeyCode.O 0 1320 13985 10830 2019-12-03T20:24:22Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 79<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} jriz86gsesivm7h6hkzksbosvyy9tvw KeyCode.P 0 1324 13986 10832 2019-12-03T20:24:43Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 80<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} kvzzxny4hpd0s0o5o4a3dlcy442gooy KeyCode.PAGEDOWN 0 2857 15008 2019-12-13T00:14:32Z MoKaLux 19 MoKaLux moved page [[KeyCode.PAGEDOWN]] to [[KeyCode.PAGE DOWN]]: missing underscore in the function name wikitext text/x-wiki #REDIRECT [[KeyCode.PAGE DOWN]] n8mjrjc4n0pp2zbo3uy7m6f4bxi1baq KeyCode.PAGEUP 0 2856 15006 2019-12-13T00:13:41Z MoKaLux 19 MoKaLux moved page [[KeyCode.PAGEUP]] to [[KeyCode.PAGE UP]]: missing underscore in the function name wikitext text/x-wiki #REDIRECT [[KeyCode.PAGE UP]] b46d2y14xn0fbljlphw9hhcrfjizkhg KeyCode.PAGE DOWN 0 1366 15007 13987 2019-12-13T00:14:32Z MoKaLux 19 MoKaLux moved page [[KeyCode.PAGEDOWN]] to [[KeyCode.PAGE DOWN]]: missing underscore in the function name wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 405<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} duiqgev9o52k4kengndoay5quo3h9o1 KeyCode.PAGE UP 0 1382 15005 13988 2019-12-13T00:13:41Z MoKaLux 19 MoKaLux moved page [[KeyCode.PAGEUP]] to [[KeyCode.PAGE UP]]: missing underscore in the function name wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 404<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} h5fi2gq3539w0e85bc9p0jokez5yeoa KeyCode.Q 0 1322 13989 10831 2019-12-03T20:25:18Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 81<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} s53n3s37no4zzthgq9dr0f243iudewd KeyCode.R 0 1308 13990 10816 2019-12-03T20:25:29Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 82<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} b9skqgz3e8kpjl9ra3stilyuks5ufqx KeyCode.R1 0 1343 13991 10574 2019-12-03T20:25:39Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 308<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} p8ywtrjhyvqtwldppmuqedtt2lvg9ls KeyCode.RIGHT 0 1294 13992 10773 2019-12-03T20:25:51Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 39<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} k75ax2v09pigp925kjfxn7zu72r977m KeyCode.S 0 1306 13993 10460 2019-12-03T20:26:05Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 83<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} sdcjmg7nqltoxvoeyrtbpq1mvu588m1 KeyCode.SEARCH 0 1372 13994 10271 2019-12-03T20:26:16Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 302<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} 01lshaz8mkhqi8grt87tjo1crts23pb KeyCode.SELECT 0 1274 13995 10339 2019-12-03T20:26:28Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 305<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} lo3d2f5yuu381shmrw0dh0fupn13yh6 KeyCode.SHIFT 0 1199 13996 9614 2019-12-03T20:26:38Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 16<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} o02dt0h37hihh5s5fhu03s98e1hp9lo KeyCode.SPACE 0 1267 13997 10297 2019-12-03T20:26:52Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 32<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} k558ussrmmtrt6vhagw3hf7ntx8v9y2 KeyCode.START 0 1202 13998 9648 2019-12-03T20:27:03Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 306<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} fnn1yopiaxznviwojgrfqmf1bmdc9hb KeyCode.T 0 1307 13999 10459 2019-12-03T20:27:15Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 84<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} h89jfh5wnwflsvvr3q2htz1vsr3cy4s KeyCode.TAB 0 1242 14000 10004 2019-12-03T20:27:26Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 9<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} jehaohbjt2ppewh348x1i6zu66lk7i2 KeyCode.U 0 1309 14001 10819 2019-12-03T20:27:38Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 85<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} f96582ehza0s9oretj4n9ffn70fa7uj KeyCode.UP 0 1340 14002 10552 2019-12-03T20:27:52Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 38<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} q7zq81zpy9pva8r3qr74guni3q2jnc0 KeyCode.V 0 1302 14003 10461 2019-12-03T20:28:03Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 86<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} rxq7a3064hb1gzus6rxppw2kpkaa0vv KeyCode.W 0 1301 14004 10454 2019-12-03T20:28:13Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 87<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} mrwtrsqxtmtt2uvpbuj9morhslhwv9f KeyCode.X 0 1305 14005 10811 2019-12-03T20:28:25Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 88<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} gj1yamo6a9hounxkdgrqy99bqf4oswg KeyCode.Y 0 1304 14006 10818 2019-12-03T20:28:39Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 89<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} ncniv6xe9ogsh9aifep7n1dndz0rl8t KeyCode.Z 0 1311 14007 10821 2019-12-03T20:28:49Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' 90<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/KeyCode|KeyCode]]<br/> === <translate>Description</translate> === <translate></translate> {{KeyCode}} amqbpjy4112u8t4wsx1aruvf1angrvg Matrix 0 27 14955 14009 2019-12-09T22:35:30Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Matrix --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> === <translate>Description</translate> === The Matrix class specifies transformation from one coordinate space to another. These transformations include translation, rotation, scaling and skewing. A 2D transformation matrix is a 3 x 3 matrix in homogeneous coordinate system: [[File:Matrix props.png]] You can get and set the values of all six of the properties in a Matrix object: ''m11'', ''m12'', ''m21'', ''m22'', ''tx'', and ''ty''. Since Gideros 2016.6, Matrix can also hold 3D (4x4) matrices. === <translate>Examples</translate> === '''Applying matrix to Sprite objects''' <source lang="lua"> local angle = math.rad(30) -- create skew matrix local m = Matrix.new(1, math.tan(angle), math.tan(angle), 1, 0, 0) -- apply to Sprite local sprite = Sprite.new() sprite:setMatrix(m) </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Matrix.new|Matrix.new]] ''<translate>creates a new Matrix object</translate>''<br/><!-- GIDEROSMTD:Matrix.new(m11,m12,m21,m22,tx,ty) creates a new Matrix object --> [[Special:MyLanguage/Matrix:getAnchorPosition|Matrix:getAnchorPosition]] ''<translate>get anchor position from matrix transformation</translate>''<br/><!-- GIDEROSMTD:Matrix:getAnchorPosition() get anchor position from matrix transformation --> [[Special:MyLanguage/Matrix:getElements|Matrix:getElements]] ''<translate>returns the elements of this matrix instance</translate>''<br/><!-- GIDEROSMTD:Matrix:getElements() returns the elements of this matrix instance --> [[Special:MyLanguage/Matrix:getM11|Matrix:getM11]] ''<translate>returns the value of the m11 component</translate>''<br/><!-- GIDEROSMTD:Matrix:getM11() returns the value of the m11 component --> [[Special:MyLanguage/Matrix:getM12|Matrix:getM12]] ''<translate>returns the value of the m12 component</translate>''<br/><!-- GIDEROSMTD:Matrix:getM12() returns the value of the m12 component --> [[Special:MyLanguage/Matrix:getM21|Matrix:getM21]] ''<translate>returns the value of the m21 component</translate>''<br/><!-- GIDEROSMTD:Matrix:getM21() returns the value of the m21 component --> [[Special:MyLanguage/Matrix:getM22|Matrix:getM22]] ''<translate>returns the value of the m22 component</translate>''<br/><!-- GIDEROSMTD:Matrix:getM22() returns the value of the m22 component --> [[Special:MyLanguage/Matrix:getMatrix|Matrix:getMatrix]] ''<translate>get all 16 elements of 4x4 matrix</translate>''<br/><!-- GIDEROSMTD:Matrix:getMatrix() get all 16 elements of 4x4 matrix --> [[Special:MyLanguage/Matrix:getPosition|Matrix:getPosition]] ''<translate>get position from matrix transformation</translate>''<br/><!-- GIDEROSMTD:Matrix:getPosition() get position from matrix transformation --> [[Special:MyLanguage/Matrix:getRotationX|Matrix:getRotationX]] ''<translate>get rotation for x axis</translate>''<br/><!-- GIDEROSMTD:Matrix:getRotationX() get rotation for x axis --> [[Special:MyLanguage/Matrix:getRotationY|Matrix:getRotationY]] ''<translate>get rotation on y axis</translate>''<br/><!-- GIDEROSMTD:Matrix:getRotationY() get rotation on y axis --> [[Special:MyLanguage/Matrix:getRotationZ|Matrix:getRotationZ]] ''<translate>get rotation for z axis</translate>''<br/><!-- GIDEROSMTD:Matrix:getRotationZ() get rotation for z axis --> [[Special:MyLanguage/Matrix:getScale|Matrix:getScale]] ''<translate>get scale from matrix transformation</translate>''<br/><!-- GIDEROSMTD:Matrix:getScale() get scale from matrix transformation --> [[Special:MyLanguage/Matrix:getScaleX|Matrix:getScaleX]] ''<translate>get scale on x axis</translate>''<br/><!-- GIDEROSMTD:Matrix:getScaleX() get scale on x axis --> [[Special:MyLanguage/Matrix:getScaleY|Matrix:getScaleY]] ''<translate>get scale on y axis</translate>''<br/><!-- GIDEROSMTD:Matrix:getScaleY() get scale on y axis --> [[Special:MyLanguage/Matrix:getScaleZ|Matrix:getScaleZ]] ''<translate>get scale on z axis</translate>''<br/><!-- GIDEROSMTD:Matrix:getScaleZ() get scale on z axis --> [[Special:MyLanguage/Matrix:getTx|Matrix:getTx]] ''<translate>returns the value of the tx component</translate>''<br/><!-- GIDEROSMTD:Matrix:getTx() returns the value of the tx component --> [[Special:MyLanguage/Matrix:getTy|Matrix:getTy]] ''<translate>returns the value of the ty component</translate>''<br/><!-- GIDEROSMTD:Matrix:getTy() returns the value of the ty component --> [[Special:MyLanguage/Matrix:getTz|Matrix:getTz]] ''<translate>returns the value of the tz component</translate>''<br/><!-- GIDEROSMTD:Matrix:getTz() returns the value of the tz component --> [[Special:MyLanguage/Matrix:getX|Matrix:getX]] ''<translate>get x position</translate>''<br/><!-- GIDEROSMTD:Matrix:getX() get x position --> [[Special:MyLanguage/Matrix:getY|Matrix:getY]] ''<translate>get y position</translate>''<br/><!-- GIDEROSMTD:Matrix:getY() get y position --> [[Special:MyLanguage/Matrix:getZ|Matrix:getZ]] ''<translate>get z position</translate>''<br/><!-- GIDEROSMTD:Matrix:getZ() get z position --> [[Special:MyLanguage/Matrix:invert|Matrix:invert]] <br/><!-- GIDEROSMTD:Matrix:invert() --> [[Special:MyLanguage/Matrix:multiply|Matrix:multiply]] ''<translate>Multiply current matrix with new one</translate>''<br/><!-- GIDEROSMTD:Matrix:multiply(matrix) Multiply current matrix with new one --> [[Special:MyLanguage/Matrix:orthographicProjection|Matrix:orthographicProjection]] <br/><!-- GIDEROSMTD:Matrix:orthographicProjection(left,right,bottom,top,near,far) --> [[Special:MyLanguage/Matrix:perspectiveProjection|Matrix:perspectiveProjection]] <br/><!-- GIDEROSMTD:Matrix:perspectiveProjection(left,right,bottom,top,near,far) --> [[Special:MyLanguage/Matrix:perspectiveProjection|Matrix:perspectiveProjection]] <br/><!-- GIDEROSMTD:Matrix:perspectiveProjection(fov,aspect,near,far) --> [[Special:MyLanguage/Matrix:rotate|Matrix:rotate]] ''<translate>combine existing rotation with provided</translate>''<br/><!-- GIDEROSMTD:Matrix:rotate(angle,x vector,y vector,z vector) combine existing rotation with provided --> [[Special:MyLanguage/Matrix:scale|Matrix:scale]] ''<translate>combine existing scale with provided scale</translate>''<br/><!-- GIDEROSMTD:Matrix:scale(x scale,y scale,z scale) combine existing scale with provided scale --> [[Special:MyLanguage/Matrix:setAnchorPosition|Matrix:setAnchorPosition]] ''<translate>transform matrix for setting anchor position</translate>''<br/><!-- GIDEROSMTD:Matrix:setAnchorPosition(x,y,z) transform matrix for setting anchor position --> [[Special:MyLanguage/Matrix:setElements|Matrix:setElements]] ''<translate>sets all 6 elements of this matrix instance</translate>''<br/><!-- GIDEROSMTD:Matrix:setElements(m11,m12,m21,m22,tx,ty) sets all 6 elements of this matrix instance --> [[Special:MyLanguage/Matrix:setM11|Matrix:setM11]] ''<translate>sets the value of the m11 component</translate>''<br/><!-- GIDEROSMTD:Matrix:setM11(m11) sets the value of the m11 component --> [[Special:MyLanguage/Matrix:setM12|Matrix:setM12]] ''<translate>sets the value of the m22 component</translate>''<br/><!-- GIDEROSMTD:Matrix:setM12(m12) sets the value of the m22 component --> [[Special:MyLanguage/Matrix:setM21|Matrix:setM21]] <br/><!-- GIDEROSMTD:Matrix:setM21(m21) --> [[Special:MyLanguage/Matrix:setM22|Matrix:setM22]] <br/><!-- GIDEROSMTD:Matrix:setM22(m22) --> [[Special:MyLanguage/Matrix:setMatrix|Matrix:setMatrix]] ''<translate>set all 16 elements of 4x4 matrix</translate>''<br/><!-- GIDEROSMTD:Matrix:setMatrix(m11,m12,m13,m14,m21,m22,m23,m24,m31,m32,m33,m34,m41,m42,m43,m44) set all 16 elements of 4x4 matrix --> [[Special:MyLanguage/Matrix:setPosition|Matrix:setPosition]] ''<translate>transform matrix for setting position</translate>''<br/><!-- GIDEROSMTD:Matrix:setPosition(x,y,z) transform matrix for setting position --> [[Special:MyLanguage/Matrix:setRotationX|Matrix:setRotationX]] ''<translate>set rotation on x axis</translate>''<br/><!-- GIDEROSMTD:Matrix:setRotationX(x rotation) set rotation on x axis --> [[Special:MyLanguage/Matrix:setRotationY|Matrix:setRotationY]] ''<translate>set rotation on y axis</translate>''<br/><!-- GIDEROSMTD:Matrix:setRotationY(y rotation) set rotation on y axis --> [[Special:MyLanguage/Matrix:setRotationZ|Matrix:setRotationZ]] ''<translate>set rotation on z axis</translate>''<br/><!-- GIDEROSMTD:Matrix:setRotationZ(z rotation) set rotation on z axis --> [[Special:MyLanguage/Matrix:setScale|Matrix:setScale]] ''<translate>transform matrix for setting scale</translate>''<br/><!-- GIDEROSMTD:Matrix:setScale(x,y,z) transform matrix for setting scale --> [[Special:MyLanguage/Matrix:setScaleX|Matrix:setScaleX]] ''<translate>set scale on x axis</translate>''<br/><!-- GIDEROSMTD:Matrix:setScaleX(x scale) set scale on x axis --> [[Special:MyLanguage/Matrix:setScaleY|Matrix:setScaleY]] ''<translate>set scale on y axis</translate>''<br/><!-- GIDEROSMTD:Matrix:setScaleY(y scale) set scale on y axis --> [[Special:MyLanguage/Matrix:setScaleZ|Matrix:setScaleZ]] ''<translate>set scale on z axis</translate>''<br/><!-- GIDEROSMTD:Matrix:setScaleZ(z scale) set scale on z axis --> [[Special:MyLanguage/Matrix:setTx|Matrix:setTx]] ''<translate>sets the value of the tx component</translate>''<br/><!-- GIDEROSMTD:Matrix:setTx(tx) sets the value of the tx component --> [[Special:MyLanguage/Matrix:setTy|Matrix:setTy]] ''<translate>sets the value of the ty component</translate>''<br/><!-- GIDEROSMTD:Matrix:setTy(ty) sets the value of the ty component --> [[Special:MyLanguage/Matrix:setTz|Matrix:setTz]] ''<translate>sets the value of the tz component</translate>''<br/><!-- GIDEROSMTD:Matrix:setTz(tz) sets the value of the tz component --> [[Special:MyLanguage/Matrix:setX|Matrix:setX]] ''<translate>set x position</translate>''<br/><!-- GIDEROSMTD:Matrix:setX(x) set x position --> [[Special:MyLanguage/Matrix:setY|Matrix:setY]] ''<translate>set y position</translate>''<br/><!-- GIDEROSMTD:Matrix:setY(y) set y position --> [[Special:MyLanguage/Matrix:setZ|Matrix:setZ]] ''<translate>set z position</translate>''<br/><!-- GIDEROSMTD:Matrix:setZ(z) set z position --> [[Special:MyLanguage/Matrix:transformPoint|Matrix:transformPoint]] <br/><!-- GIDEROSMTD:Matrix:transformPoint() --> [[Special:MyLanguage/Matrix:translate|Matrix:translate]] ''<translate>combine existing translation with provided translation</translate>''<br/><!-- GIDEROSMTD:Matrix:translate(x,y,z) combine existing translation with provided translation --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} q1ioj5szeox827klyb891zpwlnxg94z Matrix.new 0 676 14010 10225 2019-12-03T20:31:56Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate><br /> Creates a new Matrix object with the specified parameters.<br /> <br /></translate> <source lang="lua"> (any), (any) = Matrix.new(m11,m12,m21,m22,tx,ty) </source> === <translate>Parameters</translate> === '''m11''': (number, default = 1) <translate></translate> <br/> '''m12''': (number, default = 0) <translate></translate> <br/> '''m21''': (number, default = 0) <translate></translate> <br/> '''m22''': (number, default = 1) <translate></translate> <br/> '''tx''': (number, default = 0) <translate></translate> <br/> '''ty''': (number, default = 0) <translate></translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (any) <translate>New [[Special:MyLanguage/Matrix|Matrix]] object.</translate><br/> '''<translate>Returns</translate>''' (any) <translate>New [[Special:MyLanguage/Matrix|Matrix]] object.</translate><br/> {{Matrix}} 5silbjg95qj35ue9did2wsjebvg4kko Matrix:getAnchorPosition 0 771 14011 10668 2019-12-03T20:32:11Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>get anchor position from matrix transformation</translate> <source lang="lua"> (number), (number), (number) = Matrix:getAnchorPosition() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x anchor position</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y anchor position</translate><br/> '''<translate>Returns</translate>''' (number) <translate>z anchor position</translate><br/> {{Matrix}} do7qkna6zd4qpahbdldm2wbci03j500 Matrix:getElements 0 811 14012 10324 2019-12-03T20:32:25Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate><br /> Returns the elements of the matrix.<br /> [[File:Matrix props.png]]<br /> <br /></translate> <source lang="lua"> (number), (number), (number), (number), (number), (number) = Matrix:getElements() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>m11 element</translate><br/> '''<translate>Returns</translate>''' (number) <translate>m12 element</translate><br/> '''<translate>Returns</translate>''' (number) <translate>m21 element</translate><br/> '''<translate>Returns</translate>''' (number) <translate>m22 element</translate><br/> '''<translate>Returns</translate>''' (number) <translate>tx element</translate><br/> '''<translate>Returns</translate>''' (number) <translate>ty element</translate><br/> {{Matrix}} o03e6kln4zhz0i6ozgu6by2syt57qwz Matrix:getM11 0 442 14013 9913 2019-12-03T20:32:38Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate><br /> Returns the value of the ''m11'' component for this [[Special:MyLanguage/Matrix|Matrix]] instance.<br /> <br /></translate> <source lang="lua"> (number) = Matrix:getM11() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The current ''m11'' parameter.</translate><br/> {{Matrix}} pz62f61ge3qtwjg0txkvyru1gbe5og7 Matrix:getM12 0 443 14014 9914 2019-12-03T20:32:51Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate><br /> Returns the value of the ''m12'' component for this [[Special:MyLanguage/Matrix|Matrix]] instance.<br /> <br /></translate> <source lang="lua"> (number) = Matrix:getM12() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The current ''m12'' parameter.</translate><br/> {{Matrix}} i2nuvhrn0x1ubf1kqk1nq69i2kpzuf3 Matrix:getM21 0 478 14016 9944 2019-12-03T20:33:15Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate><br /> Returns the value of the ''m21'' component for this [[Special:MyLanguage/Matrix|Matrix]] instance.<br /> <br /></translate> <source lang="lua"> (number) = Matrix:getM21() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The current ''m21'' parameter.</translate><br/> {{Matrix}} kipmq1xwvnqhyvq6ho4pi5fvmopjyvf Matrix:getM22 0 493 14015 9940 2019-12-03T20:33:03Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate><br /> Returns the value of the ''m22'' component for this [[Special:MyLanguage/Matrix|Matrix]] instance.<br /> <br /></translate> <source lang="lua"> (number) = Matrix:getM22() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The current ''m22'' parameter.</translate><br/> {{Matrix}} 4kqu47brql2vp5fze7e0y3rm76vxixj Matrix:getMatrix 0 968 14017 10419 2019-12-03T20:33:36Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>get all 16 elements of 4x4 matrix</translate> <source lang="lua"> (number), (number), (number), (number), (number), (number), (number), (number), (number), (number), (number), (number), (number), (number), (number), (number) = Matrix:getMatrix() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>m11</translate><br/> '''<translate>Returns</translate>''' (number) <translate>m12</translate><br/> '''<translate>Returns</translate>''' (number) <translate>m13</translate><br/> '''<translate>Returns</translate>''' (number) <translate>m14</translate><br/> '''<translate>Returns</translate>''' (number) <translate>m21</translate><br/> '''<translate>Returns</translate>''' (number) <translate>m22</translate><br/> '''<translate>Returns</translate>''' (number) <translate>m23</translate><br/> '''<translate>Returns</translate>''' (number) <translate>m24</translate><br/> '''<translate>Returns</translate>''' (number) <translate>m31</translate><br/> '''<translate>Returns</translate>''' (number) <translate>m32</translate><br/> '''<translate>Returns</translate>''' (number) <translate>m33</translate><br/> '''<translate>Returns</translate>''' (number) <translate>m34</translate><br/> '''<translate>Returns</translate>''' (number) <translate>m41</translate><br/> '''<translate>Returns</translate>''' (number) <translate>m42</translate><br/> '''<translate>Returns</translate>''' (number) <translate>m43</translate><br/> '''<translate>Returns</translate>''' (number) <translate>m44</translate><br/> {{Matrix}} slbu613pgjyx1zu26u644tz9nw4tad0 Matrix:getPosition 0 461 14018 9924 2019-12-03T20:34:04Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>get position from matrix transformation</translate> <source lang="lua"> (number), (number), (number) = Matrix:getPosition() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x position</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y position</translate><br/> '''<translate>Returns</translate>''' (number) <translate>z position</translate><br/> {{Matrix}} 13wgiqirnflc4b134s468tvx2ohefo0 Matrix:getRotationX 0 885 14019 10733 2019-12-03T20:34:17Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>get rotation for x axis</translate> <source lang="lua"> (number) = Matrix:getRotationX() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>rotation on x axis</translate><br/> {{Matrix}} iyfl9t45nvju609zw5utx8s89i5zy6r Matrix:getRotationY 0 883 14020 10731 2019-12-03T20:34:30Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>get rotation on y axis</translate> <source lang="lua"> (number) = Matrix:getRotationY() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>rotation on y axis</translate><br/> {{Matrix}} 3moixtc0my8faijsux6eegkvginsjgn Matrix:getRotationZ 0 882 14021 10372 2019-12-03T20:34:41Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>get rotation for z axis</translate> <source lang="lua"> (number) = Matrix:getRotationZ() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>rotation around z axis</translate><br/> {{Matrix}} t79ko6ch56vtjwaa3i8dc0ftb1gvde2 Matrix:getScale 0 414 14022 9869 2019-12-03T20:34:56Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>get scale from matrix transformation</translate> <source lang="lua"> (number), (number), (number) = Matrix:getScale() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>scale on x axis</translate><br/> '''<translate>Returns</translate>''' (number) <translate>scale on y axis</translate><br/> '''<translate>Returns</translate>''' (number) <translate>scale on z axis</translate><br/> {{Matrix}} irut0qe87zzjnw2ruhymy5qunty0wb6 Matrix:getScaleX 0 685 14023 10233 2019-12-03T20:35:10Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>get scale on x axis</translate> <source lang="lua"> (number) = Matrix:getScaleX() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>scale on x axis</translate><br/> {{Matrix}} svm8u4tbi5iuw9u5xkcm81gimok7udv Matrix:getScaleY 0 682 14024 10229 2019-12-03T20:35:23Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>get scale on y axis</translate> <source lang="lua"> (number) = Matrix:getScaleY() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>scale on y axis</translate><br/> {{Matrix}} sx8i32uj8au6lf0ex219fq14j0mqziw Matrix:getScaleZ 0 681 14025 10230 2019-12-03T20:35:35Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>get scale on z axis</translate> <source lang="lua"> (number) = Matrix:getScaleZ() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>scale on z axis</translate><br/> {{Matrix}} pxt9i4mkrjonr415cmwn7jhxqy21tz5 Matrix:getTx 0 806 14026 10689 2019-12-03T20:35:48Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate><br /> Returns the value of the ''tx'' component for this [[Special:MyLanguage/Matrix|Matrix]] instance.<br /> <br /></translate> <source lang="lua"> (number) = Matrix:getTx() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The current ''tx'' parameter.</translate><br/> {{Matrix}} f73m8rc0denf3t6glx25bu52ltdfb7h Matrix:getTy 0 810 14027 10685 2019-12-03T20:36:00Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate><br /> Returns the value of the ''ty'' component for this [[Special:MyLanguage/Matrix|Matrix]] instance.<br /> <br /></translate> <source lang="lua"> (number) = Matrix:getTy() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The current ''ty'' parameter.</translate><br/> {{Matrix}} ixsem9urp6t5p9pl4a3x89textlhb42 Matrix:getTz 0 807 14028 10687 2019-12-03T20:36:16Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate><br /> Returns the value of the ''tz'' component for this [[Special:MyLanguage/Matrix|Matrix]] instance.<br /> <br /></translate> <source lang="lua"> (number) = Matrix:getTz() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The current ''tz'' parameter.</translate><br/> {{Matrix}} qhevjk7utvre821l25yzb0m9ecyud49 Matrix:getX 0 605 14029 10124 2019-12-03T20:36:28Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>get x position</translate> <source lang="lua"> (number) = Matrix:getX() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x position</translate><br/> {{Matrix}} q2h4bylkuutlf6almi7vqdl8augiobg Matrix:getY 0 609 14030 10131 2019-12-03T20:36:45Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>get y position</translate> <source lang="lua"> (number) = Matrix:getY() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>y position</translate><br/> {{Matrix}} 6py6t260pcn9g47gdnoi9gx8kcjsx73 Matrix:getZ 0 607 14031 10128 2019-12-03T20:36:57Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>get z position</translate> <source lang="lua"> (number) = Matrix:getZ() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>z position</translate><br/> {{Matrix}} r81d88whm67i1tbpfmuecrwz1iebng7 Matrix:invert 0 1010 14032 10456 2019-12-03T20:37:10Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>Inverts the matrix</translate> <source lang="lua"> Matrix:invert() </source> {{Matrix}} 1naq4jxr9gxagrjw71t3sh393q8g8rh Matrix:multiply 0 456 14033 9934 2019-12-03T20:37:21Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>Multiply current matrix with new one</translate> <source lang="lua"> Matrix:multiply(matrix) </source> === <translate>Parameters</translate> === '''matrix''': (Matrix) <translate>matrix with which to multiply current matrix</translate> <br/> {{Matrix}} a54r6t1qu35jfn3gbc9fpr8dqeqa3uu Matrix:orthographicProjection 0 985 14034 10796 2019-12-03T20:37:34Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>Replace this matrix by an orthographic projection suitable for the current 3D engine</translate> <source lang="lua"> Matrix:orthographicProjection(left,right,bottom,top,near,far) </source> === <translate>Parameters</translate> === '''left''': (number) <translate>left plane distance</translate> <br/> '''right''': (number) <translate>right plane distance</translate> <br/> '''bottom''': (number) <translate>bottom plane distance</translate> <br/> '''top''': (number) <translate>top plane distance</translate> <br/> '''near''': (number) <translate>near plane distance</translate> <br/> '''far''': (number) <translate>far plane distance</translate> <br/> {{Matrix}} r3udjqvuajg55j1xqj5seezaifcp6dn Matrix:perspectiveProjection 0 224 14035 9621 2019-12-03T20:37:52Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>replace this matrix by a perspective projection matrix suitable for the current 3D engine</translate> <source lang="lua"> Matrix:perspectiveProjection(left,right,bottom,top,near,far) </source> === <translate>Parameters</translate> === '''left''': (number) <translate>left plane distance</translate> <br/> '''right''': (number) <translate>right plane distance</translate> <br/> '''bottom''': (number) <translate>bottom plane distance</translate> <br/> '''top''': (number) <translate>top plane distance</translate> <br/> '''near''': (number) <translate>near plane distance</translate> <br/> '''far''': (number) <translate>far plane distance</translate> <br/> __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>replace this matrix by a perspective projection matrix suitable for this 3D engine (simplified form)</translate> <source lang="lua"> Matrix:perspectiveProjection(fov,aspect,near,far) </source> === <translate>Parameters</translate> === '''fov''': (number) <translate>field of view angle</translate> <br/> '''aspect''': (number) <translate>aspect ratio (width/height)</translate> <br/> '''near''': (number) <translate>near plane distance</translate> <br/> '''far''': (number) <translate>far plane distance</translate> <br/> {{Matrix}} 60ct0lhyii8l1b49k0gc0q78hkmupm3 Matrix:rotate 0 322 14036 9753 2019-12-03T20:38:19Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>Combine existing rotation with provided. It takes a x,y,z vector and an angle, and rotate the matrix around the given vector by the specified angle</translate> <source lang="lua"> Matrix:rotate(angle,x vector,y vector,z vector) </source> === <translate>Parameters</translate> === '''angle''': (number) <translate>angle of rotation in radians</translate> <br/> '''x vector''': (number) <translate>x axis vector</translate> <br/> '''y vector''': (number) <translate>y axis vector</translate> <br/> '''z vector''': (number) <translate>z axis vector</translate> <br/> {{Matrix}} ts5sfpuvr3qlflnmfxiiw5bxfr2i2sc Matrix:scale 0 1129 14037 10593 2019-12-03T20:38:32Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>combine existing scale with provided scale</translate> <source lang="lua"> Matrix:scale(x scale,y scale,z scale) </source> === <translate>Parameters</translate> === '''x scale''': (number) <translate>scale on x axis</translate> <br/> '''y scale''': (number) <translate>scale on y axis</translate> '''optional'''<br/> '''z scale''': (number) <translate>scale on z axis</translate> '''optional'''<br/> {{Matrix}} ib8vm6npjlbvwczk3fxwwd1kegidgw2 Matrix:setAnchorPosition 0 782 14038 10295 2019-12-03T20:38:45Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>transform matrix for setting anchor position</translate> <source lang="lua"> Matrix:setAnchorPosition(x,y,z) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>x anchor position</translate> <br/> '''y''': (number) <translate>y anchor position</translate> <br/> '''z''': (number) <translate>z anchor position</translate> '''optional'''<br/> {{Matrix}} tpdatptk7vjm64qrjsg0csmps55cxcr Matrix:setElements 0 993 14039 10439 2019-12-03T20:39:03Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate><br /> Sets all 6 elements of the matrix.<br /> <br /></translate> <source lang="lua"> Matrix:setElements(m11,m12,m21,m22,tx,ty) </source> === <translate>Parameters</translate> === '''m11''': (number, default = 1) <translate></translate> <br/> '''m12''': (number, default = 0) <translate></translate> <br/> '''m21''': (number, default = 0) <translate></translate> <br/> '''m22''': (number, default = 1) <translate></translate> <br/> '''tx''': (number, default = 0) <translate></translate> <br/> '''ty''': (number, default = 0) <translate></translate> <br/> {{Matrix}} daric5uihp1c21gvy8mttt5m7vfbmj9 Matrix:setM11 0 991 14040 10435 2019-12-03T20:39:19Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate><br /> Sets the value of the ''m11'' component for this [[Special:MyLanguage/Matrix|Matrix]] instance.<br /> <br /></translate> <source lang="lua"> Matrix:setM11(m11) </source> === <translate>Parameters</translate> === '''m11''': (number) <translate></translate> <br/> {{Matrix}} 2rlsxex77007wfrmes2ibj7kt80pi4t Matrix:setM12 0 992 14041 10441 2019-12-03T20:39:33Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate><br /> Sets the value of the ''m12'' component for this [[Special:MyLanguage/Matrix|Matrix]] instance.<br /> <br /></translate> <source lang="lua"> Matrix:setM12(m12) </source> === <translate>Parameters</translate> === '''m12''': (number) <translate></translate> <br/> {{Matrix}} tuoe15bvkteexdc1yfc57i3hi0fro8m Matrix:setM21 0 1004 14042 10806 2019-12-03T20:39:51Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate><br /> Sets the value of the ''m21'' component for this [[Special:MyLanguage/Matrix|Matrix]] instance.<br /> <br /></translate> <source lang="lua"> Matrix:setM21(m21) </source> === <translate>Parameters</translate> === '''m21''': (number) <translate></translate> <br/> {{Matrix}} 6ypv2lupejwaixzimufnx04quoaxq48 Matrix:setM22 0 1005 14043 10445 2019-12-03T20:40:03Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate><br /> Sets the value of the ''m22'' component for this [[Special:MyLanguage/Matrix|Matrix]] instance.<br /> <br /></translate> <source lang="lua"> Matrix:setM22(m22) </source> === <translate>Parameters</translate> === '''m22''': (number) <translate></translate> <br/> {{Matrix}} nqv8w47krlyrl9506reoormzh3sjmue Matrix:setMatrix 0 250 14044 9657 2019-12-03T20:40:20Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>set all 16 elements of 4x4 matrix</translate> <source lang="lua"> Matrix:setMatrix(m11,m12,m13,m14,m21,m22,m23,m24,m31,m32,m33,m34,m41,m42,m43,m44) </source> === <translate>Parameters</translate> === '''m11''': (number) <translate></translate> '''optional'''<br/> '''m12''': (number) <translate></translate> '''optional'''<br/> '''m13''': (number) <translate></translate> '''optional'''<br/> '''m14''': (number) <translate></translate> '''optional'''<br/> '''m21''': (number) <translate></translate> '''optional'''<br/> '''m22''': (number) <translate></translate> '''optional'''<br/> '''m23''': (number) <translate></translate> '''optional'''<br/> '''m24''': (number) <translate></translate> '''optional'''<br/> '''m31''': (number) <translate></translate> '''optional'''<br/> '''m32''': (number) <translate></translate> '''optional'''<br/> '''m33''': (number) <translate></translate> '''optional'''<br/> '''m34''': (number) <translate></translate> '''optional'''<br/> '''m41''': (number) <translate></translate> '''optional'''<br/> '''m42''': (number) <translate></translate> '''optional'''<br/> '''m43''': (number) <translate></translate> '''optional'''<br/> '''m44''': (number) <translate></translate> '''optional'''<br/> {{Matrix}} qxnwdfjc4htmno1gd138m1xj3477mwu Matrix:setPosition 0 797 14045 10682 2019-12-03T20:40:34Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>transform matrix for setting position</translate> <source lang="lua"> Matrix:setPosition(x,y,z) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>x position</translate> <br/> '''y''': (number) <translate>y position</translate> <br/> '''z''': (number) <translate>z position</translate> '''optional'''<br/> {{Matrix}} iykoouj74d5m6jlzpql5kwpb6azd5ao Matrix:setRotationX 0 154 14046 9539 2019-12-03T20:40:46Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>set rotation on x axis</translate> <source lang="lua"> Matrix:setRotationX(x rotation) </source> === <translate>Parameters</translate> === '''x rotation''': (number) <translate>rotation on x axis</translate> <br/> {{Matrix}} 979zao257ku39staxkadlyqbltmy3fn Matrix:setRotationY 0 153 14047 9537 2019-12-03T20:41:01Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>set rotation on y axis</translate> <source lang="lua"> Matrix:setRotationY(y rotation) </source> === <translate>Parameters</translate> === '''y rotation''': (number) <translate>rotation on y axis</translate> <br/> {{Matrix}} bkwa3ata9977s5u13p37zu7obod57zo Matrix:setRotationZ 0 156 14048 9536 2019-12-03T20:41:12Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>set rotation on z axis</translate> <source lang="lua"> Matrix:setRotationZ(z rotation) </source> === <translate>Parameters</translate> === '''z rotation''': (number) <translate>rotation on z axis</translate> <br/> {{Matrix}} qtrbo1464ainfdivkchfjh54c8ofc7q Matrix:setScale 0 438 14049 9893 2019-12-03T20:41:25Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>transform matrix for setting scale</translate> <source lang="lua"> Matrix:setScale(x,y,z) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>scale on x axis</translate> <br/> '''y''': (number) <translate>scale on y axis</translate> '''optional'''<br/> '''z''': (number) <translate>scale on z axis</translate> '''optional'''<br/> {{Matrix}} n83lhyubkxdkw02fyrrxq4etwfuwjvz Matrix:setScaleX 0 1063 14050 10864 2019-12-03T20:41:37Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>set scale on x axis</translate> <source lang="lua"> Matrix:setScaleX(x scale) </source> === <translate>Parameters</translate> === '''x scale''': (number) <translate>scale on x axis</translate> <br/> {{Matrix}} pjqge5c85nztt10y77psk5iycv6f97i Matrix:setScaleY 0 1054 14051 10847 2019-12-03T20:41:49Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>set scale on y axis</translate> <source lang="lua"> Matrix:setScaleY(y scale) </source> === <translate>Parameters</translate> === '''y scale''': (number) <translate>set scale on y axis</translate> <br/> {{Matrix}} jte77nrmyyqzipw6utly5fxcasjyaok Matrix:setScaleZ 0 1055 14052 10845 2019-12-03T20:42:03Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>set scale on z axis</translate> <source lang="lua"> Matrix:setScaleZ(z scale) </source> === <translate>Parameters</translate> === '''z scale''': (number) <translate>scale on z axis</translate> <br/> {{Matrix}} kw2digv193uaujgua4f58713dwy9ulm Matrix:setTx 0 399 14053 9849 2019-12-03T20:42:16Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate><br /> Sets the value of the ''tx'' component for this [[Special:MyLanguage/Matrix|Matrix]] instance.<br /> <br /></translate> <source lang="lua"> Matrix:setTx(tx) </source> === <translate>Parameters</translate> === '''tx''': (number) <translate></translate> <br/> {{Matrix}} nem6s66slid1kwo4ouhgc5kpqepac8l Matrix:setTy 0 401 14054 9848 2019-12-03T20:42:29Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate><br /> Sets the value of the ''ty'' component for this [[Special:MyLanguage/Matrix|Matrix]] instance.<br /> <br /></translate> <source lang="lua"> Matrix:setTy(ty) </source> === <translate>Parameters</translate> === '''ty''': (number) <translate></translate> <br/> {{Matrix}} gmrhd08b9t8q5x79t4wwefqz5jg54z5 Matrix:setTz 0 397 14055 9845 2019-12-03T20:42:50Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate><br /> Sets the value of the ''tz'' component for this [[Special:MyLanguage/Matrix|Matrix]] instance.<br /> <br /></translate> <source lang="lua"> Matrix:setTz(tz) </source> === <translate>Parameters</translate> === '''tz''': (number) <translate></translate> <br/> {{Matrix}} 2zkcoucl7nj6o2j35v438t26bvqeo6w Matrix:setX 0 212 14056 9622 2019-12-03T20:43:04Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>set x position</translate> <source lang="lua"> Matrix:setX(x) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>x position</translate> <br/> {{Matrix}} osvh5lbe69s8cktt289y6y86pr2puuq Matrix:setY 0 213 14057 9615 2019-12-03T20:43:19Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>set y position</translate> <source lang="lua"> Matrix:setY(y) </source> === <translate>Parameters</translate> === '''y''': (number) <translate>y position</translate> <br/> {{Matrix}} 58a1kuixsh3vytnt76cwzcmqigxoc32 Matrix:setZ 0 214 14058 9616 2019-12-03T20:43:31Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>set z position</translate> <source lang="lua"> Matrix:setZ(z) </source> === <translate>Parameters</translate> === '''z''': (number) <translate>z position</translate> <br/> {{Matrix}} 0jarjgpng5xh3d5yipxrqwqm242suu4 Matrix:transformPoint 0 1082 14059 10525 2019-12-03T20:43:45Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>Transforms the matrix</translate> <source lang="lua"> Matrix:transformPoint() </source> {{Matrix}} 5fn07irirdom133n6r5s99wngbhiomx Matrix:translate 0 997 14060 10800 2019-12-03T20:43:59Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Matrix|Matrix]]<br/> === <translate>Description</translate> === <translate>combine existing translation with provided translation</translate> <source lang="lua"> Matrix:translate(x,y,z) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>translate on x axis</translate> <br/> '''y''': (number) <translate>translate on y axis</translate> '''optional'''<br/> '''z''': (number) <translate>translate on z axis</translate> '''optional'''<br/> {{Matrix}} n2la2vwm2yvop1wwd1xvv8a1nnqc598 Mesh 0 36 14956 14062 2019-12-09T22:38:51Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Mesh --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === Mesh class is used to create and display custom constructed set of triangles (triangle meshes). It basically consists of 4 arrays: vertex, index, color (optional), textureCoordinate (optional) and a texture (optional) and it provides more than one way to set/modify these arrays. Mesh can be 2D or 3D, the latter expects an additional Z coordinate in its vertices. Additionally, 3D meshes and their children are rendered with depth testing enabled, which prevents far objects to be drawn above nearest ones, irrespective of actual drawing order. ''note:'' Mesh class doesn't do bounds check. If an element at index array points to an non-existent vertex, the application may crash. === <translate>Examples</translate> === '''Mesh usage:''' <source lang="lua"> local mesh = Mesh.new() stage:addChild(mesh) -- 1. vertex (0, 0) -- 2. vertex (100, 0) -- 3. vertex (100, 150) -- 4. vertex (0, 150) mesh:setVertexArray(0, 0, 100, 0, 100, 150, 0, 150) -- 1. triangle from 1, 2 and 3 vertex -- 2. triangle from 1, 3 and 4 vertex mesh:setIndexArray(1, 2, 3, 1, 3, 4) -- 1. vertex 0xff0000 color with 0.5 alpha -- 2. vertex 0x00ff00 color with 0.7 alpha -- 3. vertex 0x0000ff color with 1 alpha -- 4. vertex 0xffff00 color with 0 alpha mesh:setColorArray(0xff0000, 0.5, 0x00ff00, 0.7, 0x0000ff, 1.0, 0xffff00, 0) </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Mesh.new|Mesh.new]] <br/><!-- GIDEROSMTD:Mesh.new(is3d) --> [[Special:MyLanguage/Mesh:clearColorArray|Mesh:clearColorArray]] <br/><!-- GIDEROSMTD:Mesh:clearColorArray() --> [[Special:MyLanguage/Mesh:clearIndexArray|Mesh:clearIndexArray]] <br/><!-- GIDEROSMTD:Mesh:clearIndexArray() --> [[Special:MyLanguage/Mesh:clearTexture|Mesh:clearTexture]] <br/><!-- GIDEROSMTD:Mesh:clearTexture(slot) --> [[Special:MyLanguage/Mesh:clearTextureCoordinateArray|Mesh:clearTextureCoordinateArray]] <br/><!-- GIDEROSMTD:Mesh:clearTextureCoordinateArray() --> [[Special:MyLanguage/Mesh:clearVertexArray|Mesh:clearVertexArray]] <br/><!-- GIDEROSMTD:Mesh:clearVertexArray() --> [[Special:MyLanguage/Mesh:getColor|Mesh:getColor]] ''<translate>Returns color and alpha of the i-th element from color array</translate>''<br/><!-- GIDEROSMTD:Mesh:getColor(i) Returns color and alpha of the i-th element from color array --> [[Special:MyLanguage/Mesh:getColorArraySize|Mesh:getColorArraySize]] ''<translate>Get size of the Color array</translate>''<br/><!-- GIDEROSMTD:Mesh:getColorArraySize() Get size of the Color array --> [[Special:MyLanguage/Mesh:getIndex|Mesh:getIndex]] ''<translate>Returns the i-th element from index array</translate>''<br/><!-- GIDEROSMTD:Mesh:getIndex(i) Returns the i-th element from index array --> [[Special:MyLanguage/Mesh:getIndexArraySize|Mesh:getIndexArraySize]] ''<translate>Get size of the Index array</translate>''<br/><!-- GIDEROSMTD:Mesh:getIndexArraySize() Get size of the Index array --> [[Special:MyLanguage/Mesh:getTextureCoordinate|Mesh:getTextureCoordinate]] ''<translate>Returns u and v coordinate of the i-th element from texture coordinate array</translate>''<br/><!-- GIDEROSMTD:Mesh:getTextureCoordinate(i) Returns u and v coordinate of the i-th element from texture coordinate array --> [[Special:MyLanguage/Mesh:getTextureCoordinateArraySize|Mesh:getTextureCoordinateArraySize]] ''<translate>Get size of the Texture Coordinate array</translate>''<br/><!-- GIDEROSMTD:Mesh:getTextureCoordinateArraySize() Get size of the Texture Coordinate array --> [[Special:MyLanguage/Mesh:getVertex|Mesh:getVertex]] ''<translate>Returns x and y coordinate of the i-th element from vertex array</translate>''<br/><!-- GIDEROSMTD:Mesh:getVertex(i) Returns x and y coordinate of the i-th element from vertex array --> [[Special:MyLanguage/Mesh:getVertexArraySize|Mesh:getVertexArraySize]] ''<translate>Get size of the Vertices array</translate>''<br/><!-- GIDEROSMTD:Mesh:getVertexArraySize() Get size of the Vertices array --> [[Special:MyLanguage/Mesh:resizeColorArray|Mesh:resizeColorArray]] <br/><!-- GIDEROSMTD:Mesh:resizeColorArray(size) --> [[Special:MyLanguage/Mesh:resizeIndexArray|Mesh:resizeIndexArray]] <br/><!-- GIDEROSMTD:Mesh:resizeIndexArray(size) --> [[Special:MyLanguage/Mesh:resizeTextureCoordinateArray|Mesh:resizeTextureCoordinateArray]] <br/><!-- GIDEROSMTD:Mesh:resizeTextureCoordinateArray(size) --> [[Special:MyLanguage/Mesh:resizeVertexArray|Mesh:resizeVertexArray]] <br/><!-- GIDEROSMTD:Mesh:resizeVertexArray(size) --> [[Special:MyLanguage/Mesh:setColor|Mesh:setColor]] <br/><!-- GIDEROSMTD:Mesh:setColor(i,color,alpha) --> [[Special:MyLanguage/Mesh:setColorArray|Mesh:setColorArray]] <br/><!-- GIDEROSMTD:Mesh:setColorArray(colors) --> [[Special:MyLanguage/Mesh:setColors|Mesh:setColors]] <br/><!-- GIDEROSMTD:Mesh:setColors(colors) --> [[Special:MyLanguage/Mesh:setGenericArray|Mesh:setGenericArray]] <br/><!-- GIDEROSMTD:Mesh:setGenericArray(index,type,mult,count,data) --> [[Special:MyLanguage/Mesh:setIndex|Mesh:setIndex]] <br/><!-- GIDEROSMTD:Mesh:setIndex(i,index) --> [[Special:MyLanguage/Mesh:setIndexArray|Mesh:setIndexArray]] <br/><!-- GIDEROSMTD:Mesh:setIndexArray(indices) --> [[Special:MyLanguage/Mesh:setIndices|Mesh:setIndices]] <br/><!-- GIDEROSMTD:Mesh:setIndices(indices) --> [[Special:MyLanguage/Mesh:setTexture|Mesh:setTexture]] <br/><!-- GIDEROSMTD:Mesh:setTexture(texture,slot) --> [[Special:MyLanguage/Mesh:setTextureCoordinate|Mesh:setTextureCoordinate]] <br/><!-- GIDEROSMTD:Mesh:setTextureCoordinate(i,u,v) --> [[Special:MyLanguage/Mesh:setTextureCoordinateArray|Mesh:setTextureCoordinateArray]] <br/><!-- GIDEROSMTD:Mesh:setTextureCoordinateArray(textureCoordinates) --> [[Special:MyLanguage/Mesh:setTextureCoordinates|Mesh:setTextureCoordinates]] <br/><!-- GIDEROSMTD:Mesh:setTextureCoordinates(textureCoordinates) --> [[Special:MyLanguage/Mesh:setVertex|Mesh:setVertex]] <br/><!-- GIDEROSMTD:Mesh:setVertex(i,x,y) --> [[Special:MyLanguage/Mesh:setVertexArray|Mesh:setVertexArray]] <br/><!-- GIDEROSMTD:Mesh:setVertexArray(vertices) --> [[Special:MyLanguage/Mesh:setVertices|Mesh:setVertices]] <br/><!-- GIDEROSMTD:Mesh:setVertices(vertices) --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} ps1n4jopvb5e0h2jy5hqvmpfx2xljlp Mesh.new 0 325 14063 9750 2019-12-03T20:49:36Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.04.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Creates a new [[Special:MyLanguage/Mesh|Mesh]] object.<br /> <br /></translate> <source lang="lua"> Mesh.new(is3d) </source> === <translate>Parameters</translate> === '''is3d''': (boolean) <translate>Specifies that this mesh expect Z coordinate in its vertex array and is thus a 3D mesh</translate> '''optional'''<br/> {{Mesh}} avj85kdw0ei6vcwoqiwjnk2ouzxurfu Mesh:clearColorArray 0 331 14064 9777 2019-12-03T20:51:07Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Clears the color array.<br /> <br /></translate> <source lang="lua"> Mesh:clearColorArray() </source> {{Mesh}} oyu67iaykgw9j4aacdlkyo8f0nc9w47 Mesh:clearIndexArray 0 769 14065 10285 2019-12-03T20:51:21Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Clears the index array.<br /> <br /></translate> <source lang="lua"> Mesh:clearIndexArray() </source> {{Mesh}} dtoeeowe9v6tn0a3bbmqye9wk9xtqj5 Mesh:clearTexture 0 1062 14066 10510 2019-12-03T20:51:36Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Clears the texture. By default the texture at slot 0 is cleared. To clear a particular texture, pass its slot number to this method<br /> <br /></translate> <source lang="lua"> Mesh:clearTexture(slot) </source> === <translate>Parameters</translate> === '''slot''': (number) <translate>The slot number of the texture to clear. If no argument is provided, slot=0 is assumed</translate> '''optional'''<br/> {{Mesh}} j4zpqk8yx1rfr5jf6zp374eblr6ib7x Mesh:clearTextureCoordinateArray 0 792 14067 10863 2019-12-03T20:51:49Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Clears the texture coordinate array.<br /> <br /></translate> <source lang="lua"> Mesh:clearTextureCoordinateArray() </source> {{Mesh}} k45faewssmjcegtwqlx5ppupxkn3b5o Mesh:clearVertexArray 0 274 14068 9694 2019-12-03T20:52:03Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Clears the vertex array.<br /> <br /></translate> <source lang="lua"> Mesh:clearVertexArray() </source> {{Mesh}} tpylaefz6fy37nsgugzq4x5swfnbq0d Mesh:getColor 0 492 14069 9938 2019-12-03T20:52:18Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate>Returns color and alpha of the i-th element from color array</translate> <source lang="lua"> (number), (number) = Mesh:getColor(i) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>index</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>color</translate><br/> '''<translate>Returns</translate>''' (number) <translate>normalizes alpha (0-1)</translate><br/> {{Mesh}} adsss3d33c24fwtrb7uted1hsillgat Mesh:getColorArraySize 0 718 14070 10253 2019-12-03T20:52:31Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate>Get size of the Color array</translate> <source lang="lua"> (number) = Mesh:getColorArraySize() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>size of color array</translate><br/> {{Mesh}} fa2xj89d7qbgfbqcmg5r6u3l58ei4pp Mesh:getIndex 0 489 14071 9959 2019-12-03T20:52:48Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate>Returns the i-th element from index array</translate> <source lang="lua"> (number) = Mesh:getIndex(i) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>index</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>index of element</translate><br/> {{Mesh}} 140zzifgm172o4us7cptsdak4s03u18 Mesh:getIndexArraySize 0 628 14072 10143 2019-12-03T20:53:03Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate>Get size of the Index array</translate> <source lang="lua"> (number) = Mesh:getIndexArraySize() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>size of index array</translate><br/> {{Mesh}} 47vly0yssz901jv624b1j296xvi3tj4 Mesh:getTextureCoordinate 0 904 14073 10745 2019-12-03T20:53:17Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate>Returns u and v coordinate of the i-th element from texture coordinate array</translate> <source lang="lua"> (number), (number) = Mesh:getTextureCoordinate(i) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>index</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>u coordinate</translate><br/> '''<translate>Returns</translate>''' (number) <translate>v cordinate</translate><br/> {{Mesh}} 4k6w8pl5vp55rp3ztxdx6mdka1i3bm1 Mesh:getTextureCoordinateArraySize 0 299 14074 9722 2019-12-03T20:53:29Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate>Get size of the Texture Coordinate array</translate> <source lang="lua"> (number) = Mesh:getTextureCoordinateArraySize() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>size of coordinate array</translate><br/> {{Mesh}} kap0grdke9mwxj8qkaco57ifncwexxf Mesh:getVertex 0 710 14075 10633 2019-12-03T20:53:44Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate>Returns x and y coordinate of the i-th element from vertex array</translate> <source lang="lua"> (number), (number) = Mesh:getVertex(i) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>index</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x coordinate of vertex</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y coordinate of vertex</translate><br/> {{Mesh}} kdcy3ttz08xy4dqc9lxdc3tu6pw2695 Mesh:getVertexArraySize 0 337 14076 9770 2019-12-03T20:53:56Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate>Get size of the Vertices array</translate> <source lang="lua"> (number) = Mesh:getVertexArraySize() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>size of vertex array</translate><br/> {{Mesh}} 1a3zzvnkp39bqpb1br1jzj2znrh2ffz Mesh:resizeColorArray 0 594 14077 10097 2019-12-03T20:54:10Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Resizes the color array to contain ''size'' elements.<br /> <br /> If ''size'' is smaller than the current color array size, the content is reduced to its first ''size'' elements, the rest being dropped.<br /> <br /> If ''size'' is greater than the current color array size, the content is expanded by inserting at the end as many copies of 0s as needed to reach a size of ''size'' elements.<br /> <br /></translate> <source lang="lua"> Mesh:resizeColorArray(size) </source> === <translate>Parameters</translate> === '''size''': (number) <translate>new color array size</translate> <br/> {{Mesh}} oigherjy2hmwe94zewc1nygt6b239wx Mesh:resizeIndexArray 0 1131 14078 10598 2019-12-03T20:54:26Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Resizes the index array to contain ''size'' elements.<br /> <br /> If ''size'' is smaller than the current index array size, the content is reduced to its first ''size'' elements, the rest being dropped.<br /> <br /> If ''size'' is greater than the current index array size, the content is expanded by inserting at the end as many copies of 0s as needed to reach a size of ''size'' elements.<br /> <br /></translate> <source lang="lua"> Mesh:resizeIndexArray(size) </source> === <translate>Parameters</translate> === '''size''': (number) <translate>new index array size</translate> <br/> {{Mesh}} o5qc5wrfmtahadn8bskie0toaz5fctw Mesh:resizeTextureCoordinateArray 0 988 14079 10430 2019-12-03T20:54:42Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Resizes the texture coordinate array to contain ''size'' elements.<br /> <br /> If ''size'' is smaller than the current texture coordinate array size, the content is reduced to its first ''size'' elements, the rest being dropped.<br /> <br /> If ''size'' is greater than the current texture coordinate array size, the content is expanded by inserting at the end as many copies of 0s as needed to reach a size of ''size'' elements.<br /> <br /></translate> <source lang="lua"> Mesh:resizeTextureCoordinateArray(size) </source> === <translate>Parameters</translate> === '''size''': (number) <translate>new texture coordinate array size</translate> <br/> {{Mesh}} 7e2dd1lue5cruqmvh9xk67e69rn8c82 Mesh:resizeVertexArray 0 499 14080 9989 2019-12-03T20:54:57Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Resizes the vertex array to contain ''size'' elements.<br /> <br /> If ''size'' is smaller than the current vertex array size, the content is reduced to its first ''size'' elements, the rest being dropped.<br /> <br /> If ''size'' is greater than the current vertex array size, the content is expanded by inserting at the end as many copies of 0s as needed to reach a size of ''size'' elements.<br /> <br /></translate> <source lang="lua"> Mesh:resizeVertexArray(size) </source> === <translate>Parameters</translate> === '''size''': (number) <translate>new vertex array size</translate> <br/> {{Mesh}} 6v2w2opiyjf2lxpdj90rjrnzxixpqky Mesh:setColor 0 576 14081 12766 2019-12-03T20:55:21Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate> Sets a color at color array. Indices are start from 1. If the color array is not large enough, it&#039;s expanded automatically.<br /> <br /></translate> <source lang="lua"> Mesh:setColor(i,color,alpha) </source> <br /> === <translate>Parameters</translate> === '''i''': (number) <translate>index</translate> <br/> '''color''': (number) <translate>color in hexedecial value</translate> <br/> '''alpha''': (number, default=1.0) <translate>alpha value</translate> <br/> <br /> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">-- set the first 3 colors as (0xff0000, 0.5), (0x00ff00, 0.7) and (0x0000ff, 1.0). mesh:setColor(1, 0xff0000, 0.5) -- red with 0.5 alpha mesh:setColor(2, 0x00ff00, 0.7) -- green with 0.7 alpha mesh:setColor(3, 0x0000ff) -- blue with 1.0 alpha</source> {{Mesh}} ictc27s7i9sadg944tr265og0zk8vmm Mesh:setColorArray 0 175 14082 9569 2019-12-03T20:55:36Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Assigns new content to the color array, dropping all the elements contained in the color array before the call and replacing them by those specified by the parameters. It accepts multiple values or a Lua array.<br /> <br /></translate> <source lang="lua"> Mesh:setColorArray(colors) </source> === <translate>Parameters</translate> === '''colors''': (any) <translate></translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">-- set the color array as (0xff0000, 0.5), (0x00ff00, 0.7) and (0x0000ff, 1.0). mesh:setColorArray(0xff0000, 0.5, 0x00ff00, 0.7, 0x0000ff, 1.0) -- same as above mesh:setColorArray{0xff0000, 0.5, 0x00ff00, 0.7, 0x0000ff, 1.0}</source> {{Mesh}} 6q589t5rf4002miyswxnr4nprf1mqjg Mesh:setColors 0 138 14083 9517 2019-12-03T20:55:53Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Sets zero or more colors at color array with a single function call. It accepts multiple values or a Lua array.<br /> <br /></translate> <source lang="lua"> Mesh:setColors(colors) </source> === <translate>Parameters</translate> === '''colors''': (any) <translate></translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">-- set 3 colors with seperate function calls mesh:setColor(1, 0xff0000, 0.5) mesh:setColor(2, 0x00ff00, 0.7) mesh:setColor(3, 0x0000ff) -- set 3 colors with one function call mesh:setColors(1, 0xff0000, 0.5, 2, 0x00ff00, 0.7, 3, 0x0000ff, 1.0) -- same as above mesh:setColors{1, 0xff0000, 0.5, 2, 0x00ff00, 0.7, 3, 0x0000ff, 1.0} -- these two functions do nothing mesh:setColors() mesh:setColors{}</source> {{Mesh}} pjsm51f0cxxaz22xexaaybdda1zy6po Mesh:setGenericArray 0 600 14084 10125 2019-12-03T20:56:08Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.4<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Assigns new content to a generic additional array to be used by a shader. It accepts multiple values or a Lua array.<br /> <br /></translate> <source lang="lua"> Mesh:setGenericArray(index,type,mult,count,data) </source> === <translate>Parameters</translate> === '''index''': (number) <translate>The data attribute index in the corresponding shader</translate> <br/> '''type''': (number) <translate>The data type, one of Shader.Dxxx constants</translate> <br/> '''mult''': (number) <translate>The vector dimension (1 for simple values, 2 for a vec2/float2, etc)</translate> <br/> '''count''': (number) <translate>The number of elements in the array</translate> <br/> '''data''': (any) <translate>The actual values</translate> <br/> {{Mesh}} 5frp09zqgmxmil3i1kvizny5cpbja7z Mesh:setIndex 0 899 14085 10384 2019-12-03T20:56:23Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Sets a index at index array. Indices are start from 1. If the index array is not large enough, it&#039;s expanded automatically.<br /> <br /></translate> <source lang="lua"> Mesh:setIndex(i,index) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>index</translate> <br/> '''index''': (number) <translate>index</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">-- set the first 3 indices as 10, 11 and 12. mesh:setIndex(1, 10) mesh:setIndex(2, 11) mesh:setIndex(3, 12)</source> {{Mesh}} sycf3mx379xgm2urvipj4mpusueucdb Mesh:setIndexArray 0 626 14086 10153 2019-12-03T20:56:36Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Assigns new content to the index array, dropping all the elements contained in the index array before the call and replacing them by those specified by the parameters. It accepts multiple values or a Lua array.<br /> <br /></translate> <source lang="lua"> Mesh:setIndexArray(indices) </source> === <translate>Parameters</translate> === '''indices''': (any) <translate></translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">-- set the index array as 10, 11 and 12. mesh:setIndexArray(10, 11, 12) -- same as above mesh:setIndexArray{10, 11, 12}</source> {{Mesh}} r7sg9hdgq9gevsyxrxtqtdsoqv7m5lg Mesh:setIndices 0 259 14087 9675 2019-12-03T20:56:54Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Sets zero or more indices at index array with a single function call. It accepts multiple values or a Lua array.<br /> <br /></translate> <source lang="lua"> Mesh:setIndices(indices) </source> === <translate>Parameters</translate> === '''indices''': (any) <translate></translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">-- set 3 indices with seperate function calls mesh:setIndex(1, 10) mesh:setIndex(2, 11) mesh:setIndex(3, 12) -- set 3 indices with one function call mesh:setIndices(1, 10, 2, 11, 3, 12) -- same as above mesh:setIndices{1, 10, 2, 11, 3, 12} -- these two functions do nothing mesh:setIndices() mesh:setIndices{}</source> {{Mesh}} 6i4c1b56sdn85zc2qua5b8w1mnyw72g Mesh:setTexture 0 245 14088 9652 2019-12-03T20:57:08Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Sets the texture.<br /> <br /></translate> <source lang="lua"> Mesh:setTexture(texture,slot) </source> === <translate>Parameters</translate> === '''texture''': (TextureBase) <translate></translate> <br/> '''slot''': (number) <translate>The slot number which we are adding the Texture to (Meshes can have multiple Textures, one per slot). If omitted, slot=0 is assumed</translate> '''optional'''<br/> {{Mesh}} nbf0jvjd0r5mz1p3flumljpoe906e93 Mesh:setTextureCoordinate 0 923 14089 10396 2019-12-03T20:57:22Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Sets a texture coordinate at texture coordinate array. Indices are start from 1. If the texture coordinate array is not large enough, it&#039;s expanded automatically.<br /> <br /></translate> <source lang="lua"> Mesh:setTextureCoordinate(i,u,v) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>index</translate> <br/> '''u''': (number) <translate>u coordinate</translate> <br/> '''v''': (number) <translate>v coordinate</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">-- set the first 3 texture coordinates as (0, 0), (100, 0) and (0, 100). mesh:setTextureCoordinate(1, 0, 0) mesh:setTextureCoordinate(2, 100, 0) mesh:setTextureCoordinate(3, 0, 100)</source> {{Mesh}} gy404uk311jf2ler99ayr4ouubc0c0j Mesh:setTextureCoordinateArray 0 953 14090 10412 2019-12-03T20:57:36Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Assigns new content to the texture coordinate array, dropping all the elements contained in the texture coordinate array before the call and replacing them by those specified by the parameters. It accepts multiple values or a Lua array.<br /> <br /></translate> <source lang="lua"> Mesh:setTextureCoordinateArray(textureCoordinates) </source> === <translate>Parameters</translate> === '''textureCoordinates''': (any) <translate></translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">-- set the color array as (0, 0), (100, 0) and (0, 100) mesh:setTextureCoordinateArray(0, 0, 100, 0, 0, 100) -- same as above mesh:setTextureCoordinateArray{0, 0, 100, 0, 0, 100}</source> {{Mesh}} nchgqzn492frqjv91npn95ld386wdrs Mesh:setTextureCoordinates 0 761 14091 10277 2019-12-03T20:57:57Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /></translate> <source lang="lua"> Mesh:setTextureCoordinates(textureCoordinates) </source> === <translate>Parameters</translate> === '''textureCoordinates''': (any) <translate>Sets zero or more texture coordinates at texture coordinate array with a single function call. It accepts multiple values or a Lua array.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">-- set 3 texture coordinates with seperate function calls mesh:setTextureCoordinate(1, 0, 0) mesh:setTextureCoordinate(2, 100, 0) mesh:setTextureCoordinate(3, 0, 100) -- set 3 texture coordinates with one function call mesh:setTextureCoordinates(1, 0, 0, 2, 100, 0, 3, 0, 100) -- same as above mesh:setTextureCoordinates{1, 0, 0, 2, 100, 0, 3, 0, 100} -- these two functions do nothing mesh:setTextureCoordinates() mesh:setTextureCoordinates{}</source> {{Mesh}} oo992zc3uit0034njucwcbkbkeisbes Mesh:setVertex 0 679 14092 10220 2019-12-03T20:58:13Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Sets a vertex at vertex array. Indices are start from 1. If the vertex array is not large enough, it&#039;s expanded automatically.<br /> <br /></translate> <source lang="lua"> Mesh:setVertex(i,x,y) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>index</translate> <br/> '''x''': (number) <translate>x coordinate</translate> <br/> '''y''': (number) <translate>y coordinate</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">-- set the first 3 vertex positions as (100, 100), (150, 100) and (100, 150). mesh:setVertex(1, 100, 100) mesh:setVertex(2, 150, 100) mesh:setVertex(3, 100, 150)</source> {{Mesh}} 7l452pref5onf6vja5vj6fhjrukfoi7 Mesh:setVertexArray 0 369 14093 9812 2019-12-03T20:58:29Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Assigns new content to the vertex array, dropping all the elements contained in the vertex array before the call and replacing them by those specified by the parameters. It accepts multiple values or a Lua array.<br /> <br /></translate> <source lang="lua"> Mesh:setVertexArray(vertices) </source> === <translate>Parameters</translate> === '''vertices''': (any) <translate></translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">-- set the vertex array as (100, 100), (150, 100) and (100, 150) mesh:setVertexArray(100, 100, 150, 100, 100, 150) -- same as above mesh:setVertexArray{100, 100, 150, 100, 100, 150}</source> {{Mesh}} o5vu8jhh9bvo6ljyqf2muu1ffp6z9qe Mesh:setVertices 0 424 14094 9875 2019-12-03T20:58:46Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/> === <translate>Description</translate> === <translate><br /> Sets zero or more vertices at vertex array with a single function call. It accepts multiple values or a Lua array.<br /> <br /></translate> <source lang="lua"> Mesh:setVertices(vertices) </source> === <translate>Parameters</translate> === '''vertices''': (any) <translate></translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">-- set 3 vertices with seperate function calls mesh:setVertex(1, 100, 100) mesh:setVertex(2, 150, 100) mesh:setVertex(3, 100, 150) -- set 3 vertices with one function call mesh:setVertices(1, 100, 100, 2, 150, 100, 3, 100, 150) -- same as above mesh:setVertices{1, 100, 100, 2, 150, 100, 3, 100, 150} -- these two functions do nothing mesh:setVertices() mesh:setVertices{}</source> {{Mesh}} mce4u3mra830igmh4x9fcoa7q34izn1 MovieClip 0 102 14957 14096 2019-12-09T22:42:37Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:MovieClip --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === The [[Special:MyLanguage/MovieClip|MovieClip]] class inherits from the following classes: [[Special:MyLanguage/Sprite|Sprite]] > [[Special:MyLanguage/EventDispatcher|EventDispatcher]]. The [[Special:MyLanguage/MovieClip|MovieClip]] class is used create static timedlined animations. The timeline parameters are given as an array. Each array element specifies one timeline element and consists of the starting frame, ending frame, sprite and optional tweening parameters. Frame numbers start from 1. When a [[Special:MyLanguage/MovieClip|MovieClip]] object finishes it playing (by reaching its final frame or a frame with stop action), it dispatches an [[Special:MyLanguage/Event.COMPLETE|Event.COMPLETE]] event. The following properties can be tweened: *''x'' *''y'' *''rotation'' *''scale'' *''scaleX'' *''scaleY'' *''alpha'' Additionally [[Special:MyLanguage/MovieClip|MovieClip]] uses set function to tween properties, so if you override provided object's set function by adding new parameters it can accept, then you can tween those new parameters too. The following easing functions can be used: * ''"inBack"'' * ''"outBack"'' * ''"inOutBack"'' * ''"inBounce"'' * ''"outBounce"'' * ''"inOutBounce"'' * ''"inCircular"'' * ''"outCircular"'' * ''"inOutCircular"' * ''"inCubic"'' * ''"outCubic"'' * ''"inOutCubic"'' * ''"inElastic"'' * ''"outElastic"'' * ''"inOutElastic"'' * ''"inExponential"'' * ''"outExponential"'' * ''"inOutExponential"'' * ''"linear"'' * ''"inQuadratic"'' * ''"outQuadratic"'' * ''"inOutQuadratic"'' * ''"inQuartic"'' * ''"outQuartic"'' * ''"inOutQuartic"'' * ''"inQuintic"'' * ''"outQuintic"'' * ''"inOutQuintic"'' * ''"inSine"'' * ''"outSine"'' * ''"inOutSine"'' Following examples demonstrate the possible uses of the MovieClip class. === <translate>Examples</translate> === <source lang="lua"> -- construct a 100 frame animation where x coordinate of sprite tweens from 0 to 200 linearly local mc = MovieClip.new{ {1, 100, sprite, {x = {0, 200, "linear"}}} } -- construct a 100 frame animation where x coordinate of sprite is 50 (constant) and -- y coordinate of sprite tweens from 50 to 150 by using inBounce function local mc = MovieClip.new{ {1, 100, sprite, {x = 50, y = {50, 150, "inBounce"}}} } -- construct a 200 frame animation where sprite1 and sprite2 tweens differently -- here sprite1 is visible between frames [1, 150] -- and sprite2 is visible between frames [100, 200] local mc = MovieClip.new{ {1, 100, sprite1, {x = {0, 200, "linear"}}}, {50, 150, sprite1, {y = {0, 100, "linear"}, alpha = {0, 1, "easeOut"}}}, {100, 200, sprite2, {x = {0, 200, "linear"}}}, } -- construct a looping 6 frame animation where each frame is a different sprite local mc = MovieClip.new{ {1, 1, frame1}, {2, 2, frame2}, {3, 3, frame3}, {4, 4, frame4}, {5, 5, frame5}, {6, 6, frame6}, } mc:setGotoAction(6, 1) -- if the animation reaches frame 6 then go to frame 1 -- construct a looping 6 frame animation playing 5 times slower than the previous example local mc = MovieClip.new{ {1, 5, frame1}, {5, 10, frame2}, {11, 15, frame3}, {16, 20, frame4}, {21, 25, frame5}, {26, 30, frame6}, } mc:setGotoAction(30, 1) -- if the animation reaches frame 30 then go to frame 1 </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/MovieClip.new|MovieClip.new]] ''<translate>creates a new MovieClip object</translate>''<br/><!-- GIDEROSMTD:MovieClip.new(timeline) creates a new MovieClip object --> [[Special:MyLanguage/MovieClip:clearAction|MovieClip:clearAction]] ''<translate>clears the action at the specified frame</translate>''<br/><!-- GIDEROSMTD:MovieClip:clearAction(frame) clears the action at the specified frame --> [[Special:MyLanguage/MovieClip:getFrame|MovieClip:getFrame]] <br/><!-- GIDEROSMTD:MovieClip:getFrame() --> [[Special:MyLanguage/MovieClip:gotoAndPlay|MovieClip:gotoAndPlay]] ''<translate>goes to the specified frame and starts playing</translate>''<br/><!-- GIDEROSMTD:MovieClip:gotoAndPlay(frame,reverse) goes to the specified frame and starts playing --> [[Special:MyLanguage/MovieClip:gotoAndStop|MovieClip:gotoAndStop]] ''<translate>goes to the specified frame and stops</translate>''<br/><!-- GIDEROSMTD:MovieClip:gotoAndStop(frame) goes to the specified frame and stops --> [[Special:MyLanguage/MovieClip:play|MovieClip:play]] ''<translate>starts playing the movie clip</translate>''<br/><!-- GIDEROSMTD:MovieClip:play(reverse) starts playing the movie clip --> [[Special:MyLanguage/MovieClip:setGotoAction|MovieClip:setGotoAction]] ''<translate>sets a &quot;go to&quot; action to the specified frame</translate>''<br/><!-- GIDEROSMTD:MovieClip:setGotoAction(frame,destframe) sets a &quot;go to&quot; action to the specified frame --> [[Special:MyLanguage/MovieClip:setReverseAction|MovieClip:setReverseAction]] ''<translate>sets a &quot;reverse&quot; action to the specified frame</translate>''<br/><!-- GIDEROSMTD:MovieClip:setReverseAction(frame) sets a &quot;reverse&quot; action to the specified frame --> [[Special:MyLanguage/MovieClip:setStopAction|MovieClip:setStopAction]] ''<translate>sets a &quot;stop&quot; action to the specified frame</translate>''<br/><!-- GIDEROSMTD:MovieClip:setStopAction(frame) sets a &quot;stop&quot; action to the specified frame --> [[Special:MyLanguage/MovieClip:stop|MovieClip:stop]] ''<translate>stops playing the movie clip</translate>''<br/><!-- GIDEROSMTD:MovieClip:stop() stops playing the movie clip --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === [[Special:MyLanguage/Event.COMPLETE|Event.COMPLETE]]<br/><!-- GIDEROSEVT:Event.COMPLETE complete--> === <translate>Constants</translate> === |} p5232nj2z418vl7lspxk1kffe1k38ju MovieClip.new 0 282 14098 9701 2019-12-03T21:10:24Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/MovieClip|MovieClip]]<br/> === <translate>Description</translate> === <translate><br /> Creates a new [[Special:MyLanguage/MovieClip|MovieClip]] object. After constructing the MovieClip object, it starts playing. You don&#039;t need to<br /> call [[MovieClip:play]].<br /> <br /></translate> <source lang="lua"> MovieClip.new(timeline) </source> === <translate>Parameters</translate> === '''timeline''': (table) <translate>array of timeline elements</translate> <br/> {{MovieClip}} ht87fw30pz2gnpusknikd2786a2lv4h MovieClip:clearAction 0 1071 14099 10851 2019-12-03T21:10:41Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/MovieClip|MovieClip]]<br/> === <translate>Description</translate> === <translate><br /> Clears the action (goto or stop) at the specified frame.<br /> <br /> <br /></translate> <source lang="lua"> MovieClip:clearAction(frame) </source> === <translate>Parameters</translate> === '''frame''': (int) <translate>the frame number</translate> <br/> {{MovieClip}} i207xfir1dnbwy4u0jlt8n6k1ry5jhm MovieClip:getFrame 0 644 14100 10179 2019-12-03T21:10:55Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/MovieClip|MovieClip]]<br/> === <translate>Description</translate> === <translate><br /> Returns the current frame of the MovieClip.<br /> <br /></translate> <source lang="lua"> (number) = MovieClip:getFrame() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The current frame number.</translate><br/> {{MovieClip}} 95viako9sju5xoewce6feyar7ie9hpj MovieClip:gotoAndPlay 0 1128 14101 10587 2019-12-03T21:11:06Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/MovieClip|MovieClip]]<br/> === <translate>Description</translate> === <translate><br /> Goes to the specified frame and starts playing.<br /> <br /></translate> <source lang="lua"> MovieClip:gotoAndPlay(frame,reverse) </source> === <translate>Parameters</translate> === '''frame''': (int) <translate>the frame number</translate> <br/> '''reverse''': (boolean) <translate>indicates to play backwards</translate> <br/> {{MovieClip}} e7lltoisjap9mkuuqe4o7d4kufm9tap MovieClip:gotoAndStop 0 467 14102 9942 2019-12-03T21:11:20Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/MovieClip|MovieClip]]<br/> === <translate>Description</translate> === <translate><br /> Goes to the specified frame and stops.<br /> <br /></translate> <source lang="lua"> MovieClip:gotoAndStop(frame) </source> === <translate>Parameters</translate> === '''frame''': (int) <translate>the frame number</translate> <br/> {{MovieClip}} 9htcdx5flxwbt1zunlm0z2oustogv55 MovieClip:play 0 243 14103 9645 2019-12-03T21:11:34Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/MovieClip|MovieClip]]<br/> === <translate>Description</translate> === <translate><br /> Starts playing the movie clip.<br /> <br /></translate> <source lang="lua"> MovieClip:play(reverse) </source> === <translate>Parameters</translate> === '''reverse''': (boolean) <translate>indicates to play backwards</translate> <br/> {{MovieClip}} b66aiiv29r9jl3fde43q68ea6txm38f MovieClip:setGotoAction 0 367 14104 9810 2019-12-03T21:11:46Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/MovieClip|MovieClip]]<br/> === <translate>Description</translate> === <translate><br /> Sets a *goto* action to the specified frame. When the movie clip reaches a frame <br /> with goto action, it jumps to the destination frame and continues to play. <br /> This function is usually used to create looping animations.<br /> <br /></translate> <source lang="lua"> MovieClip:setGotoAction(frame,destframe) </source> === <translate>Parameters</translate> === '''frame''': (int) <translate>the frame number</translate> <br/> '''destframe''': (int) <translate>the destination frame number</translate> <br/> {{MovieClip}} pw5wowgramg3nluosx70ysiakcd9bw0 MovieClip:setReverseAction 0 194 14105 9597 2019-12-03T21:11:59Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/MovieClip|MovieClip]]<br/> === <translate>Description</translate> === <translate><br /> Sets a *reverse* action to the specified frame. When the movie clip reaches a frame <br /> with reverse action, it changes playing direction. This function is can be used to create back and forth animations, even endless. <br /></translate> <source lang="lua"> MovieClip:setReverseAction(frame) </source> === <translate>Parameters</translate> === '''frame''': (int) <translate>the frame number</translate> <br/> {{MovieClip}} nsm834j83ieuzhz4quvm52r0fs4svx4 MovieClip:setStopAction 0 522 14106 10018 2019-12-03T21:12:12Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/MovieClip|MovieClip]]<br/> === <translate>Description</translate> === <translate><br /> Sets a *stop* action to the specified frame. When the movie clip reaches a frame <br /> with stop action, it stops playing. This function is usually used to divide<br /> the animation into independent parts.<br /> <br /></translate> <source lang="lua"> MovieClip:setStopAction(frame) </source> === <translate>Parameters</translate> === '''frame''': (int) <translate>the frame number</translate> <br/> {{MovieClip}} jy41gsnqj1so5qqjz6cmcbk7m3efbzd MovieClip:stop 0 611 14107 10114 2019-12-03T21:12:26Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/MovieClip|MovieClip]]<br/> === <translate>Description</translate> === <translate><br /> Stops playing the movie clip.<br /> <br /></translate> <source lang="lua"> MovieClip:stop() </source> {{MovieClip}} fs3ebw5j19eee326u1azlsqgnkb7ff4 Object 0 42 14958 14109 2019-12-09T22:45:20Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Object --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2015.08<br/> === <translate>Description</translate> === Main Object class from which all Gideros classes inherit. There is no other purpose for this class, rather a neat way to add methods to all Gideros classes. === <translate>Examples</translate> === <source lang="lua"> local bmp = Bitmap.new("image.png") print(bmp:getClass()) -- prints Bitmap print(bmp:getBaseClass()) -- prints Sprite print(bmp:isInstanceOf("Bitmap")) -- prints true print(bmp:isInstanceOf("Sprite")) -- prints true print(bmp:isInstanceOf("EventDispatcher")) -- prints true print(bmp:isInstanceOf("Object")) -- prints true print(bmp:isInstanceOf("TileMap")) -- prints false </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Object:getBaseClass|Object:getBaseClass]] ''<translate>returns base class</translate>''<br/><!-- GIDEROSMTD:Object:getBaseClass() returns base class --> [[Special:MyLanguage/Object:getClass|Object:getClass]] ''<translate>returns class name</translate>''<br/><!-- GIDEROSMTD:Object:getClass() returns class name --> [[Special:MyLanguage/Object:isInstanceOf|Object:isInstanceOf]] ''<translate>checks if instance belongs to class</translate>''<br/><!-- GIDEROSMTD:Object:isInstanceOf(classname) checks if instance belongs to class --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} 4xj8and5q7fd8ec9lwk1cgrqf3r2h80 Object:getBaseClass 0 814 14110 10320 2019-12-03T21:15:43Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.08<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> === <translate>Description</translate> === <translate>Returns the class name which object directly inherits from</translate> <source lang="lua"> (string) = Object:getBaseClass() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>returns base class name</translate><br/> {{Object}} ez9onvic899mnt5rjy9vnskjmojfc3y Object:getClass 0 1038 14111 10483 2019-12-03T21:15:56Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.08<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> === <translate>Description</translate> === <translate>Returns the class name of the instance as string</translate> <source lang="lua"> (string) = Object:getClass() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>class name as string</translate><br/> {{Object}} 3u3e1v2hfijbmre7u14p1psd2sjk8cc Object:isInstanceOf 0 616 14112 10138 2019-12-03T21:16:08Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.08<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> === <translate>Description</translate> === <translate>Returns true if instance is of provided class name or if it inherits from provided class name</translate> <source lang="lua"> (boolean) = Object:isInstanceOf(classname) </source> === <translate>Parameters</translate> === '''classname''': (string) <translate>The name of the class to check relation to</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (boolean) <translate>true if instance belongs or inherits from class, false otherwise</translate><br/> {{Object}} duh7m9khhjr13yvxa472j89pf9h5n4k Particles 0 99 14959 14114 2019-12-09T22:47:59Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Particles --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === A Particle system which allows to draw several identical dots or bitmaps, with varying colour and orientation. {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Particles.new|Particles.new]] ''<translate>Create new particles group</translate>''<br/><!-- GIDEROSMTD:Particles.new() Create new particles group --> [[Special:MyLanguage/Particles:addParticles|Particles:addParticles]] ''<translate>Add particles</translate>''<br/><!-- GIDEROSMTD:Particles:addParticles(particles) Add particles --> [[Special:MyLanguage/Particles:clearTexture|Particles:clearTexture]] ''<translate>Clear texture for all particles</translate>''<br/><!-- GIDEROSMTD:Particles:clearTexture() Clear texture for all particles --> [[Special:MyLanguage/Particles:getParticleAngle|Particles:getParticleAngle]] ''<translate>get particle angle</translate>''<br/><!-- GIDEROSMTD:Particles:getParticleAngle(i) get particle angle --> [[Special:MyLanguage/Particles:getParticleColor|Particles:getParticleColor]] ''<translate>Get color and alpha value of particle</translate>''<br/><!-- GIDEROSMTD:Particles:getParticleColor(i) Get color and alpha value of particle --> [[Special:MyLanguage/Particles:getParticleDecay|Particles:getParticleDecay]] <br/><!-- GIDEROSMTD:Particles:getParticleDecay(i) --> [[Special:MyLanguage/Particles:getParticlePosition|Particles:getParticlePosition]] ''<translate>get position of particle</translate>''<br/><!-- GIDEROSMTD:Particles:getParticlePosition(i) get position of particle --> [[Special:MyLanguage/Particles:getParticleSize|Particles:getParticleSize]] ''<translate>get size of particle in pixels</translate>''<br/><!-- GIDEROSMTD:Particles:getParticleSize(i) get size of particle in pixels --> [[Special:MyLanguage/Particles:getParticleSpeed|Particles:getParticleSpeed]] ''<translate>Get speed of particle</translate>''<br/><!-- GIDEROSMTD:Particles:getParticleSpeed(i) Get speed of particle --> [[Special:MyLanguage/Particles:getParticleTag|Particles:getParticleTag]] <br/><!-- GIDEROSMTD:Particles:getParticleTag(i) --> [[Special:MyLanguage/Particles:getParticleTtl|Particles:getParticleTtl]] ''<translate>get initial time to live of particle</translate>''<br/><!-- GIDEROSMTD:Particles:getParticleTtl(i) get initial time to live of particle --> [[Special:MyLanguage/Particles:getParticles|Particles:getParticles]] <br/><!-- GIDEROSMTD:Particles:getParticles(set,tag) --> [[Special:MyLanguage/Particles:isPaused|Particles:isPaused]] <br/><!-- GIDEROSMTD:Particles:isPaused() --> [[Special:MyLanguage/Particles:removeParticles|Particles:removeParticles]] ''<translate>Remove particles by index in table or as arguments</translate>''<br/><!-- GIDEROSMTD:Particles:removeParticles(particle indeces) Remove particles by index in table or as arguments --> [[Special:MyLanguage/Particles:scaleParticles|Particles:scaleParticles]] ''<translate>scale or resize all particles in this sprite</translate>''<br/><!-- GIDEROSMTD:Particles:scaleParticles(scale,absolute) scale or resize all particles in this sprite -->[[Special:MyLanguage/Particles:setParticleAngle|Particles:setParticleAngle]] ''<translate>set angle of particle</translate>''<br/><!-- GIDEROSMTD:Particles:setParticleAngle(i,angle) set angle of particle --> [[Special:MyLanguage/Particles:setParticleColor|Particles:setParticleColor]] ''<translate>set color of particles</translate>''<br/><!-- GIDEROSMTD:Particles:setParticleColor(i,color,alpha) set color of particles --> [[Special:MyLanguage/Particles:setParticleDecay|Particles:setParticleDecay]] <br/><!-- GIDEROSMTD:Particles:setParticleDecay(i,decay,decayAlpha,decayGrowth,decayAngular) --> [[Special:MyLanguage/Particles:setParticlePosition|Particles:setParticlePosition]] ''<translate>set position of particle</translate>''<br/><!-- GIDEROSMTD:Particles:setParticlePosition(i,x,y) set position of particle --> [[Special:MyLanguage/Particles:setParticleSize|Particles:setParticleSize]] ''<translate>set size of particle</translate>''<br/><!-- GIDEROSMTD:Particles:setParticleSize(i,size) set size of particle --> [[Special:MyLanguage/Particles:setParticleSpeed|Particles:setParticleSpeed]] ''<translate>Set speed of particles</translate>''<br/><!-- GIDEROSMTD:Particles:setParticleSpeed(i,x,y,a,s) Set speed of particles --> [[Special:MyLanguage/Particles:setParticleTag|Particles:setParticleTag]] <br/><!-- GIDEROSMTD:Particles:setParticleTag(i,tag) --> [[Special:MyLanguage/Particles:setParticleTtl|Particles:setParticleTtl]] ''<translate>set time to live</translate>''<br/><!-- GIDEROSMTD:Particles:setParticleTtl(i,ttl) set time to live --> [[Special:MyLanguage/Particles:setParticlesTag|Particles:setParticlesTag]] <br/><!-- GIDEROSMTD:Particles:setParticlesTag() --> [[Special:MyLanguage/Particles:setPaused|Particles:setPaused]] <br/><!-- GIDEROSMTD:Particles:setPaused(paused) --> [[Special:MyLanguage/Particles:setTexture|Particles:setTexture]] ''<translate>Set texture to all particles</translate>''<br/><!-- GIDEROSMTD:Particles:setTexture(texture) Set texture to all particles --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} bydzgwbb0euz8ha4g2dbx7xoqrlw40m Particles.new 0 744 14115 10267 2019-12-03T21:18:33Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>Create new particles group</translate> <source lang="lua"> Particles.new() </source> {{Particles}} l77mhqjenpk5ov0oqxy5vogugozq1ii Particles:addParticles 0 209 14116 13494 2019-12-03T21:18:54Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate> Add particle a single particle (short form) or several ones (long form) to this particle system.<br/> '''Short form''' (single particle): ''particles:addParticles(x,y,size,angle,ttl)''<br/> '''Extended form''': ''particles:addParticles{particleDesc1,particleDesc2,...,particleDescN}''<br/> where particleDescX is a table describing a particle to be added. This table can contain the following parameters: <ul> <li>x,y: particle position</li> <li>size: particle size</li> <li>angle: particle orientation</li> <li>color: particle color</li> <li>alpha: particle alpha</li> <li>ttl: time to leave, number of frames this particle will stay on screen</li> <li>tag: tag associated with this particle</li> <li>speedX,speedY,speedAngular,speedGrowth: Amount added to x,y,angle and size at the beginning of each frame</li> <li>decay,decayAngular,decayGrowth,decayAlpha: factor applied to speedX and speedY, speedAngular, speedGrowth and alpha at the beginning of each frame</li> </ul> </translate> <br/> <source lang="lua"> (number or table) = Particles:addParticles(particles) </source> <br/> === <translate>Example</translate> === '''Example:''': <source lang="lua"> local stars = Particles.new() stars:setPosition(64, 64) stage:addChild(stars) stage:addEventListener(Event.ENTER_FRAME, function() stars:addParticles({ {x=math.random(4*64),y=math.random(5*64),size=math.random(1,30),color=0xD9B589,ttl=1*60,speedX=0,speedY=0}, {x=math.random(2*64),y=math.random(5*64),size=math.random(1,30),color=0xffff00,ttl=30*60,speedX=1,speedY=0}, }) end) </source> === <translate>Parameters</translate> === '''particles''': (table or arguments) <translate>table for multiple particles or arguments for single</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number or table) <translate>index or table with indexes of added particles</translate><br/> <br/> <br/> {{Particles}} d2owerdp25mlvdksuveflwhicdzcx4n Particles:clearTexture 0 342 14117 9778 2019-12-03T21:19:10Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>Clear texture for all particles</translate> <source lang="lua"> Particles:clearTexture() </source> {{Particles}} jjm0himbl61nd7twtmorypdea9ixlfy Particles:getParticleAngle 0 752 14118 10656 2019-12-03T21:19:22Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>get particle angle</translate> <source lang="lua"> (number) = Particles:getParticleAngle(i) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>index of particle</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>angle of particle in degrees</translate><br/> {{Particles}} hma784zhbv63vyafuk4ec0pq8a29vxv Particles:getParticleColor 0 847 14119 10343 2019-12-03T21:19:36Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>Get color and alpha value of particle</translate> <source lang="lua"> (color), (alpha) = Particles:getParticleColor(i) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>particle index</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (color) <translate>color value</translate><br/> '''<translate>Returns</translate>''' (alpha) <translate>alpha value from 0 to 1</translate><br/> {{Particles}} kk2nh60u7vker6hyisvd2kan5e3ckra Particles:getParticleDecay 0 915 14120 10757 2019-12-03T21:19:51Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>Get decay values for the given particle</translate> <source lang="lua"> (number), (number), (number), (number) = Particles:getParticleDecay(i) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>particle index</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>speed decay factor</translate><br/> '''<translate>Returns</translate>''' (number) <translate>alpha decay factor</translate><br/> '''<translate>Returns</translate>''' (number) <translate>growth speed decay factor</translate><br/> '''<translate>Returns</translate>''' (number) <translate>angular speed decay factor</translate><br/> {{Particles}} 1f1ldcr5ukmg6pb7c6sqiy0nyxwxo1f Particles:getParticlePosition 0 379 14121 9820 2019-12-03T21:20:06Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>get position of particle</translate> <source lang="lua"> (number), (number) = Particles:getParticlePosition(i) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>index of particle</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x position</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y position</translate><br/> {{Particles}} it60chm16217zntdqb923b1iwps70vo Particles:getParticleSize 0 1123 14122 10581 2019-12-03T21:20:19Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>get size of particle in pixels</translate> <source lang="lua"> (number) = Particles:getParticleSize(i) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>index of particle</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>size in pixels</translate><br/> {{Particles}} 6o33fiusqapbszapyl98i9cu76r6bsz Particles:getParticleSpeed 0 459 14123 9922 2019-12-03T21:20:32Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>Get speed of particle</translate> <source lang="lua"> (number), (number), (number), (number) = Particles:getParticleSpeed(i) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>particle index</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x vector</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y vector</translate><br/> '''<translate>Returns</translate>''' (number) <translate>angular velocity</translate><br/> '''<translate>Returns</translate>''' (number) <translate>growth speed</translate><br/> {{Particles}} 0c840akfkkokuis1uiwrffctggwvhe4 Particles:getParticleTag 0 435 14124 9889 2019-12-03T21:20:44Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>returns the tag associated to the given particle</translate> <source lang="lua"> (string) = Particles:getParticleTag(i) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>particle index</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>tag</translate><br/> {{Particles}} n4w371h9db2m8tkmra4ima7txcjjj3z Particles:getParticleTtl 0 655 14125 10195 2019-12-03T21:20:56Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>get initial time to live of particle</translate> <source lang="lua"> (number) = Particles:getParticleTtl(i) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>index of particle</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>initial time to live in seconds</translate><br/> {{Particles}} 6clkqzw0g707vw3emcro3lirqulym13 Particles:getParticles 0 884 14126 10732 2019-12-03T21:21:24Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>Retrieve particles states of this system</translate> <source lang="lua"> (table) = Particles:getParticles(set,tag) </source> === <translate>Parameters</translate> === '''set''': (table, optional) <translate>Optional set of particle indices to query</translate> '''optional'''<br/> '''tag''': (string, optional) <translate>only return particles matching this tag</translate> '''optional'''<br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>table containing the state of each particle in the system matching tag if any</translate><br/> {{Particles}} ed5lt2fnctd5a067ubxxvvt1gsrc3hg Particles:isPaused 0 406 14127 9854 2019-12-03T21:21:37Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>Returns wether this particle system is paused or not</translate> <source lang="lua"> (boolean) = Particles:isPaused() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (boolean) <translate>true when paused</translate><br/> {{Particles}} 980y4eu28b12zarfh4j30t5m4kgohxk Particles:removeParticles 0 1087 14128 10530 2019-12-03T21:21:50Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>Remove particles by index in table or as arguments remove all particles ''particles:removeParticles()'' or remove specific partilces: ''particles:removeParticles({1,2,3})'' or ''particles:removeParticles(1,2,3)''</translate> <source lang="lua"> Particles:removeParticles(particle indeces) </source> === <translate>Parameters</translate> === '''particle indeces''': (table or arguments) <translate>table or arguments of indexes to remove</translate> <br/> {{Particles}} i7p5wnxnysr0mfjn5ze818zq0a802v8 Particles:scaleParticles 0 2622 14129 13110 2019-12-03T21:22:03Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2019.4<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>Scale all particles</translate> <source lang="lua"> Particles:scaleParticles(scale,absolute) </source> === <translate>Parameters</translate> === '''scale''': (number) <translate>The scale factor to apply to all particles</translate> <br/> '''absolute''': (boolean) <translate>If true, scale is an absolute size instead</translate> <br/> {{Particles}} 06q2se6vb6k3bfoi75libfypeh603t8 Particles:setParticleAngle 0 615 14130 10121 2019-12-03T21:22:15Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>set angle of particle</translate> <source lang="lua"> Particles:setParticleAngle(i,angle) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>index of particle</translate> <br/> '''angle''': (number) <translate>angle in degrees</translate> <br/> {{Particles}} sjmueof3bfxmgkrbcjlzfknz3bl7rwq Particles:setParticleColor 0 524 14131 9985 2019-12-03T21:22:31Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>set color of particles</translate> <source lang="lua"> Particles:setParticleColor(i,color,alpha) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>particle index</translate> <br/> '''color''': (number) <translate>hex value of color</translate> <br/> '''alpha''': (number) <translate>alpha value from 0 to 1, default 1</translate> '''optional'''<br/> {{Particles}} dlz30dsvmzk2e6gvr0cuae7qo5s6bqw Particles:setParticleDecay 0 469 14132 9948 2019-12-03T21:22:47Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>Configure decay values for the given particle</translate> <source lang="lua"> Particles:setParticleDecay(i,decay,decayAlpha,decayGrowth,decayAngular) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>particle index</translate> <br/> '''decay''': (number) <translate>speed decay factor</translate> <br/> '''decayAlpha''': (number) <translate>alpha decay factor</translate> <br/> '''decayGrowth''': (number) <translate>growth speed decay factor</translate> <br/> '''decayAngular''': (number) <translate>angular speed decay factor</translate> <br/> {{Particles}} 20c4pvdcndn45fhiazy2sfivhb6zujv Particles:setParticlePosition 0 534 14133 10033 2019-12-03T21:22:59Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>set position of particle</translate> <source lang="lua"> Particles:setParticlePosition(i,x,y) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>index of particle</translate> <br/> '''x''': (number) <translate>x position</translate> <br/> '''y''': (number) <translate>y position</translate> <br/> {{Particles}} p179rhcij0ybgulp61lyt2nemd883s4 Particles:setParticleSize 0 765 14134 10283 2019-12-03T21:23:11Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>set size of particle</translate> <source lang="lua"> Particles:setParticleSize(i,size) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>index of particle</translate> <br/> '''size''': (number) <translate>size of particle in pixels</translate> <br/> {{Particles}} fwfk7q4bbjfsowd8561uc7pepf8kep7 Particles:setParticleSpeed 0 394 14135 9839 2019-12-03T21:23:24Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>Set speed of particles</translate> <source lang="lua"> Particles:setParticleSpeed(i,x,y,a,s) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>particle index</translate> <br/> '''x''': (number) <translate>x vector</translate> '''optional'''<br/> '''y''': (number) <translate>y vector</translate> '''optional'''<br/> '''a''': (number) <translate>angular velocity</translate> '''optional'''<br/> '''s''': (number) <translate>growth speed</translate> '''optional'''<br/> {{Particles}} 2yh3n6kxsdkz6dzxoagm8j0o0z1dz86 Particles:setParticleTag 0 460 14136 9936 2019-12-03T21:23:37Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>set the tag associated to the given particle.</translate> <source lang="lua"> Particles:setParticleTag(i,tag) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>particle index</translate> <br/> '''tag''': (string) <translate>tag to associate to this particle</translate> <br/> {{Particles}} 0unlebjcaschytra0l3g6ptg3x5gx39 Particles:setParticleTtl 0 1032 14137 10837 2019-12-03T21:23:52Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>set time to live</translate> <source lang="lua"> Particles:setParticleTtl(i,ttl) </source> === <translate>Parameters</translate> === '''i''': (number) <translate>index of particle</translate> <br/> '''ttl''': (number) <translate>time to live in seconds</translate> <br/> {{Particles}} dkglt220zdf3t86tmpuafy7x1wx7lm2 Particles:setParticlesTag 0 542 14138 9999 2019-12-03T21:24:05Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>set the tag associated to the given particle</translate> <source lang="lua"> Particles:setParticlesTag() </source> {{Particles}} kwen4hwi63jttyzomaf1xsabdhr510r Particles:setPaused 0 278 14139 9695 2019-12-03T21:24:25Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>Pause or resume this particle system</translate> <source lang="lua"> Particles:setPaused(paused) </source> === <translate>Parameters</translate> === '''paused''': (boolean) <translate>true to pause the particle system, false to resume</translate> <br/> {{Particles}} 346of3j0gbqj1ph3mxud16pjb6l6nqg Particles:setTexture 0 404 14140 9856 2019-12-03T21:24:38Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Particles|Particles]]<br/> === <translate>Description</translate> === <translate>Set texture to all particles</translate> <source lang="lua"> Particles:setTexture(texture) </source> === <translate>Parameters</translate> === '''texture''': (TextureBase) <translate>texture to use in particles</translate> <br/> {{Particles}} dbpq6rvzyr1n158lkpgq98emc87chbb Path2D 0 50 14960 14142 2019-12-09T22:50:16Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Path2D --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2016.04<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === Draw quick 2D vector paths. This class aims at being a faster alternative to Shape for complex/curvy shapes. === <translate>Examples</translate> === '''Drawing a Moon''' <source lang="lua"> --Moon local p=Path2D.new() local ms="MQQZ" --MoveTo, QuadTo, QuadTo, Close local mp={100,0, -50,100, 100,200, 20,100, 100,0 } p:setPath(ms,mp) --Set the path from a set of commands and coordinates p:setLineThickness(3) -- Outline width p:setFillColor(0xE0E0E0,0.7) --Fill color p:setLineColor(0xC0C0C0) --Line color p:setAnchorPosition(100,100) p:setPosition(160,240) stage:addChild(p) </source> '''Drawing a banana''' <source lang="lua"> --Banana shape, SVG path format local banana="M8.64,223.948c0,0,143.468,3.431,185.777-181.808c2.673-11.702-1.23-20.154,1.316-33.146h16.287c0,0-3.14,17.248,1.095,30.848c21.392,68.692-4.179,242.343-204.227,196.59L8.64,223.948z" p=Path2D.new() p:setSvgPath(banana) --Set the path from a SVG path description p:setLineThickness(5) -- Outline width p:setFillColor(0xFFFF80,0.7) --Fill color p:setLineColor(0x404000) --Line color p:setAnchorPosition(100,100) p:setPosition(160,240) stage:addChild(p) </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Path2D.new|Path2D.new]] ''<translate>Creates Path2D object</translate>''<br/><!-- GIDEROSMTD:Path2D.new() Creates Path2D object --> [[Special:MyLanguage/Path2D:getPathPoints|Path2D:getPathPoints]] ''<translate>Compute location of points along the path.</translate>''<br/><!-- GIDEROSMTD:Path2D:getPathPoints(interval,offset,maxpts,flatness,subdiv_limit) Compute location of points along the path. --> [[Special:MyLanguage/Path2D:setConvex|Path2D:setConvex]] ''<translate>Flag the shape as convex.</translate>''<br/><!-- GIDEROSMTD:Path2D:setConvex(convex) Flag the shape as convex. --> [[Special:MyLanguage/Path2D:setFillColor|Path2D:setFillColor]] ''<translate>Sets fill color</translate>''<br/><!-- GIDEROSMTD:Path2D:setFillColor(color,alpha) Sets fill color --> [[Special:MyLanguage/Path2D:setFontPath|Path2D:setFontPath]] ''<translate>Sets the path from the outline of a TTFont character</translate>''<br/><!-- GIDEROSMTD:Path2D:setFontPath(font,character) Sets the path from the outline of a TTFont character --> [[Special:MyLanguage/Path2D:setLineColor|Path2D:setLineColor]] ''<translate>Sets line color</translate>''<br/><!-- GIDEROSMTD:Path2D:setLineColor(color,alpha) Sets line color --> [[Special:MyLanguage/Path2D:setLineThickness|Path2D:setLineThickness]] ''<translate>Set the thickness of the outline</translate>''<br/><!-- GIDEROSMTD:Path2D:setLineThickness(thickness,feather) Set the thickness of the outline --> [[Special:MyLanguage/Path2D:setPath|Path2D:setPath]] ''<translate>set path to draw</translate>''<br/><!-- GIDEROSMTD:Path2D:setPath(commands,coordinates,more coordinates) set path to draw --> [[Special:MyLanguage/Path2D:setSvgPath|Path2D:setSvgPath]] ''<translate>set path with svg properties</translate>''<br/><!-- GIDEROSMTD:Path2D:setSvgPath(svg_params) set path with svg properties --> [[Special:MyLanguage/Path2D:setTexture|Path2D:setTexture]] ''<translate>sets texture for fill</translate>''<br/><!-- GIDEROSMTD:Path2D:setTexture(texture,matrix) sets texture for fill --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} 2kfcn3jdkpiqhwusfg5f1zaqw12h6co Path2D.new 0 767 14143 10296 2019-12-03T21:26:59Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Path2D|Path2D]]<br/> === <translate>Description</translate> === <translate>Creates Path2D object</translate> <source lang="lua"> Path2D.new() </source> {{Path2D}} nnyij5zyqmix9qdebmhkoiees00lavs Path2D:getPathPoints 0 2583 14144 12973 2019-12-03T21:27:11Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.12<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Path2D|Path2D]]<br/> === <translate>Description</translate> === <translate>Compute points location along the path. To do so, the path is converted into a series of straight segments and particular points are sampled along it. The resulting table outputs, for each point, its location (x,y) and its tangent orientation (angle) </translate> <source lang="lua"> (table) = Path2D:getPathPoints(interval,offset,maxpts,flatness,subdiv_limit) </source> === <translate>Parameters</translate> === '''interval''': (number) <translate>distance between each considered point</translate> <br/> '''offset''': (number) <translate>distance to first point of interest. Defaults to 0.</translate> <translate>'''optional'''</translate> <br/> '''maxpts''': (number) <translate>maximum number of points to sample. Defaults to 1000.</translate> <translate>'''optional'''</translate> <br/> '''flatness''': (number) <translate>maximum acceptable deviation for real curve. Defaults to 1.</translate> <translate>'''optional'''</translate> <br/> '''subdiv_limit''': (number) <translate>maximum curve subdivision limit. Defaults to 10.</translate> <translate>'''optional'''</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>information about selected points</translate><br/> {{Path2D}} mo4j287ybj9gml7s1absb8o8nsody67 Path2D:setConvex 0 455 14145 9917 2019-12-03T21:27:25Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Path2D|Path2D]]<br/> === <translate>Description</translate> === <translate>Flag this shape as convex. Convex shapes can be rendered faster.</translate> <source lang="lua"> Path2D:setConvex(convex) </source> === <translate>Parameters</translate> === '''convex''': (bool) <translate>true if convex</translate> <br/> {{Path2D}} mi993qzl7mbw0u0546wf17ydff0pb3v Path2D:setFillColor 0 1059 14146 13519 2019-12-03T21:27:38Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Path2D|Path2D]]<br/> Since Gideros 2019.12, this function accepts gradients the same way as Pixel:setColor(). === <translate>Description</translate> === <translate>Sets fill color</translate> <source lang="lua"> Path2D:setFillColor(color,alpha) </source> === <translate>Parameters</translate> === '''color''': (hex) <translate>color to use</translate> <br/> '''alpha''': (number) <translate>opacity of fill from 0 to 1, default 1</translate> '''optional'''<br/> {{Path2D}} hdqzzczha8zsrc5gebllykdw9kougb5 Path2D:setFontPath 0 932 14147 10766 2019-12-03T21:27:49Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Path2D|Path2D]]<br/> === <translate>Description</translate> === <translate>Sets the path from the outline of a character in a TTFont.</translate> <source lang="lua"> Path2D:setFontPath(font,character) </source> === <translate>Parameters</translate> === '''font''': (TTFont) <translate>Vector font to use</translate> <br/> '''character''': (string) <translate>character to use from font</translate> <br/> {{Path2D}} t8toqxj8p21lprgkzptl6thojxvzzjx Path2D:setLineColor 0 584 14148 10083 2019-12-03T21:28:01Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Path2D|Path2D]]<br/> === <translate>Description</translate> === <translate>Sets line color</translate> <source lang="lua"> Path2D:setLineColor(color,alpha) </source> === <translate>Parameters</translate> === '''color''': (hex) <translate>color to use</translate> <br/> '''alpha''': (number) <translate>opacity of line from 0 to 1, default 1</translate> '''optional'''<br/> {{Path2D}} qm561vtfse3q4r4dka7mi8ayp5tmn19 Path2D:setLineThickness 0 887 14149 10374 2019-12-03T21:28:14Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Path2D|Path2D]]<br/> === <translate>Description</translate> === <translate>Sets the thickness (width) of the outline, and optionnally set the amount of 'feather' effect.</translate> <source lang="lua"> Path2D:setLineThickness(thickness,feather) </source> === <translate>Parameters</translate> === '''thickness''': (number) <translate>line thickness in sprite coordinates units</translate> <br/> '''feather''': (number) <translate>Sets the amount of 'feather' effect, i.e. the ratio of the line thickness that will be blurred with background. Values range from 0 (sharp edges) to 1.</translate> '''optional'''<br/> {{Path2D}} eourobly39rfkeckmtjl3h77wsuykxo Path2D:setPath 0 1002 14150 10808 2019-12-03T21:28:29Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Path2D|Path2D]]<br/> === <translate>Description</translate> === <translate>Set path to draw, using string with commands represented as: <ul> <li>M - MoveTo, 2 values (x,y)</li> <li>L - LineTo, 2 values (x,y)</li> <li>Q - QuadTo, 4 values (c0x,c0y,x,y)</li> <li>C - CubicTo, 6 values (c0x,c0y,c1x,c1y,x,y)</li> <li>H - Horzontal Line, 1 value (x)</li> <li>V - Vertical Line, 1 value (y)</li> <li>A - ArcTo, 7 values (r1,r2,angle,largeArc,sweep,x,y)</li> <li>Z - Close, no parameter</li> <li>* - repeat last command until all coordinates are exhausted</li> </ul> and provided coordinates as table or simply arguments</translate> <source lang="lua"> Path2D:setPath(commands,coordinates,more coordinates) </source> === <translate>Parameters</translate> === '''commands''': (string) <translate>list of commands as ML**Z expecting according coordinates</translate> <br/> '''coordinates''': (table or number) <translate>lua table with coordinates for each command, in the same order as commands</translate> <br/> '''more coordinates''': (number) <translate>if second argument is not table, you can provide more coordinates as separate arguments</translate> '''optional'''<br/> === <translate>Examples</translate> === '''Drawing Moon'''<br/> <source lang="lua">--Moon local p=Path2D.new() local ms="MQQZ" --MoveTo, QuadTo, QuadTo, Close local mp={100,0, -50,100, 100,200, 20,100, 100,0 } p:setPath(ms,mp) --Set the path from a set of commands and coordinates p:setLineThickness(3) -- Outline width p:setFillColor(0xE0E0E0,0.7) --Fill color p:setLineColor(0xC0C0C0) --Line color p:setAnchorPosition(100,100) stage:addChild(p)</source> {{Path2D}} bsrj0bqm8rmt51niu1fjnrvjdht4cm0 Path2D:setSvgPath 0 220 14151 9623 2019-12-03T21:28:44Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Path2D|Path2D]]<br/> === <translate>Description</translate> === <translate>Set path with svg properties in single string separated by comma (,)</translate> <source lang="lua"> Path2D:setSvgPath(svg_params) </source> === <translate>Parameters</translate> === '''svg_params''': (string) <translate>svg params separated by comma</translate> <br/> === <translate>Examples</translate> === '''Drawing banana'''<br/> <source lang="lua">--Banana shape, SVG path format local banana="M8.64,223.948c0,0,143.468,3.431,185.777-181.808c2.673-11.702-1.23-20.154,1.316-33.146h16.287c0,0-3.14,17.248,1.095,30.848c21.392,68.692-4.179,242.343-204.227,196.59L8.64,223.948z" p=Path2D.new() p:setSvgPath(banana) --Set the path from a SVG path description p:setLineThickness(5) -- Outline width p:setFillColor(0xFFFF80,0.7) --Fill color p:setLineColor(0x404000) --Line color p:setAnchorPosition(100,100) stage:addChild(p)</source> {{Path2D}} fdu0c4a4s4vubu2g5yv2bf8q2660qfp Path2D:setTexture 0 182 14152 9571 2019-12-03T21:28:58Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Path2D|Path2D]]<br/> === <translate>Description</translate> === <translate>Sets texture for fill and optionally apply transformation matrix to it.</translate> <source lang="lua"> Path2D:setTexture(texture,matrix) </source> === <translate>Parameters</translate> === '''texture''': (TextureBase) <translate>texture to use as fill</translate> <br/> '''matrix''': (Matrix) <translate>transformation matrix for texture</translate> '''optional'''<br/> {{Path2D}} 53yznqrosls6yi6yasfucx9db31tkxe Pixel 0 131 14961 14154 2019-12-09T22:51:53Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Pixel --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === A rectangular Sprite which can be filled with solid colors, gradients or textures. Pixel aims at being a simpler and faster alternative to Shape when needing to display a coloured box or box with a gradient. It is also useful as Bitmap replacement since every texture will be fitted into Pixel dimensions automatically. === <translate>Example</translate> === <source lang="lua"> local mypixel = Pixel.new(0x0000FF, 0.75, 128, 128) mypixel:setAnchorPoint(0.5, 0.5) mypixel:setPosition(application:getContentWidth() / 2, 64) stage:addChild(mypixel) </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Pixel.new|Pixel.new]] ''<translate>Create new pixel</translate>''<br/><!-- GIDEROSMTD:Pixel.new(color,alpha,width,height) Create new pixel --> [[Special:MyLanguage/Pixel.new|Pixel.new]] ''<translate>Constructor to create a Pixel with texture in letterbox mode.</translate>''<br/><!-- GIDEROSMTD:Pixel.new(texture,width,height,texture_scale_x,texture_scale_y,texture_x,texture_y) Constructor to create a Pixel with texture in letterbox mode. --> [[Special:MyLanguage/Pixel:getColor|Pixel:getColor]] ''<translate>Gets the color(s) of the Pixel</translate>''<br/><!-- GIDEROSMTD:Pixel:getColor() Gets the color(s) of the Pixel --> [[Special:MyLanguage/Pixel:getDimensions|Pixel:getDimensions]] <br/><!-- GIDEROSMTD:Pixel:getDimensions() --> [[Special:MyLanguage/Pixel:getTexturePosition|Pixel:getTexturePosition]] <br/><!-- GIDEROSMTD:Pixel:getTexturePosition() --> [[Special:MyLanguage/Pixel:getTextureScale|Pixel:getTextureScale]] <br/><!-- GIDEROSMTD:Pixel:getTextureScale() --> [[Special:MyLanguage/Pixel:setColor|Pixel:setColor]] ''<translate>Sets the color of the Pixel</translate>''<br/><!-- GIDEROSMTD:Pixel:setColor(color,alpha) Sets the color of the Pixel --> [[Special:MyLanguage/Pixel:setColor|Pixel:setColor]] <br/><!-- GIDEROSMTD:Pixel:setColor(color1,alpha1,color2,alpha2,angle) --> [[Special:MyLanguage/Pixel:setColor|Pixel:setColor]] ''<translate>Sets 4-colour gradient.</translate>''<br/><!-- GIDEROSMTD:Pixel:setColor(color1,alpha1,color2,alpha2,color3,alpha3,color4,alpha4) Sets 4-colour gradient. --> [[Special:MyLanguage/Pixel:setDimensions|Pixel:setDimensions]] ''<translate>Sets both width and height of the Pixel.</translate>''<br/><!-- GIDEROSMTD:Pixel:setDimensions(w,h) Sets both width and height of the Pixel. --> [[Special:MyLanguage/Pixel:setHeight|Pixel:setHeight]] ''<translate>Sets the height of the pixel sprite.</translate>''<br/><!-- GIDEROSMTD:Pixel:setHeight(h) Sets the height of the pixel sprite. --> [[Special:MyLanguage/Pixel:setNinePatch|Pixel:setNinePatch]] ''<translate>Configure 9-patch style texture rendering.</translate>''<br/><!-- GIDEROSMTD:Pixel:setNinePatch(vl,vr,vt,vb,tl,tr,tt,tb) --> [[Special:MyLanguage/Pixel:setTexture|Pixel:setTexture]] <br/><!-- GIDEROSMTD:Pixel:setTexture(texture,slot,matrix) --> [[Special:MyLanguage/Pixel:setTextureMatrix|Pixel:setTextureMatrix]] <br/><!-- GIDEROSMTD:Pixel:setTextureMatrix(matrix) --> [[Special:MyLanguage/Pixel:setTexturePosition|Pixel:setTexturePosition]] <br/><!-- GIDEROSMTD:Pixel:setTexturePosition(x,y) --> [[Special:MyLanguage/Pixel:setTextureScale|Pixel:setTextureScale]] <br/><!-- GIDEROSMTD:Pixel:setTextureScale(sx,sy) --> [[Special:MyLanguage/Pixel:setWidth|Pixel:setWidth]] ''<translate>Sets the width of the pixel sprite.</translate>''<br/><!-- GIDEROSMTD:Pixel:setWidth(w) Sets the width of the pixel sprite. --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} jrlnojsy1iyyhkxja1x51bap0m2s3w0 Pixel.new 0 772 14155 13499 2019-12-03T21:30:55Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/> === <translate>Description</translate> === <translate>Create new pixel</translate> <source lang="lua"> Pixel.new(color,alpha,width,height) </source> === <translate>Parameters</translate> === '''color''': (number) <translate>hex value representing color</translate> '''optional'''<br/> '''alpha''': (number) <translate>alpha value from 0 to 1</translate> '''optional'''<br/> '''width''': (number) <translate>width of pixel</translate> '''optional'''<br/> '''height''': (number) <translate>height of pixel</translate> '''optional'''<br/> __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.10<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/> === <translate>Description</translate> === <translate>Constructor to create a Pixel with texture in letterbox mode. Every texture will be fitted into Pixel dimensions with preserving texture aspect ratio.</translate> <source lang="lua"> Pixel.new(texture,width,height,texture_scale_x,texture_scale_y,texture_x,texture_y) </source> === <translate>Parameters</translate> === '''texture''': (TextureBase or TextureRegion) <translate>texture to use for the pixel</translate> <br/> '''width''': (number) <translate>width of the Pixel</translate> '''optional'''<br/> '''height''': (number) <translate>height of the Pixel</translate> '''optional'''<br/> '''texture_scale_x''': (number) <translate>horizontal scale of the pixel texture</translate> '''optional'''<br/> '''texture_scale_y''': (number) <translate>vertical scale of the pixel texture</translate> '''optional'''<br/> '''texture_x''': (number) <translate>horizontal position of the pixel texture</translate> '''optional'''<br/> '''texture_y''': (number) <translate>vertical position of the pixel texture</translate> '''optional'''<br/> {{Pixel}} k05ygwi5hpe18ytsd5tpwkynfek0pg2 Pixel:getColor 0 254 14156 9659 2019-12-03T21:31:49Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/> === <translate>Description</translate> === <translate>Gets the color of the Pixel or 4 color-alpha pairs if it has a gradient.</translate> <source lang="lua"> (number), (number) = Pixel:getColor() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>Color</translate><br/> '''<translate>Returns</translate>''' (number) <translate>alpha</translate><br/> {{Pixel}} db0pzqlqfirj5shl5gw052e7f8y4qev Pixel:getDimensions 0 463 14157 9935 2019-12-03T21:32:02Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/> === <translate>Description</translate> === <translate>Return the width and height of the Pixel</translate> <source lang="lua"> (number), (number) = Pixel:getDimensions() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The Pixel's width</translate><br/> '''<translate>Returns</translate>''' (number) <translate>The Pixel's height</translate><br/> {{Pixel}} k8g5tk7nrhf0cb3h8hni5fm23ya5f0k Pixel:getTexturePosition 0 561 14158 10052 2019-12-03T21:32:13Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/> === <translate>Description</translate> === <translate>Returns the texture position for the Pixel</translate> <source lang="lua"> (number), (number) = Pixel:getTexturePosition() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The x-coordinate of the texture</translate><br/> '''<translate>Returns</translate>''' (number) <translate>The y-coordinate of the texture</translate><br/> {{Pixel}} 6k50e2qm544egdf6v3m5bavrlar41ra Pixel:getTextureScale 0 856 14159 10353 2019-12-03T21:32:26Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/> === <translate>Description</translate> === <translate>Returns the texture scale for the Pixel</translate> <source lang="lua"> (number), (number) = Pixel:getTextureScale() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The x-scale of the texture</translate><br/> '''<translate>Returns</translate>''' (number) <translate>The y-scale of the texture</translate><br/> {{Pixel}} 85n1wc97cnmx6awvf494kvgoey3wyb8 Pixel:setColor 0 822 14160 13450 2019-12-03T21:32:41Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/> === <translate>Description</translate> === <translate>Sets the color of the Pixel</translate> <source lang="lua"> Pixel:setColor(color,alpha) </source> === <translate>Parameters</translate> === '''color''': (number) <translate>new color</translate> '''optional'''<br/> '''alpha''': (number) <translate>New alpha value</translate> '''optional'''<br/> __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.12<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/> === <translate>Description</translate> === <translate>Sets two-colour gradient fill with optional rotation to Pixel.</translate> <source lang="lua"> Pixel:setColor(color1,alpha1,color2,alpha2,angle) </source> === <translate>Parameters</translate> === '''color1''': (number) <translate>First color of the gradient.</translate> <br/> '''alpha1''': (number) <translate>First alpha of the gradient.</translate> <br/> '''color2''': (number) <translate>Second color of the gradient.</translate> <br/> '''alpha2''': (number) <translate>Second alpha of the gradient.</translate> <br/> '''angle''': (number) <translate>Sets rotation of the gradient in degrees. Default value is 270: top-bottom gradient.</translate> '''optional'''<br/> __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/> === <translate>Description</translate> === <translate>Sets 4-colour gradient fill to Pixel.</translate> <source lang="lua"> Pixel:setColor(color1,alpha1,color2,alpha2,color3,alpha3,color4,alpha4) </source> === <translate>Parameters</translate> === '''color1''': (number) <translate>Color of top-left gradient corner.</translate> <br/> '''alpha1''': (number) <translate>Alpha of top-left gradient corner.</translate> <br/> '''color2''': (number) <translate>Color of top-right gradient corner.</translate> <br/> '''alpha2''': (number) <translate>Alpha of top-right gradient corner.</translate> <br/> '''color3''': (number) <translate>Color of bottom-right gradient corner.</translate> <br/> '''alpha3''': (number) <translate>Alpha of bottom-right gradient corner.</translate> <br/> '''color4''': (number) <translate>Color of bottom-left gradient corner.</translate> <br/> '''alpha4''': (number) <translate>Alpha of bottom-left gradient corner.</translate> <br/> {{Pixel}} 4y6wv96ggj6kazyri2vtk9w3qjm5hrp Pixel:setDimensions 0 987 14161 10429 2019-12-03T21:32:55Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/> === <translate>Description</translate> === <translate>Sets both width and height of the Pixel.</translate> <source lang="lua"> Pixel:setDimensions(w,h) </source> === <translate>Parameters</translate> === '''w''': (number) <translate>The new width</translate> <br/> '''h''': (number) <translate>The new height</translate> <br/> {{Pixel}} jkcwfn3kn0mpmlmcrgtt00tf18qmg9e Pixel:setHeight 0 599 14162 10118 2019-12-03T21:33:08Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/> === <translate>Description</translate> === <translate>Sets the height of the pixel sprite.</translate> <source lang="lua"> Pixel:setHeight(h) </source> === <translate>Parameters</translate> === '''h''': (number) <translate>The new height</translate> <br/> {{Pixel}} p2pt3fjm734xn8r8w0451kxp7mr6mxs Pixel:setNinePatch 0 2663 14163 13446 2019-12-03T21:33:24Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2019.9<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/> === <translate>Description</translate> === <translate>Enable 9-patch texture rendering with the specified parameters. </translate> <source lang="lua"> Pixel:setNinePatch(vl,vr,vt,vb,tl,tr,tt,tb) Pixel:setNinePatch(l,r,t,b) -- Use the same values for v* and t* Pixel:setNinePatch(vmargin,tmargin) -- Use the same values for all borders, but differentiate rendered and texture values Pixel:setNinePatch(margin) -- Use the same value for all </source> === <translate>Parameters</translate> === '''vl''': (number) <translate>left size of the rendered dynamic area</translate> <br/> '''vr''': (number) <translate>right size of the rendered dynamic area</translate> <br/> '''vt''': (number) <translate>top size of the rendered dynamic area</translate> <br/> '''vb''': (number) <translate>bottom size of the rendered dynamic area</translate> <br/> '''tl''': (number) <translate>left size of the texture dynamic area</translate> <br/> '''tr''': (number) <translate>right size of the texture dynamic area</translate> <br/> '''tt''': (number) <translate>top size of the texture dynamic area</translate> <br/> '''tb''': (number) <translate>bottom size of the texture dynamic area</translate> <br/> {{Pixel}} f2ilk7mb9l5d4l65tjb5n5qhcw7oz86 Pixel:setTexture 0 949 14164 13498 2019-12-03T21:33:38Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/> === <translate>Description</translate> === <translate>Associate a texture to this pixel</translate> <source lang="lua"> Pixel:setTexture(texture,slot,matrix) </source> === <translate>Parameters</translate> === '''texture''': (TextureBase or TexteureRegion) <translate>The texture to associate to this pixel, or nil to deassociate.</translate> <br/> '''slot''': (number) <translate>The texture slot that the texture should be associated to. Leave empty or set to 0 for main texture, or if you don't use a specific shader.</translate> '''optional'''<br/> '''matrix''': (Matrix) <translate>an optional transform for the texture</translate> '''optional'''<br/> {{Pixel}} k9qfjk4gr6f26kym80kwuesz3pbs8ea Pixel:setTextureMatrix 0 255 14165 9662 2019-12-03T21:33:51Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/> === <translate>Description</translate> === <translate>Sets the matrix of the Pixel's texture</translate> <source lang="lua"> Pixel:setTextureMatrix(matrix) </source> === <translate>Parameters</translate> === '''matrix''': (Matrix) <translate>The matrix.</translate> <br/> {{Pixel}} cx2qcdx0t2w7pzvigi3xk8g5oc95uw2 Pixel:setTexturePosition 0 665 14166 10206 2019-12-03T21:34:03Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/> === <translate>Description</translate> === <translate>Sets the texture's position</translate> <source lang="lua"> Pixel:setTexturePosition(x,y) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>x-coordinate of texture</translate> <br/> '''y''': (any) <translate>y-coordinate of texture</translate> <br/> {{Pixel}} r07aypiofynlh7nzu9tphny1njmx6jn Pixel:setTextureScale 0 551 14167 10055 2019-12-03T21:34:16Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/> === <translate>Description</translate> === <translate>Sets the texture's scale for the Pixel</translate> <source lang="lua"> Pixel:setTextureScale(sx,sy) </source> === <translate>Parameters</translate> === '''sx''': (number) <translate>Texture's x-scale</translate> <br/> '''sy''': (number) <translate>Texture's y-scale</translate> <br/> {{Pixel}} 4t4ravjy7y5e9bnugmfsy95gel6lwvd Pixel:setWidth 0 365 14168 9799 2019-12-03T21:34:30Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Pixel|Pixel]]<br/> === <translate>Description</translate> === <translate>Sets the width of the pixel sprite.</translate> <source lang="lua"> Pixel:setWidth(w) </source> === <translate>Parameters</translate> === '''w''': (number) <translate>The new width.</translate> <br/> {{Pixel}} bh785k5g2pyyvo7xcvxnclvxiizylum RenderTarget 0 55 14962 14170 2019-12-09T22:57:26Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:RenderTarget --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/TextureBase|TextureBase]]<br/> === <translate>Description</translate> === <translate>RenderTarget is a texture on which provided Sprite hierarchy can be rendered. It can be used in any case in which Texture can be used.</translate> === <translate>Examples</translate> === '''Using as texture and updating RenderTarget:''' <source lang="lua"> --original bitmap local source = Bitmap.new(Texture.new("crate.png", true)) --render target local rt = RenderTarget.new(source:getWidth(), source:getHeight()) --bitmap with rendertarget as texture local bmp = Bitmap.new(rt) bmp:setPosition(200, 0) stage:addChild(bmp) --updating source updated Bitmap local frame = 0 stage:addEventListener(Event.ENTER_FRAME, function(event) local r = math.sin(frame * 0.03) * 0.3 + 0.7 local g = math.sin(frame * 0.04) * 0.3 + 0.7 local b = math.sin(frame * 0.05) * 0.3 + 0.7 source:setColorTransform(r, g, b, 1) frame = frame + 1 rt:draw(source) end) </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/RenderTarget.new|RenderTarget.new]] ''<translate>Creates new RenderTarget object</translate>''<br/><!-- GIDEROSMTD:RenderTarget.new(width,height,filtering,repeat,autoscale) Creates new RenderTarget object --> [[Special:MyLanguage/RenderTarget:clear|RenderTarget:clear]] ''<translate>Clears rendered texture</translate>''<br/><!-- GIDEROSMTD:RenderTarget:clear(color,alpha,x,y,width,height) Clears rendered texture --> [[Special:MyLanguage/RenderTarget:draw|RenderTarget:draw]] ''<translate>Renders provided object</translate>''<br/><!-- GIDEROSMTD:RenderTarget:draw(sprite,x,y) Renders provided object --> [[Special:MyLanguage/RenderTarget:getPixel|RenderTarget:getPixel]] ''<translate>Returns single pixels color and alpha channel</translate>''<br/><!-- GIDEROSMTD:RenderTarget:getPixel(x,y) Returns single pixels color and alpha channel --> [[Special:MyLanguage/RenderTarget:getPixels|RenderTarget:getPixels]] ''<translate>Returns buffer containing color and alpha data from provided rectangle</translate>''<br/><!-- GIDEROSMTD:RenderTarget:getPixels(x,y,w,h) Returns buffer containing color and alpha data from provided rectangle --> [[Special:MyLanguage/RenderTarget:save|RenderTarget:save]] ''<translate>save contents of RenderTarget as image</translate>''<br/><!-- GIDEROSMTD:RenderTarget:save(filename,x,y,width,height) save contents of RenderTarget as image --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} f37fv902t64ii0cuhagi5zpvboqapix RenderTarget.new 0 823 14171 13504 2019-12-03T21:37:06Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/RenderTarget|RenderTarget]]<br/> === <translate>Description</translate> === <translate>Creates new RenderTarget object</translate> <source lang="lua"> RenderTarget.new(width,height,filtering,repeat,autoscale,depth) </source> === <translate>Parameters</translate> === '''width''': (number) <translate>width of rendered texture</translate> <br/> '''height''': (number) <translate>height of rendered texture</translate> <br/> '''filtering''': (boolean, default = false) <translate>Whether or not the texture is filtered.</translate> <br/> '''repeat''': (boolean, default = false) <translate>Whether or not the texture is repeating.</translate> <br/> '''autoscale''': (boolean, default = false) <translate>Whether or not the actual texture size should be scaled to match display resolution.</translate> <br/> '''depth''': (boolean, default = false) <translate>Indicates this rendertarget will hold depth compoenent. Setting this to true creates a render target suitable for shadow mapping.</translate> <br/> {{RenderTarget}} q2voqfdp0q6kgxfxqyx2om017jf5u79 RenderTarget:clear 0 514 14172 10006 2019-12-03T21:37:19Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/RenderTarget|RenderTarget]]<br/> === <translate>Description</translate> === <translate>Clears rendered texture with provided color and opacity</translate> <source lang="lua"> RenderTarget:clear(color,alpha,x,y,width,height) </source> === <translate>Parameters</translate> === '''color''': (number) <translate>color using which to clear the texture</translate> <br/> '''alpha''': (number) <translate>transparency using which to clear the texture</translate> <br/> '''x''': (number) <translate>relative x coordinate</translate> '''optional'''<br/> '''y''': (number) <translate>relative y coordinate</translate> '''optional'''<br/> '''width''': (number) <translate>width of the area to clear starting from x coordinate</translate> '''optional'''<br/> '''height''': (number) <translate>height of the area to clear starting from y coordinate</translate> '''optional'''<br/> {{RenderTarget}} b87494ial9gd3m6fgxta80cgjf7dd1l RenderTarget:draw 0 395 14173 9843 2019-12-03T21:37:31Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/RenderTarget|RenderTarget]]<br/> === <translate>Description</translate> === <translate>Renders provided object or object hierarchy as a texture.</translate> <source lang="lua"> RenderTarget:draw(sprite,x,y) </source> === <translate>Parameters</translate> === '''sprite''': (Sprite) <translate>any sprite inherited object or object hierarchy to render (this object doesn't need to be added to the stage hierarchy)</translate> <br/> '''x''': (number, default = 0) <translate>The x start position of the texture</translate> '''optional'''<br/> '''y''': (number, default = 0) <translate>The y start position of the texture</translate> '''optional'''<br/> {{RenderTarget}} b4szbyvrp9dazyc8pnjxs7lmdcv4gnx RenderTarget:getPixel 0 890 14174 10377 2019-12-03T21:37:44Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/RenderTarget|RenderTarget]]<br/> === <translate>Description</translate> === <translate>Returns single pixels color and alpha channel</translate> <source lang="lua"> (number), (number) = RenderTarget:getPixel(x,y) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>x coordinate of pixel</translate> <br/> '''y''': (number) <translate>y coordinate of pixel</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>color in hex</translate><br/> '''<translate>Returns</translate>''' (number) <translate>alpha value from 0 to 1</translate><br/> {{RenderTarget}} qpov1538375746e8rmamwxg9n6iojrg RenderTarget:getPixels 0 808 14175 10691 2019-12-03T21:37:59Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/RenderTarget|RenderTarget]]<br/> === <translate>Description</translate> === <translate>Returns buffer containing color and alpha data from provided rectangle</translate> <source lang="lua"> (buffer) = RenderTarget:getPixels(x,y,w,h) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>x coordinate of pixel</translate> <br/> '''y''': (number) <translate>y coordinate of pixel</translate> <br/> '''w''': (number) <translate>width of rectangle to include in buffer</translate> <br/> '''h''': (number) <translate>height of rectangle to include in buffer</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (buffer) <translate>buffer with color and alpha data</translate><br/> {{RenderTarget}} j3we9ohhxryc7rvz4l5k0m7razvb1vv RenderTarget:save 0 914 14176 10755 2019-12-03T21:38:11Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.08<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/RenderTarget|RenderTarget]]<br/> === <translate>Description</translate> === <translate>save contents of RenderTarget as image</translate> <source lang="lua"> RenderTarget:save(filename,x,y,width,height) </source> === <translate>Parameters</translate> === '''filename''': (string) <translate>filename and path to store file, like |D|image.png</translate> <br/> '''x''': (number) <translate>x coordinate from where to start image</translate> '''optional'''<br/> '''y''': (number) <translate>y coordinate from where to start image</translate> '''optional'''<br/> '''width''': (number) <translate>width of the image to save</translate> '''optional'''<br/> '''height''': (number) <translate>height of the image to save</translate> '''optional'''<br/> {{RenderTarget}} 1x7pe43ims8vg0x5p5s9kziozvsx9w6 Screen 0 109 14963 14178 2019-12-09T22:58:20Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Screen --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2017.8<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> === <translate>Description</translate> === <translate>Screen class allows to access secondary displays or windows.</translate> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Screen.new|Screen.new]] ''<translate>Open a new screen</translate>''<br/><!-- GIDEROSMTD:Screen.new(id) Open a new screen --> [[Special:MyLanguage/Screen:clear|Screen:clear]] ''<translate>Sets the background color of this screen</translate>''<br/><!-- GIDEROSMTD:Screen:clear(color,alpha) Sets the background color of this screen --> [[Special:MyLanguage/Screen:getId|Screen:getId]] ''<translate>Returns the screen's id</translate>''<br/><!-- GIDEROSMTD:Screen:getId() Returns the screen's id --> [[Special:MyLanguage/Screen:getMaxSize|Screen:getMaxSize]] ''<translate>Returns the maximum size this screen can have</translate>''<br/><!-- GIDEROSMTD:Screen:getMaxSize() Returns the maximum size this screen can have --> [[Special:MyLanguage/Screen:getPosition|Screen:getPosition]] ''<translate>Returns the position of this screen</translate>''<br/><!-- GIDEROSMTD:Screen:getPosition() Returns the position of this screen --> [[Special:MyLanguage/Screen:getSize|Screen:getSize]] ''<translate>Returns the size of this screen</translate>''<br/><!-- GIDEROSMTD:Screen:getSize() Returns the size of this screen --> [[Special:MyLanguage/Screen:getState|Screen:getState]] ''<translate>Returns the state of this screen</translate>''<br/><!-- GIDEROSMTD:Screen:getState() Returns the state of this screen --> [[Special:MyLanguage/Screen:setContent|Screen:setContent]] <br/><!-- GIDEROSMTD:Screen:setContent(content) --> [[Special:MyLanguage/Screen:setPosition|Screen:setPosition]] ''<translate>Sets the position of this screen, if possible.</translate>''<br/><!-- GIDEROSMTD:Screen:setPosition(x,y) Sets the position of this screen, if possible. --> [[Special:MyLanguage/Screen:setSize|Screen:setSize]] ''<translate>Sets the size of this screen, if possible.</translate>''<br/><!-- GIDEROSMTD:Screen:setSize(w,h) Sets the size of this screen, if possible. --> [[Special:MyLanguage/Screen:setState|Screen:setState]] ''<translate>Sets the state of this screen, if possible.</translate>''<br/><!-- GIDEROSMTD:Screen:setState(state) Sets the state of this screen, if possible. --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} l4elwfkcbexm3vkxro6zb0zltu5ya1o Screen.new 0 747 14179 10272 2019-12-03T21:40:56Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Screen|Screen]]<br/> === <translate>Description</translate> === <translate>Open a screen of the specified platform dependant type id. For desktop exports, set id to 0.</translate> <source lang="lua"> Screen.new(id) </source> === <translate>Parameters</translate> === '''id''': (number) <translate>The kind of screen to open, platform dependant</translate> <br/> {{Screen}} ruwbkajluouyc8r01phpuojmgj72abl Screen:clear 0 1148 14180 10611 2019-12-03T21:41:08Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Screen|Screen]]<br/> === <translate>Description</translate> === <translate>Sets this screen's background to the provided color and opacity</translate> <source lang="lua"> Screen:clear(color,alpha) </source> === <translate>Parameters</translate> === '''color''': (number) <translate>background color</translate> <br/> '''alpha''': (number) <translate>background transparency</translate> <br/> {{Screen}} f4p7kgl63bhe1ici9khjyhe3voeylyy Screen:getId 0 246 14181 9654 2019-12-03T21:41:20Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Screen|Screen]]<br/> === <translate>Description</translate> === <translate>Return the id this screens was created with.</translate> <source lang="lua"> (number) = Screen:getId() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The Screen's id</translate><br/> {{Screen}} 1ooi5m726r26m585zakvdruf6byrp46 Screen:getMaxSize 0 169 14182 9562 2019-12-03T21:41:32Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Screen|Screen]]<br/> === <translate>Description</translate> === <translate>Returns the maximum size this screen can have, typically the display size for a windowed system.</translate> <source lang="lua"> (number), (number) = Screen:getMaxSize() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The Screen's maximum width</translate><br/> '''<translate>Returns</translate>''' (number) <translate>The Screen's maximum height</translate><br/> {{Screen}} cq5wetiz8mew4jxc9b07xl2r4i7t4m8 Screen:getPosition 0 412 14183 9863 2019-12-03T21:41:47Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Screen|Screen]]<br/> === <translate>Description</translate> === <translate>Return the position of the screen on the display, for windowed systems</translate> <source lang="lua"> (number), (number) = Screen:getPosition() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The Screen's x coordinate</translate><br/> '''<translate>Returns</translate>''' (number) <translate>The Screen's y coordinate</translate><br/> {{Screen}} 3t2qw7vtzsosdf8x8nilugyadef8oze Screen:getSize 0 956 14184 10780 2019-12-03T21:41:59Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Screen|Screen]]<br/> === <translate>Description</translate> === <translate>Return the width and height of the screen</translate> <source lang="lua"> (number), (number) = Screen:getSize() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The Screen's width</translate><br/> '''<translate>Returns</translate>''' (number) <translate>The Screen's height</translate><br/> {{Screen}} 7d9ow0y492r5c9wq5t77pp6msj0h7fs Screen:getState 0 1008 14185 10449 2019-12-03T21:42:13Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Screen|Screen]]<br/> === <translate>Description</translate> === <translate>Return the state of the screen. The returned number is the or-sum of the following possible values: * Screen.STATE_MINIMIZED: Screen/Window is minimized. * Screen.STATE_MAXIMIZED: Screen/Window is maximized. * Screen.STATE_FULLSCREEN: Screen/Window is fullscreen. * Screen.STATE_ACTIVE: Screen/Window is active/focused. * Screen.STATE_HIDDEN: Screen/Window is not displayed. * Screen.STATE_CLOSED: Screen/Window is closed.</translate> <source lang="lua"> (number) = Screen:getState() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The Screen's state</translate><br/> {{Screen}} 9rll77fhq3lvfc3j3ys8gfh188e2sew Screen:setContent 0 260 14186 9672 2019-12-03T21:42:30Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Screen|Screen]]<br/> === <translate>Description</translate> === <translate>Specify which sprite should be displayed by this Screen</translate> <source lang="lua"> Screen:setContent(content) </source> === <translate>Parameters</translate> === '''content''': (sprite) <translate>The sprite hierarchy to be displayed by this Screen</translate> <br/> {{Screen}} dwilaa0ijmcm7vpmldsbh6adkoa0gqk Screen:setPosition 0 640 14187 10170 2019-12-03T21:42:42Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Screen|Screen]]<br/> === <translate>Description</translate> === <translate>Attempts to position this screen or window, if allowed by the platform.</translate> <source lang="lua"> Screen:setPosition(x,y) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>The new x coordinate</translate> <br/> '''y''': (number) <translate>The new y coordinate</translate> <br/> {{Screen}} clxu3mx0d1b7to4e8lw45z6dqmlkjx1 Screen:setSize 0 382 14188 9823 2019-12-03T21:42:54Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Screen|Screen]]<br/> === <translate>Description</translate> === <translate>Attempts to fix the size of this screen or window, if allowed by the platform.</translate> <source lang="lua"> Screen:setSize(w,h) </source> === <translate>Parameters</translate> === '''w''': (number) <translate>The new width</translate> <br/> '''h''': (number) <translate>The new height</translate> <br/> {{Screen}} px0h4edmyopslk4px809c11iazmck0e Screen:setState 0 1047 14189 10494 2019-12-03T21:43:05Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Screen|Screen]]<br/> === <translate>Description</translate> === <translate>Attempts to configure this screen or window, if allowed by the platform.</translate> <source lang="lua"> Screen:setState(state) </source> === <translate>Parameters</translate> === '''state''': (number) <translate>The required state of this screen</translate> <br/> {{Screen}} omr9eqob1s0tupsdwc8sn1ch4ubc0fg Shader 0 84 14983 14965 2019-12-10T01:13:40Z MoKaLux 19 formatting wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Shader --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> === <translate>Description</translate> === <translate>Gideros internally uses five distinct shaders: *the ‘Basic’ shader handle shapes with a constant color *the ‘Color’ shader handle shapes with per-vertex colors (mostly used by Mesh sprite) *the ‘Texture’ shader handle textured shapes (Bitmaps) *the ‘TextureColor’ shader handle textured and per-vertex colored shapes *and the ‘Particle’ shader deals with Box2D particle systems The new shader API allows to replace the default shader used by Gideros with a custom one, on a sprite per sprite basis. As with most of Gideros API’s this one is straight-forward: create a Shader object and assign it to one or several sprites. That said, since Gideros will use your shader as if it was the standard one, you will have to make sure that your custom shader is compatible with the standard one, which essentially means that it takes the same input parameters.</translate> === <translate>Examples</translate> === <source lang="lua"> --Shaders are in vShader.glsl and fShader.glsl files local shader=Shader.new("vShader","fShader",0, { {name="vMatrix",type=Shader.CMATRIX,sys=Shader.SYS_WVP,vertex=true}, {name="fColor",type=Shader.CFLOAT4,sys=Shader.SYS_COLOR,vertex=false}, {name="fTexture",type=Shader.CTEXTURE,vertex=false}, {name="fTexelSize",type=Shader.CFLOAT4,vertex=false}, {name="fRad",type=Shader.CINT,vertex=false}, }, { {name="vVertex",type=Shader.DFLOAT,mult=3,slot=0,offset=0}, {name="vColor",type=Shader.DUBYTE,mult=4,slot=1,offset=0}, {name="vTexCoord",type=Shader.DFLOAT,mult=2,slot=2,offset=0}, }); shader:setConstant("fRad",Shader.CINT,1,0) --Initial blur level shader:setConstant("fTexelSize",Shader.CFLOAT4,1,{1/texw,1/texh,0,0}) --Initial texel size sprite:setShader(shader) </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Shader.new|Shader.new]] ''<translate>create new shader</translate>''<br/><!-- GIDEROSMTD:Shader.new(vertex shader,fragment shader,flags,uniform descriptor,attribute descriptor) create new shader --> [[Special:MyLanguage/Shader:getEngineVersion|Shader:getEngineVersion]] ''<translate>get shader version</translate>''<br/><!-- GIDEROSMTD:Shader:getEngineVersion() get shader version --> [[Special:MyLanguage/Shader:getProperties|Shader:getProperties]] ''<translate>get graphics engine properties</translate>''<br/><!-- GIDEROSMTD:Shader:getProperties() get graphics engine properties --> [[Special:MyLanguage/Shader:getShaderLanguage|Shader:getShaderLanguage]] ''<translate>Get shader language</translate>''<br/><!-- GIDEROSMTD:Shader:getShaderLanguage() Get shader language --> [[Special:MyLanguage/Shader:setConstant|Shader:setConstant]] ''<translate>change the value of a uniform</translate>''<br/><!-- GIDEROSMTD:Shader:setConstant(uniform name,data type,mult,data) change the value of a uniform --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === [[Special:MyLanguage/Shader.CFLOAT|Shader.CFLOAT]]<br/><!-- GIDEROSCST:Shader.CFLOAT 1--> [[Special:MyLanguage/Shader.CFLOAT4|Shader.CFLOAT4]]<br/><!-- GIDEROSCST:Shader.CFLOAT4 2--> [[Special:MyLanguage/Shader.CINT|Shader.CINT]]<br/><!-- GIDEROSCST:Shader.CINT 0--> [[Special:MyLanguage/Shader.CMATRIX|Shader.CMATRIX]]<br/><!-- GIDEROSCST:Shader.CMATRIX 3--> [[Special:MyLanguage/Shader.CTEXTURE|Shader.CTEXTURE]]<br/><!-- GIDEROSCST:Shader.CTEXTURE 4--> [[Special:MyLanguage/Shader.DBYTE|Shader.DBYTE]]<br/><!-- GIDEROSCST:Shader.DBYTE 0--> [[Special:MyLanguage/Shader.DFLOAT|Shader.DFLOAT]]<br/><!-- GIDEROSCST:Shader.DFLOAT 5--> [[Special:MyLanguage/Shader.DINT|Shader.DINT]]<br/><!-- GIDEROSCST:Shader.DINT 4--> [[Special:MyLanguage/Shader.DSHORT|Shader.DSHORT]]<br/><!-- GIDEROSCST:Shader.DSHORT 2--> [[Special:MyLanguage/Shader.DUBYTE|Shader.DUBYTE]]<br/><!-- GIDEROSCST:Shader.DUBYTE 1--> [[Special:MyLanguage/Shader.DUSHORT|Shader.DUSHORT]]<br/><!-- GIDEROSCST:Shader.DUSHORT 3--> [[Special:MyLanguage/Shader.FLAG_FROM_CODE|Shader.FLAG_FROM_CODE]]<br/><!-- GIDEROSCST:Shader.FLAG_FROM_CODE 4--> [[Special:MyLanguage/Shader.FLAG_NONE|Shader.FLAG_NONE]]<br/><!-- GIDEROSCST:Shader.FLAG_NONE 0--> [[Special:MyLanguage/Shader.FLAG_NO_DEFAULT_HEADER|Shader.FLAG_NO_DEFAULT_HEADER]]<br/><!-- GIDEROSCST:Shader.FLAG_NO_DEFAULT_HEADER 1--> [[Special:MyLanguage/Shader.SYS_COLOR|Shader.SYS_COLOR]]<br/><!-- GIDEROSCST:Shader.SYS_COLOR 2--> [[Special:MyLanguage/Shader.SYS_NONE|Shader.SYS_NONE]]<br/><!-- GIDEROSCST:Shader.SYS_NONE 0--> [[Special:MyLanguage/Shader.SYS_PARTICLESIZE|Shader.SYS_PARTICLESIZE]]<br/><!-- GIDEROSCST:Shader.SYS_PARTICLESIZE 6--> [[Special:MyLanguage/Shader.SYS_TEXTUREINFO|Shader.SYS_TEXTUREINFO]]<br/><!-- GIDEROSCST:Shader.SYS_TEXTUREINFO 5--> [[Special:MyLanguage/Shader.SYS_WIT|Shader.SYS_WIT]]<br/><!-- GIDEROSCST:Shader.SYS_WIT 3--> [[Special:MyLanguage/Shader.SYS_WORLD|Shader.SYS_WORLD]]<br/><!-- GIDEROSCST:Shader.SYS_WORLD 4--> [[Special:MyLanguage/Shader.SYS_WVP|Shader.SYS_WVP]]<br/><!-- GIDEROSCST:Shader.SYS_WVP 1--> |} 134bxrusd9boqum5jkerr3ze97j2c0c Shader.CFLOAT 0 1205 14198 9665 2019-12-03T22:22:57Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 1<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>Uniform descriptor CFLOAT data type</translate> {{Shader}} 8bmcxeodux7tdemr0jhpjqfr3xta3jj Shader.CFLOAT4 0 1378 14199 10841 2019-12-03T22:24:32Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 2<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>Uniform descriptor CFLOAT4 data type</translate> {{Shader}} e6d600mgpcpo4hy2uleikojicqd23hn Shader.CINT 0 1204 14200 9661 2019-12-03T22:24:43Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 0<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>Uniform descriptor CINT data type</translate> {{Shader}} 79es62lxn5hd6b8f55u19woysin2kxq Shader.CMATRIX 0 1224 14201 9768 2019-12-03T22:24:54Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 3<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>Uniform descriptor CMATRIX data type</translate> {{Shader}} p925sbcijlv66rb74tmgf3bazgo05b1 Shader.CTEXTURE 0 1275 14202 10707 2019-12-03T22:25:05Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 4<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>Uniform descriptor CTEXTURE data type</translate> {{Shader}} crwpgsiebyw5xjrm7ve1miyrkqbv2to Shader.DBYTE 0 1359 14203 9978 2019-12-03T22:25:17Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 0<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>Attributes descriptor DBYTE data type</translate> {{Shader}} eoe9dbpykypgeclcv7ttm82v2v8uztr Shader.DFLOAT 0 1186 14204 9529 2019-12-03T22:25:28Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 5<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>Attributes descriptor DFLOAT data type</translate> {{Shader}} hcmh4acik9jb0lotgm3euvg5bwy381p Shader.DINT 0 1262 14205 10635 2019-12-03T22:25:38Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 4<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>Attributes descriptor DINT data type</translate> {{Shader}} 8nrzdhutmlar7emw18lg8zhbtmh805b Shader.DSHORT 0 1348 14206 10607 2019-12-03T22:25:49Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 2<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>Attributes descriptor DSHORT data type</translate> {{Shader}} 2adsxb0z6m55qda0cya2a7dcsxwenne Shader.DUBYTE 0 1258 14207 10219 2019-12-03T22:26:00Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 1<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>Attributes descriptor DUBYTE data type</translate> {{Shader}} 2e7gqt5jheaysuypabwm7icdwwqwwip Shader.DUSHORT 0 1266 14208 10670 2019-12-03T22:26:14Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 3<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>Attributes descriptor DUSHORT data type</translate> {{Shader}} 334ngomwm9o8g2rkuhlqcoib53s1ed9 Shader.FLAG FROM CODE 0 1248 14209 10059 2019-12-03T22:26:26Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.08<br/> '''<translate>Value</translate>:''' 4<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>Shader loaded from code</translate> {{Shader}} 36wje3butl3yctlh4946r20hld2zkr7 Shader.FLAG NONE 0 1344 14210 10575 2019-12-03T22:26:38Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 0<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>No flags</translate> {{Shader}} aa2pl05rfxwovafa6byq6og6f5rbgq7 Shader.FLAG NO DEFAULT HEADER 0 1252 14211 10152 2019-12-03T22:26:52Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 1<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>Suppress the automatic addition of a default header for GLSL programs.</translate> {{Shader}} 1t0r5kn7e52z2ckee46tqhgqb7jg0j7 Shader.SYS COLOR 0 1335 14212 10850 2019-12-03T22:27:05Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 2<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>this uniform of type CFLOAT4 will hold the constant color to be used to draw the shape</translate> {{Shader}} 2dbt0awll8fi940e3ok2b37ns725u3o Shader.SYS NONE 0 1200 14213 9627 2019-12-03T22:33:05Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 0<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>none</translate> {{Shader}} 01f2j6w920m2jk0ggl8pojsbarmw89i Shader.SYS PARTICLESIZE 0 1221 14214 9757 2019-12-03T22:33:27Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 6<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>the uniform of type CFLOAT will hold the particle size to use in a particle shader.</translate> {{Shader}} nkrby17ddogp14ezztvvtydzjd7k06u Shader.SYS TEXTUREINFO 0 1232 14215 9871 2019-12-03T22:33:42Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 5<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>this uniform of type CFLOAT4 will hold information about the texture used in a particle shader.</translate> {{Shader}} 8iewc9ttasfr0589hsge3n12md7qdnz Shader.SYS WIT 0 1238 14216 9955 2019-12-03T22:33:56Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 3<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>this uniform of type CMATRIX will hold the World Inverse Transpose matrix</translate> {{Shader}} ijlo74w1z328ihfvgagghbqojhh198t Shader.SYS WORLD 0 1374 14217 10217 2019-12-03T22:34:08Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 4<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>this uniform of type CMATRIX will hold the World transform matrix</translate> {{Shader}} 5mrhnlk4hws65rh66ve9appkp80v5fy Shader.SYS WVP 0 1245 14218 10015 2019-12-03T22:34:21Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 1<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>this uniform of type CMATRIX will hold the World/View/Projection matrix</translate> {{Shader}} ql9eouunz5irac4njzdayfjp7vnikqf Shader.new 0 714 14193 10250 2019-12-03T22:21:34Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>Create new shader instance. The ‘Shader.new()’ constructor takes five arguments: - The path and name for the vertex shader without its extension. Gideros will search the assets for a file with the supplied name, automatically adding the extension relevant for the target platform: .glsl for OpenGL, .cso or .hlsl for DirectX. - The path and name for the fragment shader without its extension. Same remark as above applies too. - A set of numerical flags or 0 if none. See description below. - An array of uniforms/constants descriptors - An array of attributes descriptors</translate> <source lang="lua"> Shader.new(vertex shader,fragment shader,flags,uniform descriptor,attribute descriptor) </source> === <translate>Parameters</translate> === '''vertex shader''': (string) <translate>The path and name for the vertex shader without its extension</translate> <br/> '''fragment shader''': (string) <translate>The path and name for the fragment shader without its extension</translate> <br/> '''flags''': (number) <translate>A set of numerical flags or 0 if none</translate> <br/> '''uniform descriptor''': (table) <translate>An array of uniforms/constants descriptors</translate> <br/> '''attribute descriptor''': (table) <translate>An array of attributes descriptors</translate> <br/> === <translate>Examples</translate> === '''Shader example'''<br/> <source lang="lua">--Shaders are in vShader.glsl and fShader.glsl files local shader=Shader.new("vShader","fShader",0, { {name="vMatrix",type=Shader.CMATRIX,sys=Shader.SYS_WVP,vertex=true}, {name="fColor",type=Shader.CFLOAT4,sys=Shader.SYS_COLOR,vertex=false}, {name="fTexture",type=Shader.CTEXTURE,vertex=false}, {name="fTexelSize",type=Shader.CFLOAT4,vertex=false}, {name="fRad",type=Shader.CINT,vertex=false}, }, { {name="vVertex",type=Shader.DFLOAT,mult=3,slot=0,offset=0}, {name="vColor",type=Shader.DUBYTE,mult=4,slot=1,offset=0}, {name="vTexCoord",type=Shader.DFLOAT,mult=2,slot=2,offset=0}, }); shader:setConstant("fRad",Shader.CINT,1,0) --Initial blur level shader:setConstant("fTexelSize",Shader.CFLOAT4,1,{1/texw,1/texh,0,0}) --Initial texel size sprite:setShader(shader)</source> {{Shader}} s9u386r38ztxad4ynnfrx2o6wa31e2p Shader:getEngineVersion 0 293 14194 9715 2019-12-03T22:21:49Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>Returns the version of the shader engine</translate> <source lang="lua"> (string) = Shader:getEngineVersion() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>shader engine version</translate><br/> {{Shader}} o2c5u339waz29hfxzy5jlrjg01sbhc5 Shader:getProperties 0 579 14195 10101 2019-12-03T22:22:17Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.1<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>Returns a table containing various characteristics of the graphics engine</translate> <source lang="lua"> (table) = Shader:getProperties() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>graphics engine properties</translate><br/> {{Shader}} 3qidrqfl9djuodq1ct40jm5os503cu3 Shader:getShaderLanguage 0 1039 14196 10839 2019-12-03T22:22:29Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.08<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>Get shader language, returns string with values as: glsl or hlsl</translate> <source lang="lua"> Shader:getShaderLanguage() </source> {{Shader}} f92f7quk4txpefv9iz1d6gnigfqw8s9 Shader:setConstant 0 935 14197 10400 2019-12-03T22:22:44Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Shader|Shader]]<br/> === <translate>Description</translate> === <translate>To change the value of a uniform from lua</translate> <source lang="lua"> Shader:setConstant(uniform name,data type,mult,data) </source> === <translate>Parameters</translate> === '''uniform name''': (string) <translate>The uniform name to change</translate> <br/> '''data type''': (int) <translate>The type if data to set (one of the Shader.Cxxx constants)</translate> <br/> '''mult''': (number) <translate>number of elements of the given type to set</translate> <br/> '''data''': (varies) <translate>And the actual data to set, either as a table or as multiple arguments</translate> <br/> {{Shader}} cw666agk6dxyf8gfws01cwolncsjnjh Shape 0 48 14966 14220 2019-12-09T23:02:14Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Shape --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === The [[Special:MyLanguage/Shape|Shape]] class is used to create and display vector graphics. === <translate>Examples</translate> === '''Drawing a red square:''' <source lang="lua"> local shape = Shape.new() shape:setFillStyle(Shape.SOLID, 0xff0000, 1) shape:beginPath() shape:moveTo(0,0) shape:lineTo(100, 0) shape:lineTo(100, 100) shape:lineTo(0, 100) shape:lineTo(0, 0) shape:endPath() shape:setPosition(0, 150) stage:addChild(shape) </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Shape.new|Shape.new]] ''<translate>creates a new Shape object</translate>''<br/><!-- GIDEROSMTD:Shape.new() creates a new Shape object --> [[Special:MyLanguage/Shape:beginPath|Shape:beginPath]] ''<translate>resets the current path</translate>''<br/><!-- GIDEROSMTD:Shape:beginPath(winding) resets the current path --> [[Special:MyLanguage/Shape:clear|Shape:clear]] ''<translate>clears the graphics that were drawn to this Shape object, and resets fill and line style settings</translate>''<br/><!-- GIDEROSMTD:Shape:clear() clears the graphics that were drawn to this Shape object, and resets fill and line style settings --> [[Special:MyLanguage/Shape:closePath|Shape:closePath]] ''<translate>marks the current subpath as closed, and starts a new subpath with a point the same as the start and end of the newly closed subpath</translate>''<br/><!-- GIDEROSMTD:Shape:closePath() marks the current subpath as closed, and starts a new subpath with a point the same as the start and end of the newly closed subpath --> [[Special:MyLanguage/Shape:endPath|Shape:endPath]] ''<translate>ends the current path and draws the geometry by using the specified line and fill styles</translate>''<br/><!-- GIDEROSMTD:Shape:endPath() ends the current path and draws the geometry by using the specified line and fill styles --> [[Special:MyLanguage/Shape:lineTo|Shape:lineTo]] ''<translate>adds the given point to the current subpath, connected to the previous one by a straight line.</translate>''<br/><!-- GIDEROSMTD:Shape:lineTo(x,y) adds the given point to the current subpath, connected to the previous one by a straight line. --> [[Special:MyLanguage/Shape:moveTo|Shape:moveTo]] ''<translate>creates a new subpath with the given point</translate>''<br/><!-- GIDEROSMTD:Shape:moveTo(x,y) creates a new subpath with the given point --> [[Special:MyLanguage/Shape:setFillStyle|Shape:setFillStyle]] ''<translate>sets the fill style that Shape object uses for subsequent drawings</translate>''<br/><!-- GIDEROSMTD:Shape:setFillStyle(type,...) sets the fill style that Shape object uses for subsequent drawings --> [[Special:MyLanguage/Shape:setLineStyle|Shape:setLineStyle]] ''<translate>sets the line style that Shape object uses for subsequent drawings</translate>''<br/><!-- GIDEROSMTD:Shape:setLineStyle(width,color,alpha) sets the line style that Shape object uses for subsequent drawings --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === [[Special:MyLanguage/Shape.EVEN_ODD|Shape.EVEN_ODD]]<br/><!-- GIDEROSCST:Shape.EVEN_ODD evenOdd--> [[Special:MyLanguage/Shape.NONE|Shape.NONE]]<br/><!-- GIDEROSCST:Shape.NONE none--> [[Special:MyLanguage/Shape.NON_ZERO|Shape.NON_ZERO]]<br/><!-- GIDEROSCST:Shape.NON_ZERO nonZero--> [[Special:MyLanguage/Shape.SOLID|Shape.SOLID]]<br/><!-- GIDEROSCST:Shape.SOLID solid--> [[Special:MyLanguage/Shape.TEXTURE|Shape.TEXTURE]]<br/><!-- GIDEROSCST:Shape.TEXTURE texture--> |} p12wh4nug0to07ylfc39n34awo51aer Shape.EVEN ODD 0 1363 14231 10022 2019-12-03T22:42:28Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' evenOdd<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shape|Shape]]<br/> === <translate>Description</translate> === <translate></translate> {{Shape}} 0ocx5z1qa0ye9wjpexs99lgkn4prhwv Shape.NONE 0 1292 14232 10764 2019-12-03T22:42:46Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' none<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shape|Shape]]<br/> === <translate>Description</translate> === <translate></translate> {{Shape}} l2mi4vj5r3qcm48ovj43ktowby6gthi Shape.NON ZERO 0 1332 14233 10495 2019-12-03T22:42:57Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' nonZero<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shape|Shape]]<br/> === <translate>Description</translate> === <translate></translate> {{Shape}} aa1fep6ohj30y5ixytemf6qyawecdg1 Shape.SOLID 0 1368 14234 10105 2019-12-03T22:43:08Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' solid<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shape|Shape]]<br/> === <translate>Description</translate> === <translate></translate> {{Shape}} r1kdkoo5fmf5dpgr6bn057jkqzfmp80 Shape.TEXTURE 0 1195 14235 9601 2019-12-03T22:43:19Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' texture<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Shape|Shape]]<br/> === <translate>Description</translate> === <translate></translate> {{Shape}} 8hc5e7q7tyqabvdz6o4q01qe3s18xbp Shape.new 0 646 14222 10182 2019-12-03T22:40:03Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Shape|Shape]]<br/> === <translate>Description</translate> === <translate><br /> Creates a new [[Special:MyLanguage/Shape|Shape]] object.<br /> <br /></translate> <source lang="lua"> Shape.new() </source> {{Shape}} 9egcfzt21ngdcd3q9hh50sm100f9ihf Shape:beginPath 0 1052 14223 10497 2019-12-03T22:40:16Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Shape|Shape]]<br/> === <translate>Description</translate> === <translate><br /> Resets the current path.<br /> <br /></translate> <source lang="lua"> Shape:beginPath(winding) </source> === <translate>Parameters</translate> === '''winding''': (string, default = Shape.EVEN_ODD) <translate>Specifies the winding rule. It can be either Shape.EVEN_ODD or Shape.NON_ZERO.</translate> <br/> {{Shape}} p6vq1jld3ghylvfo90cidtj0qdevam6 Shape:clear 0 1026 14224 10470 2019-12-03T22:40:29Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Shape|Shape]]<br/> === <translate>Description</translate> === <translate><br /> Clears the graphics that were drawn to this [[Special:MyLanguage/Shape|Shape]] object, and resets fill and line style settings.<br /> <br /></translate> <source lang="lua"> Shape:clear() </source> {{Shape}} iwwj2grq6lr6rt8g5myhkfn8ezgmy1h Shape:closePath 0 936 14225 10402 2019-12-03T22:40:41Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Shape|Shape]]<br/> === <translate>Description</translate> === <translate><br /> Marks the current subpath as closed, and starts a new subpath with a point the same as the start and end of the newly closed subpath.<br /> <br /></translate> <source lang="lua"> Shape:closePath() </source> {{Shape}} jo3p4f1pfcg9824b6xel0ovs0vafw8z Shape:endPath 0 1151 14226 10000 2019-12-03T22:40:53Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Shape|Shape]]<br/> === <translate>Description</translate> === <translate><br /> Ends the current path and draws the geometry by using the specified line and fill styles. <br /> <br /></translate> <source lang="lua"> Shape:endPath() </source> {{Shape}} ri2rfzmqbk5fhhsqec47rc6vl5t92mz Shape:lineTo 0 145 14227 9523 2019-12-03T22:41:06Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Shape|Shape]]<br/> === <translate>Description</translate> === <translate><br /> Adds the given point to the current subpath, connected to the previous one by a straight line.<br /> <br /></translate> <source lang="lua"> Shape:lineTo(x,y) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>x coordinate of the point.</translate> <br/> '''y''': (number) <translate>y coordinate of the point.</translate> <br/> {{Shape}} fx5ubg4uisko0kqvz8v7o17rloqi9j8 Shape:moveTo 0 354 14228 9792 2019-12-03T22:41:19Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Shape|Shape]]<br/> === <translate>Description</translate> === <translate><br /> Creates a new subpath with the given point.<br /> <br /></translate> <source lang="lua"> Shape:moveTo(x,y) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>x coordinate of the point.</translate> <br/> '''y''': (number) <translate>y coordinate of the point.</translate> <br/> {{Shape}} crqkmrlm9v5cgldryfvlamc3fgaqe72 Shape:setFillStyle 0 166 14229 13424 2019-12-03T22:41:50Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Shape|Shape]] <br/> === <translate>Description</translate> === <translate> <br/> Sets the fill style that [[Special:MyLanguage/Shape|Shape]] object uses for subsequent drawings. The fill style remains in effect until you call ''setFillStyle()'' function with different parameters. <br/> <br/> See the following example for more detailed usage of this function: <br/> <source lang="lua"> Shape:setFillStyle(type,...) </source> <br/> [[Special:MyLanguage/type|type]] parameter can be one of the following values:<br/> <ul> <li>'''Shape.NONE''': Clears the fill style.</li> <li>'''Shape.SOLID''': Sets the fill style as a solid color. In this mode, the parameters are color (in hexedecial value) and an optional alpha value.</li> <li>'''Shape.TEXTURE''': Sets the fill style as a textured. In this mode, the parameters are texture and an optional transformation matrix.</li> </ul> </translate> <br/> === <translate>Parameters</translate> === <br/> '''type''': (string) <translate>The type of the fill. Can be one of the Shape.NONE, Shape.SOLID or Shape.TEXTURE.</translate> '''...''': (any) <translate>Parameters of the fill style.</translate> <br/> <br/> === <translate>Examples</translate> === <br/> '''Examples''' <br/> <source lang="lua"> setFillStyle(Shape.NONE) -- clears the fill style setFillStyle(Shape.SOLID, 0xff0000) -- sets the fill style as solid red color setFillStyle(Shape.SOLID, 0xff0000, 0.5) -- sets the fill style as solid red color with 0.5 transparency local texture = Texture.new("image.png") setFillStyle(Shape.TEXTURE, texture) -- sets the fill style as texture with "image.png" local matrix = Matrix.new(0.5, 0, 0, 0.5, 0, 0) setFillStyle(Shape.TEXTURE, texture, matrix) -- sets the fill style as texture with "image.png" with a transformation matrix <!-- setFillStyle(Shape.LINEAR_GRADIENT, {}, {}, {}, (optional) matrix) -- not supported yet setFillStyle(Shape.RADIAL_GRADIENT, {}, {}, {}, (optional) matrix) -- not supported yet --> </source> <br/> {{Shape}} m5k14s2d8j9i4p39muo56ae1i0zb3ch Shape:setLineStyle 0 912 14230 10388 2019-12-03T22:42:12Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Shape|Shape]]<br/> === <translate>Description</translate> === <translate><br /> Sets the line style that [[Special:MyLanguage/Shape|Shape]] object uses for subsequent drawings. The line style remains in effect until you call ''setLineStyle()'' function with different<br /> parameters.<br /> <br /></translate> <source lang="lua"> Shape:setLineStyle(width,color,alpha) </source> === <translate>Parameters</translate> === '''width''': (number) <translate>The width of the line. If this parameter is 0, line is not drawn.</translate> <br/> '''color''': (number, default = 0x000000) <translate>A hexadecimal color value of the line. For example, red is 0xFF0000, blue is 0x0000FF, and so on.</translate> <br/> '''alpha''': (number, default = 1) <translate>The alpha value of the color of the line.</translate> <br/> {{Shape}} 60ujgeeu145rwgj5d9p6rvxfxwuhgp6 Sound 0 37 14967 14237 2019-12-09T23:03:57Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Sound --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> === <translate>Description</translate> === The [[Special:MyLanguage/Sound|Sound]] class lets you load and play WAV, MP3, MOD, XM, S3M and IT sound files. Control of the playing sound is performed through the [[Special:MyLanguage/SoundChannel|SoundChannel]] object. === <translate>Examples</translate> === <source lang="lua"> local sound = Sound.new("music.mp3") local channel = sound:play() -- after some time -- channel:stop() </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Sound.new|Sound.new]] ''<translate>creates a new Sound object</translate>''<br/><!-- GIDEROSMTD:Sound.new(filename) creates a new Sound object --> [[Special:MyLanguage/Sound.setListenerPosition|Sound.setListenerPosition]] <br/><!-- GIDEROSMTD:Sound.setListenerPosition(x,y,z,vx,vy,vz,dx,dy,dz,ux,uy,uz) --> [[Special:MyLanguage/Sound:getLength|Sound:getLength]] <br/><!-- GIDEROSMTD:Sound:getLength() --> [[Special:MyLanguage/Sound:play|Sound:play]] ''<translate>creates a new SoundChannel object to play the sound</translate>''<br/><!-- GIDEROSMTD:Sound:play(startTime,looping,paused) creates a new SoundChannel object to play the sound --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} 5im1dahiz6wcwtzbyttvxn2piq56ykm Sound.new 0 1079 14238 10519 2019-12-03T22:47:28Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sound|Sound]]<br/> === <translate>Description</translate> === <translate><br /> Creates a new [[Special:MyLanguage/Sound|Sound]] object.<br /> <br /></translate> <source lang="lua"> Sound.new(filename) </source> === <translate>Parameters</translate> === '''filename''': (string) <translate>The name of the sound file to be loaded.</translate> <br/> {{Sound}} 0s6zowgrs151xl3grxl7ohbb49h5cri Sound.setListenerPosition 0 897 14239 10381 2019-12-03T22:47:48Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sound|Sound]]<br/> === <translate>Description</translate> === <translate>Sets the position of the listener in a 3D environment</translate> <source lang="lua"> Sound.setListenerPosition(x,y,z,vx,vy,vz,dx,dy,dz,ux,uy,uz) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>X coordinate of the listener</translate> <br/> '''y''': (number) <translate>Y coordinate of the listener</translate> <br/> '''z''': (number) <translate>z coordinate of the listener</translate> '''optional'''<br/> '''vx''': (number) <translate>X component of listener's velocity</translate> '''optional'''<br/> '''vy''': (number) <translate>Y component of listener's velocity</translate> '''optional'''<br/> '''vz''': (number) <translate>Z component of listener's velocity</translate> '''optional'''<br/> '''dx''': (number) <translate>X component of the direction the listener is facing</translate> '''optional'''<br/> '''dy''': (number) <translate>Y component of the direction the listener is facing</translate> '''optional'''<br/> '''dz''': (number) <translate>Z component of the direction the listener is facing</translate> '''optional'''<br/> '''ux''': (number) <translate>X component of up direction relative to the listener</translate> '''optional'''<br/> '''uy''': (number) <translate>Y component of up direction relative to the listener</translate> '''optional'''<br/> '''uz''': (number) <translate>Z component of up direction relative to the listener</translate> '''optional'''<br/> {{Sound}} 43j79yqo5skbul1maesznm1fi86xd6g Sound:getLength 0 1108 14240 10558 2019-12-03T22:48:08Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sound|Sound]]<br/> === <translate>Description</translate> === <translate><br /> Returns the duration of the sound in milliseconds.<br /> <br /></translate> <source lang="lua"> (number) = Sound:getLength() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The duration of the sound in milliseconds.</translate><br/> {{Sound}} mg8o6lvdz94cj1n3pxsig84ckkg8gmx Sound:play 0 445 14241 9903 2019-12-03T22:48:22Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sound|Sound]]<br/> === <translate>Description</translate> === <translate><br /> Creates a new [[Special:MyLanguage/SoundChannel|SoundChannel]] object to play the sound. By using the retured [[Special:MyLanguage/SoundChannel|SoundChannel]] object,<br /> you can stop the sound and monitor the position.<br /> <br /></translate> <source lang="lua"> (SoundChannel) = Sound:play(startTime,looping,paused) </source> === <translate>Parameters</translate> === '''startTime''': (number, default = 0) <translate>The initial position in milliseconds at which playback should start.</translate> <br/> '''looping''': (boolean, default = false) <translate></translate> <br/> '''paused''': (boolean, default = false) <translate></translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (SoundChannel) <translate>A [[Special:MyLanguage/SoundChannel|SoundChannel]] object, which you use to control the sound. This function returns ''nil'' if you run out of available sound channels.</translate><br/> {{Sound}} tlxtrx8sd335hi8w7cqnlz2hlixfave SoundChannel 0 115 14968 14243 2019-12-09T23:08:46Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:SoundChannel --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> ===<translate>Description</translate>=== The '''SoundChannel''' class is used to control and monitor a playing sound. ===<translate>SoundChannel Events</translate>=== <ul> <li><translate>''Event.COMPLETE = "complete"'' When the sound channel has finished playing, [[Special:MyLanguage/Event.COMPLETE|Event.COMPLETE]] event is dispatched.</translate></li> </ul> ===<translate>Example</translate>=== <source lang="lua"> local sound1 = Sound.new("audio/sound1.ogg") local audio1 = sound1:play() audio1:addEventListener(Event.COMPLETE, function() -- play a second audio when the first one is complete local sound2 = Sound.new("audio/sound2.ogg") local audio2 = sound2:play() end) </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/SoundChannel:getPitch|SoundChannel:getPitch]] ''<translate>returns the current pitch of the sound channel</translate>''<br/><!-- GIDEROSMTD:SoundChannel:getPitch() returns the current pitch of the sound channel --> [[Special:MyLanguage/SoundChannel:getPosition|SoundChannel:getPosition]] ''<translate>returns the position of the current playback</translate>''<br/><!-- GIDEROSMTD:SoundChannel:getPosition() returns the position of the current playback --> [[Special:MyLanguage/SoundChannel:getVolume|SoundChannel:getVolume]] ''<translate>returns the current volume of the sound channel</translate>''<br/><!-- GIDEROSMTD:SoundChannel:getVolume() returns the current volume of the sound channel --> [[Special:MyLanguage/SoundChannel:isLooping|SoundChannel:isLooping]] ''<translate>returns the looping state of the channel</translate>''<br/><!-- GIDEROSMTD:SoundChannel:isLooping() returns the looping state of the channel --> [[Special:MyLanguage/SoundChannel:isPaused|SoundChannel:isPaused]] ''<translate>returns the paused state of the channel</translate>''<br/><!-- GIDEROSMTD:SoundChannel:isPaused() returns the paused state of the channel --> [[Special:MyLanguage/SoundChannel:isPlaying|SoundChannel:isPlaying]] ''<translate>returns the playing state for the sound channel</translate>''<br/><!-- GIDEROSMTD:SoundChannel:isPlaying() returns the playing state for the sound channel --> [[Special:MyLanguage/SoundChannel:setLooping|SoundChannel:setLooping]] ''<translate>sets the looping state of the channel</translate>''<br/><!-- GIDEROSMTD:SoundChannel:setLooping(looping) sets the looping state of the channel --> [[Special:MyLanguage/SoundChannel:setPaused|SoundChannel:setPaused]] ''<translate>sets the paused state of the channel</translate>''<br/><!-- GIDEROSMTD:SoundChannel:setPaused(paused) sets the paused state of the channel --> [[Special:MyLanguage/SoundChannel:setPitch|SoundChannel:setPitch]] ''<translate>sets the pitch of the sound channel</translate>''<br/><!-- GIDEROSMTD:SoundChannel:setPitch(pitch) sets the pitch of the sound channel --> [[Special:MyLanguage/SoundChannel:setPosition|SoundChannel:setPosition]] ''<translate>sets the position of the current playback</translate>''<br/><!-- GIDEROSMTD:SoundChannel:setPosition(position) sets the position of the current playback --> [[Special:MyLanguage/SoundChannel:setVolume|SoundChannel:setVolume]] ''<translate>sets the volume of the sound channel</translate>''<br/><!-- GIDEROSMTD:SoundChannel:setVolume(volume) sets the volume of the sound channel --> [[Special:MyLanguage/SoundChannel:setWorldPosition|SoundChannel:setWorldPosition]] <br/><!-- GIDEROSMTD:SoundChannel:setWorldPosition(x,y,z,vx,vy,vz) --> [[Special:MyLanguage/SoundChannel:stop|SoundChannel:stop]] ''<translate>stops the sound playing in the channel</translate>''<br/><!-- GIDEROSMTD:SoundChannel:stop() stops the sound playing in the channel --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === [[Special:MyLanguage/Event.COMPLETE|Event.COMPLETE]]<br/><!-- GIDEROSEVT:Event.COMPLETE complete--> === <translate>Constants</translate> === |} mhxy5iiag1zr6bqnpzgawdn4tqab23m SoundChannel:getPitch 0 819 14244 10695 2019-12-03T22:51:37Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/SoundChannel|SoundChannel]]<br/> === <translate>Description</translate> === <translate><br /> Returns the current pitch of the sound channel. (Original pitch is 1)<br /> <br /></translate> <source lang="lua"> (any), (any) = SoundChannel:getPitch() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (any) <translate>The current pitch of the sound channel.</translate><br/> '''<translate>Returns</translate>''' (any) <translate>The current pitch of the sound channel.</translate><br/> {{SoundChannel}} dirbpr36thb8rrbnotgrer0gpswfhy0 SoundChannel:getPosition 0 574 14245 10084 2019-12-03T22:51:51Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/SoundChannel|SoundChannel]]<br/> === <translate>Description</translate> === <translate><br /> If the sound is playing, ''getPosition'' returns the position of the current playback, measured in miliseconds from the start of the sound.<br /> If the sound is not playing (paused or stopped), ''getPosition'' returns the last point that was played.<br /> <br /></translate> <source lang="lua"> (number) = SoundChannel:getPosition() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The position of the sound in miliseconds.</translate><br/> {{SoundChannel}} tpznzh7v04b7p4x8tz2hwrj9nqg7jop SoundChannel:getVolume 0 967 14246 10418 2019-12-03T22:52:04Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/SoundChannel|SoundChannel]]<br/> === <translate>Description</translate> === <translate><br /> Returns the current volume of the sound channel.<br /> <br /></translate> <source lang="lua"> (number) = SoundChannel:getVolume() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The current volume of the sound channel.</translate><br/> {{SoundChannel}} qm4wslrqo545gbsgrhx7wb41cmwfr10 SoundChannel:isLooping 0 838 14247 10347 2019-12-03T22:52:16Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/SoundChannel|SoundChannel]]<br/> === <translate>Description</translate> === <translate><br /> Returns the looping state of the channel. <br /> <br /></translate> <source lang="lua"> (bool) = SoundChannel:isLooping() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>''true'' if the channel is looping, ''false'' otherwise.</translate><br/> {{SoundChannel}} 70aw75rhswfu5g6exmbw8dcx5zcry24 SoundChannel:isPaused 0 1000 14248 10801 2019-12-03T22:52:27Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/SoundChannel|SoundChannel]]<br/> === <translate>Description</translate> === <translate><br /> Returns the paused state of the channel. <br /> <br /></translate> <source lang="lua"> (bool) = SoundChannel:isPaused() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>''true'' if the channel is paused, ''false'' otherwise.</translate><br/> {{SoundChannel}} sc5pc3jl95k9vzahzptb65wfqcwyyrl SoundChannel:isPlaying 0 158 14249 9553 2019-12-03T22:52:39Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/SoundChannel|SoundChannel]]<br/> === <translate>Description</translate> === <translate><br /> Returns the playing state for the sound channel. <br /> <br /></translate> <source lang="lua"> (any), (any) = SoundChannel:isPlaying() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (any) <translate>''true'' if the channel is currently playing a sound, ''false'' otherwise.</translate><br/> '''<translate>Returns</translate>''' (any) <translate>''true'' if the channel is currently playing a sound, ''false'' otherwise.</translate><br/> {{SoundChannel}} djidngho293ia3muwdhbuh5el82xoxp SoundChannel:setLooping 0 1090 14250 10526 2019-12-03T22:52:51Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/SoundChannel|SoundChannel]]<br/> === <translate>Description</translate> === <translate><br /> Sets the looping state of the channel. <br /> <br /></translate> <source lang="lua"> SoundChannel:setLooping(looping) </source> === <translate>Parameters</translate> === '''looping''': (boolean) <translate>looping state to set</translate> <br/> {{SoundChannel}} sspvfzr32e684d4jt2eb9ows2d1lq2r SoundChannel:setPaused 0 658 14251 10197 2019-12-03T22:53:03Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/SoundChannel|SoundChannel]]<br/> === <translate>Description</translate> === <translate><br /> Sets the paused state of the channel. <br /> <br /></translate> <source lang="lua"> SoundChannel:setPaused(paused) </source> === <translate>Parameters</translate> === '''paused''': (boolean) <translate>paused state to set</translate> <br/> {{SoundChannel}} 3usisumizr6eekwdk69d7rbsjvbqqrp SoundChannel:setPitch 0 281 14252 9699 2019-12-03T22:53:16Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/SoundChannel|SoundChannel]]<br/> === <translate>Description</translate> === <translate><br /> Sets the pitch relative to the pitch of the original sound channel. Default pitch is 1. Setting pitch as 0.5 will make the pitch lower Setting pitch as 1.5 will make the pitch higher You cannot set the pitch of a background music (mp3).<br /> <br /></translate> <source lang="lua"> SoundChannel:setPitch(pitch) </source> === <translate>Parameters</translate> === '''pitch''': (number) <translate>pitch relative to original (1 < - higher pitch, 1 > 0 lower pitch)</translate> <br/> {{SoundChannel}} nrkmor6tjg8auyphz9i3wvd5y3gm1yk SoundChannel:setPosition 0 1050 14253 10498 2019-12-03T22:53:27Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/SoundChannel|SoundChannel]]<br/> === <translate>Description</translate> === <translate><br /> Sets the current playback position in miliseconds.<br /> <br /></translate> <source lang="lua"> SoundChannel:setPosition(position) </source> === <translate>Parameters</translate> === '''position''': (number) <translate>position of the channel to set in miliseconds</translate> <br/> {{SoundChannel}} t5zohddb8tt2m6yu39an6h7d5m41coc SoundChannel:setVolume 0 1053 14254 13492 2019-12-03T22:53:49Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/SoundChannel|SoundChannel]]<br/> === <translate>Description</translate> === <translate>Sets the volume of the sound channel.</translate> <br/> <source lang="lua"> SoundChannel:setVolume(volume) </source> === <translate>Example</translate> === <source lang="lua"> local bulletsnd = Sound.new("audio/shoot.wav") local channel = bulletsnd:play() channel:setVolume(0.5) </source> === <translate>Parameters</translate> === '''volume''': (number) <translate>The new volume of the sound channel. Valid range of this parameter is between 0.0 and 1.0, where 1.0 is the maximum volume value.</translate> <br/> {{SoundChannel}} m39u1k03faxci22fgah4xo0ye4476oe SoundChannel:setWorldPosition 0 196 14255 9592 2019-12-03T22:54:12Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/SoundChannel|SoundChannel]]<br/> === <translate>Description</translate> === <translate>Sets the position of this sound in a 3D world</translate> <source lang="lua"> SoundChannel:setWorldPosition(x,y,z,vx,vy,vz) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>X coordinate of this sound</translate> <br/> '''y''': (number) <translate>Y coordinate of this sound</translate> <br/> '''z''': (number) <translate>Z coordinate of this sound</translate> '''optional'''<br/> '''vx''': (number) <translate>X component of this sound's velocity</translate> '''optional'''<br/> '''vy''': (number) <translate>Y component of this sound's velocity</translate> '''optional'''<br/> '''vz''': (number) <translate>Z component of this sound's velocity</translate> '''optional'''<br/> {{SoundChannel}} ev8zrawo6vqwxte6r8rcz67fz46uid0 SoundChannel:stop 0 716 14256 10252 2019-12-03T22:54:25Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/SoundChannel|SoundChannel]]<br/> === <translate>Description</translate> === <translate><br /> Stops the sound playing in the channel.<br /> <br /></translate> <source lang="lua"> SoundChannel:stop() </source> {{SoundChannel}} 49kxglqpd3z0xbvguyqpifwnl2764js Sprite 0 118 14969 14260 2019-12-09T23:11:01Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Sprite --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/EventDispatcher|EventDispatcher]]<br/> === <translate>Description</translate> === The [[Special:MyLanguage/Sprite|Sprite]] class is the base class for all objects that can be placed on the scene tree. It is the basic scene tree building block. A sprite can contain child sprites which makes the scene tree hierarchy. Transformations such as translation, rotation, scaling, and color transforms, propagate its effect to all of its children. The drawing order is defined by the order of children. The first child is drawn first and the last child is drawn last. It is possible to change the drawing order by modifying the order of child list. A [[Special:MyLanguage/Sprite|Sprite]] instance can exist without attaching the scene tree. An unattached sprite can receive [[Special:MyLanguage/Event.ENTER_FRAME|Event.ENTER_FRAME]] event but it will only receive mouse and touch events when it is attached to the scene tree. {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Sprite.new|Sprite.new]] ''<translate>creates a new Sprite object</translate>''<br/><!-- GIDEROSMTD:Sprite.new() creates a new Sprite object --> [[Special:MyLanguage/Sprite:addChild|Sprite:addChild]] ''<translate>adds a sprite as a child</translate>''<br/><!-- GIDEROSMTD:Sprite:addChild(child) adds a sprite as a child --> [[Special:MyLanguage/Sprite:addChildAt|Sprite:addChildAt]] ''<translate>add a sprite as a child at the index position specified</translate>''<br/><!-- GIDEROSMTD:Sprite:addChildAt(child,index) add a sprite as a child at the index position specified --> [[Special:MyLanguage/Sprite:clearBlendMode|Sprite:clearBlendMode]] ''<translate>clears the blending mode</translate>''<br/><!-- GIDEROSMTD:Sprite:clearBlendMode() clears the blending mode --> [[Special:MyLanguage/Sprite:contains|Sprite:contains]] ''<translate>determines whether the specified sprite is contained in the subtree of this sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:contains(child) determines whether the specified sprite is contained in the subtree of this sprite --> [[Special:MyLanguage/Sprite:get|Sprite:get]] ''<translate>gets the specified property by its name</translate>''<br/><!-- GIDEROSMTD:Sprite:get(param) gets the specified property by its name --> [[Special:MyLanguage/Sprite:getAlpha|Sprite:getAlpha]] ''<translate>returns the alpha transparency of this sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:getAlpha() returns the alpha transparency of this sprite --> [[Special:MyLanguage/Sprite:getAnchorPosition|Sprite:getAnchorPosition]] ''<translate>Returns anchor position of Sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:getAnchorPosition() Returns anchor position of Sprite --> [[Special:MyLanguage/Sprite:getBounds|Sprite:getBounds]] ''<translate>returns the bounds as it appears in another sprite's coordinate system</translate>''<br/><!-- GIDEROSMTD:Sprite:getBounds(targetSprite) returns the bounds as it appears in another sprite's coordinate system --> [[Special:MyLanguage/Sprite:getChildAt|Sprite:getChildAt]] ''<translate>returns the child sprite that exists at the specified index</translate>''<br/><!-- GIDEROSMTD:Sprite:getChildAt(index) returns the child sprite that exists at the specified index --> [[Special:MyLanguage/Sprite:getChildIndex|Sprite:getChildIndex]] ''<translate>returns the index of the specified child sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:getChildIndex(child) returns the index of the specified child sprite --> [[Special:MyLanguage/Sprite:getChildrenAtPoint|Sprite:getChildrenAtPoint]] ''<translate>returns the children sprites that corresponds to the given screen coordinates</translate>''<br/><!-- GIDEROSMTD:Sprite:getChildrenAtPoint(x,y,visible,nosubs) returns the children sprites that corresponds to the given screen coordinates --> [[Special:MyLanguage/Sprite:getClip|Sprite:getClip]] <br/><!-- GIDEROSMTD:Sprite:getClip() --> [[Special:MyLanguage/Sprite:getColorTransform|Sprite:getColorTransform]] ''<translate>returns the red, green, blue and alpha channel multipliers</translate>''<br/><!-- GIDEROSMTD:Sprite:getColorTransform() returns the red, green, blue and alpha channel multipliers --> [[Special:MyLanguage/Sprite:getHeight|Sprite:getHeight]] ''<translate>returns the height</translate>''<br/><!-- GIDEROSMTD:Sprite:getHeight(withoutTransform) returns the height --> [[Special:MyLanguage/Sprite:getLayoutConstraints|Sprite:getLayoutConstraints]] ''<translate>get the current layout constraints</translate>''<br/><!-- GIDEROSMTD:Sprite:getLayoutConstraints() get the current layout constraints --> [[Special:MyLanguage/Sprite:getLayoutInfo|Sprite:getLayoutInfo]] ''<translate>get information of the current layout</translate>''<br/><!-- GIDEROSMTD:Sprite:getLayoutInfo() get information of the current layout --> [[Special:MyLanguage/Sprite:getLayoutParameters|Sprite:getLayoutParameters]] ''<translate>get the current layout parameters</translate>''<br/><!-- GIDEROSMTD:Sprite:getLayoutParameters() get the current layout parameters --> [[Special:MyLanguage/Sprite:getMatrix|Sprite:getMatrix]] ''<translate>returns the transformation matrix of the sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:getMatrix() returns the transformation matrix of the sprite --> [[Special:MyLanguage/Sprite:getNumChildren|Sprite:getNumChildren]] ''<translate>returns the number of children of this sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:getNumChildren() returns the number of children of this sprite --> [[Special:MyLanguage/Sprite:getParent|Sprite:getParent]] ''<translate>returns the parent sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:getParent() returns the parent sprite --> [[Special:MyLanguage/Sprite:getPosition|Sprite:getPosition]] ''<translate>gets the x,y and z coordinates of the sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:getPosition() gets the x,y and z coordinates of the sprite --> [[Special:MyLanguage/Sprite:getRotation|Sprite:getRotation]] ''<translate>returns the rotation of the sprite in degrees</translate>''<br/><!-- GIDEROSMTD:Sprite:getRotation() returns the rotation of the sprite in degrees --> [[Special:MyLanguage/Sprite:getRotationX|Sprite:getRotationX]] ''<translate>returns the rotation of the sprite around x axis in degrees</translate>''<br/><!-- GIDEROSMTD:Sprite:getRotationX() returns the rotation of the sprite around x axis in degrees --> [[Special:MyLanguage/Sprite:getRotationY|Sprite:getRotationY]] ''<translate>returns the rotation of the sprite around y axis in degrees</translate>''<br/><!-- GIDEROSMTD:Sprite:getRotationY() returns the rotation of the sprite around y axis in degrees --> [[Special:MyLanguage/Sprite:getScale|Sprite:getScale]] ''<translate>returns the horizontal, vertical and z scales of the sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:getScale() returns the horizontal, vertical and z scales of the sprite --> [[Special:MyLanguage/Sprite:getScaleX|Sprite:getScaleX]] ''<translate>returns the horizontal scale of the sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:getScaleX() returns the horizontal scale of the sprite --> [[Special:MyLanguage/Sprite:getScaleY|Sprite:getScaleY]] ''<translate>returns the vertical scale of the sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:getScaleY() returns the vertical scale of the sprite --> [[Special:MyLanguage/Sprite:getScaleZ|Sprite:getScaleZ]] ''<translate>returns the scale on z axis of the sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:getScaleZ() returns the scale on z axis of the sprite --> [[Special:MyLanguage/Sprite:getSkew|Sprite:getSkew]] <br/><!-- GIDEROSMTD:Sprite:getSkew() --> [[Special:MyLanguage/Sprite:getSkewX|Sprite:getSkewX]] <br/><!-- GIDEROSMTD:Sprite:getSkewX() --> [[Special:MyLanguage/Sprite:getSkewY|Sprite:getSkewY]] <br/><!-- GIDEROSMTD:Sprite:getSkewY() --> [[Special:MyLanguage/Sprite:getWidth|Sprite:getWidth]] ''<translate>returns the width</translate>''<br/><!-- GIDEROSMTD:Sprite:getWidth(withoutTransform) returns the width --> [[Special:MyLanguage/Sprite:getX|Sprite:getX]] ''<translate>returns the x coordinate of the sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:getX() returns the x coordinate of the sprite --> [[Special:MyLanguage/Sprite:getY|Sprite:getY]] ''<translate>returns the y coordinate of the sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:getY() returns the y coordinate of the sprite --> [[Special:MyLanguage/Sprite:getZ|Sprite:getZ]] ''<translate>returns the z coordinate of the sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:getZ() returns the z coordinate of the sprite --> [[Special:MyLanguage/Sprite:globalToLocal|Sprite:globalToLocal]] ''<translate>converts the x,y coordinates from the global to the sprite's (local) coordinates</translate>''<br/><!-- GIDEROSMTD:Sprite:globalToLocal(x,y) converts the x,y coordinates from the global to the sprite's (local) coordinates --> [[Special:MyLanguage/Sprite:hitTestPoint|Sprite:hitTestPoint]] ''<translate>checks the given coordinates is in bounds of the sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:hitTestPoint(x,y,shapeFlag) checks the given coordinates is in bounds of the sprite --> [[Special:MyLanguage/Sprite:isVisible|Sprite:isVisible]] ''<translate>returns the visibility of sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:isVisible() returns the visibility of sprite --> [[Special:MyLanguage/Sprite:localToGlobal|Sprite:localToGlobal]] ''<translate>converts the x,y coordinates from the sprite's (local) coordinates to the global coordinates</translate>''<br/><!-- GIDEROSMTD:Sprite:localToGlobal(x,y) converts the x,y coordinates from the sprite's (local) coordinates to the global coordinates --> [[Special:MyLanguage/Sprite:removeChild|Sprite:removeChild]] ''<translate>removes the child sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:removeChild(child) removes the child sprite --> [[Special:MyLanguage/Sprite:removeChildAt|Sprite:removeChildAt]] ''<translate>removes the child sprite at the specifed index</translate>''<br/><!-- GIDEROSMTD:Sprite:removeChildAt(index) removes the child sprite at the specifed index --> [[Special:MyLanguage/Sprite:removeFromParent|Sprite:removeFromParent]] ''<translate>if the sprite has a parent, removes the sprite from the child list of its parent sprite.</translate>''<br/><!-- GIDEROSMTD:Sprite:removeFromParent() if the sprite has a parent, removes the sprite from the child list of its parent sprite. --> [[Special:MyLanguage/Sprite:set|Sprite:set]] ''<translate>sets the specified property by its name</translate>''<br/><!-- GIDEROSMTD:Sprite:set(param,value) sets the specified property by its name --> [[Special:MyLanguage/Sprite:setAlpha|Sprite:setAlpha]] ''<translate>sets the alpha transparency of this sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:setAlpha(alpha) sets the alpha transparency of this sprite --> [[Special:MyLanguage/Sprite:setAnchorPosition|Sprite:setAnchorPosition]] ''<translate>Set anchor position</translate>''<br/><!-- GIDEROSMTD:Sprite:setAnchorPosition(anchorX,anchorY,anchorZ) Set anchor position --> [[Special:MyLanguage/Sprite:setBlendMode|Sprite:setBlendMode]] ''<translate>sets the blend mode of the sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:setBlendMode(blendMode or src,dst) sets the blend mode of the sprite --> [[Special:MyLanguage/Sprite:setClip|Sprite:setClip]] ''<translate>Clip Sprite contents</translate>''<br/><!-- GIDEROSMTD:Sprite:setClip(x,y,width,height) Clip Sprite contents --> [[Special:MyLanguage/Sprite:setColorTransform|Sprite:setColorTransform]] ''<translate>sets the red, green, blue and alpha channel multipliers</translate>''<br/><!-- GIDEROSMTD:Sprite:setColorTransform(redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier) sets the red, green, blue and alpha channel multipliers --> [[Special:MyLanguage/Sprite:setLayoutConstraints|Sprite:setLayoutConstraints]] ''<translate>specify the child placement constraints for Gideros's layout system</translate>''<br/><!-- GIDEROSMTD:Sprite:setLayoutConstraints(constraints) specify the child placement constraints for Gideros's layout system --> [[Special:MyLanguage/Sprite:setLayoutParameters|Sprite:setLayoutParameters]] ''<translate>specify the parent parameters for Gideros's layout system</translate>''<br/><!-- GIDEROSMTD:Sprite:setLayoutParameters(layout) specify the parent parameters for Gideros's layout system --> [[Special:MyLanguage/Sprite:setMatrix|Sprite:setMatrix]] ''<translate>sets the transformation matrix of the sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:setMatrix(matrix) sets the transformation matrix of the sprite --> [[Special:MyLanguage/Sprite:setPosition|Sprite:setPosition]] ''<translate>sets the x,y and z coordinates of the sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:setPosition(x,y,z) sets the x,y and z coordinates of the sprite --> [[Special:MyLanguage/Sprite:setRotation|Sprite:setRotation]] ''<translate>sets the rotation of the sprite in degrees</translate>''<br/><!-- GIDEROSMTD:Sprite:setRotation(rotation) sets the rotation of the sprite in degrees --> [[Special:MyLanguage/Sprite:setRotationX|Sprite:setRotationX]] ''<translate>sets the rotation of the sprite in degrees around x axis</translate>''<br/><!-- GIDEROSMTD:Sprite:setRotationX() sets the rotation of the sprite in degrees around x axis --> [[Special:MyLanguage/Sprite:setRotationY|Sprite:setRotationY]] ''<translate>sets the rotation of the sprite in degrees around y axis</translate>''<br/><!-- GIDEROSMTD:Sprite:setRotationY() sets the rotation of the sprite in degrees around y axis --> [[Special:MyLanguage/Sprite:setScale|Sprite:setScale]] ''<translate>sets the horizontal, vertical and z axis scales of the sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:setScale(scaleX,scaleY,scaleZ) sets the horizontal, vertical and z axis scales of the sprite --> [[Special:MyLanguage/Sprite:setScaleX|Sprite:setScaleX]] ''<translate>sets the horizontal scale of the sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:setScaleX(scaleX) sets the horizontal scale of the sprite --> [[Special:MyLanguage/Sprite:setScaleY|Sprite:setScaleY]] ''<translate>sets the vertical scale of the sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:setScaleY(scaleY) sets the vertical scale of the sprite --> [[Special:MyLanguage/Sprite:setScaleZ|Sprite:setScaleZ]] ''<translate>Set scale on z axis</translate>''<br/><!-- GIDEROSMTD:Sprite:setScaleZ(scale) Set scale on z axis --> [[Special:MyLanguage/Sprite:setShader|Sprite:setShader]] ''<translate>Set shader for this sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:setShader(shader) Set shader for this sprite --> [[Special:MyLanguage/Sprite:setShaderConstant|Sprite:setShaderConstant]] ''<translate>Change the value of a uniform for this sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:setShaderConstant(uniform name,data type,mult,data) Change the value of a uniform for this sprite --> [[Special:MyLanguage/Sprite:setSkew|Sprite:setSkew]] <br/><!-- GIDEROSMTD:Sprite:setSkew(kx,ky) --> [[Special:MyLanguage/Sprite:setSkewX|Sprite:setSkewX]] <br/><!-- GIDEROSMTD:Sprite:setSkewX(kx) --> [[Special:MyLanguage/Sprite:setSkewY|Sprite:setSkewY]] <br/><!-- GIDEROSMTD:Sprite:setSkewY(ky) --> [[Special:MyLanguage/Sprite:setStencilOperation|Sprite:setStencilOperation]] ''<translate>Set the stencil operation for this sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:setStencilOperation(mask) Set the stencil operation for this sprite --> [[Special:MyLanguage/Sprite:setStopEventPropagation|Sprite:setStopEventPropagation]] ''<translate>Select which events must not be propagated to parent sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:setStopEventPropagation(mask) Select which events must not be propagated to parent sprite --> [[Special:MyLanguage/Sprite:setVisible|Sprite:setVisible]] ''<translate>sets the visibility of sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:setVisible(visible) sets the visibility of sprite --> [[Special:MyLanguage/Sprite:setX|Sprite:setX]] ''<translate>sets the x coordinate of the sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:setX(x) sets the x coordinate of the sprite --> [[Special:MyLanguage/Sprite:setY|Sprite:setY]] ''<translate>sets the y coordinate of the sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:setY(y) sets the y coordinate of the sprite --> [[Special:MyLanguage/Sprite:setZ|Sprite:setZ]] ''<translate>sets the z coordinate of the sprite</translate>''<br/><!-- GIDEROSMTD:Sprite:setZ(z) sets the z coordinate of the sprite --> [[Special:MyLanguage/Sprite:swapChildren|Sprite:swapChildren]] ''<translate>Swap two children index places</translate>''<br/><!-- GIDEROSMTD:Sprite:swapChildren(child1,child2) Swap two children index places --> [[Special:MyLanguage/Sprite:swapChildrenAt|Sprite:swapChildrenAt]] ''<translate>Swaps two child sprites.</translate>''<br/><!-- GIDEROSMTD:Sprite:swapChildrenAt(index1,index2) Swaps two child sprites. --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === [[Special:MyLanguage/Event.ADDED_TO_STAGE|Event.ADDED_TO_STAGE]]<br/><!-- GIDEROSEVT:Event.ADDED_TO_STAGE addedToStage--> [[Special:MyLanguage/Event.ENTER_FRAME|Event.ENTER_FRAME]]<br/><!-- GIDEROSEVT:Event.ENTER_FRAME enterFrame--> [[Special:MyLanguage/Event.KEY_DOWN|Event.KEY_DOWN]]<br/><!-- GIDEROSEVT:Event.KEY_DOWN keyDown--> [[Special:MyLanguage/Event.KEY_UP|Event.KEY_UP]]<br/><!-- GIDEROSEVT:Event.KEY_UP keyUp--> [[Special:MyLanguage/Event.LAYOUT_RESIZED|Event.LAYOUT_RESIZED]]<br/><!-- GIDEROSEVT:Event.LAYOUT_RESIZED layout_resized--> [[Special:MyLanguage/Event.MOUSE_DOWN|Event.MOUSE_DOWN]]<br/><!-- GIDEROSEVT:Event.MOUSE_DOWN mouseDown--> [[Special:MyLanguage/Event.MOUSE_HOVER|Event.MOUSE_HOVER]]<br/><!-- GIDEROSEVT:Event.MOUSE_HOVER mouseHover--> [[Special:MyLanguage/Event.MOUSE_MOVE|Event.MOUSE_MOVE]]<br/><!-- GIDEROSEVT:Event.MOUSE_MOVE mouseMove--> [[Special:MyLanguage/Event.MOUSE_UP|Event.MOUSE_UP]]<br/><!-- GIDEROSEVT:Event.MOUSE_UP mouseUp--> [[Special:MyLanguage/Event.MOUSE_WHEEL|Event.MOUSE_WHEEL]]<br/><!-- GIDEROSEVT:Event.MOUSE_WHEEL mouseWheel--> [[Special:MyLanguage/Event.REMOVED_FROM_STAGE|Event.REMOVED_FROM_STAGE]]<br/><!-- GIDEROSEVT:Event.REMOVED_FROM_STAGE removedFromStage--> [[Special:MyLanguage/Event.TOUCHES_BEGIN|Event.TOUCHES_BEGIN]]<br/><!-- GIDEROSEVT:Event.TOUCHES_BEGIN touchesBegin--> [[Special:MyLanguage/Event.TOUCHES_CANCEL|Event.TOUCHES_CANCEL]]<br/><!-- GIDEROSEVT:Event.TOUCHES_CANCEL touchesCancel--> [[Special:MyLanguage/Event.TOUCHES_END|Event.TOUCHES_END]]<br/><!-- GIDEROSEVT:Event.TOUCHES_END touchesEnd--> [[Special:MyLanguage/Event.TOUCHES_MOVE|Event.TOUCHES_MOVE]]<br/><!-- GIDEROSEVT:Event.TOUCHES_MOVE touchesMove--> === <translate>Constants</translate> === [[Special:MyLanguage/Sprite.ADD|Sprite.ADD]]<br/><!-- GIDEROSCST:Sprite.ADD add--> [[Special:MyLanguage/Sprite.ALPHA|Sprite.ALPHA]]<br/><!-- GIDEROSCST:Sprite.ALPHA alpha--> [[Special:MyLanguage/Sprite.LAYOUT_ANCHOR_CENTER|Sprite.LAYOUT_ANCHOR_CENTER]]<br/><!-- GIDEROSCST:Sprite.LAYOUT_ANCHOR_CENTER 0--> [[Special:MyLanguage/Sprite.LAYOUT_ANCHOR_EAST|Sprite.LAYOUT_ANCHOR_EAST]]<br/><!-- GIDEROSCST:Sprite.LAYOUT_ANCHOR_EAST 3--> [[Special:MyLanguage/Sprite.LAYOUT_ANCHOR_NORTH|Sprite.LAYOUT_ANCHOR_NORTH]]<br/><!-- GIDEROSCST:Sprite.LAYOUT_ANCHOR_NORTH 1--> [[Special:MyLanguage/Sprite.LAYOUT_ANCHOR_NORTHEAST|Sprite.LAYOUT_ANCHOR_NORTHEAST]]<br/><!-- GIDEROSCST:Sprite.LAYOUT_ANCHOR_NORTHEAST 2--> [[Special:MyLanguage/Sprite.LAYOUT_ANCHOR_NORTHWEST|Sprite.LAYOUT_ANCHOR_NORTHWEST]]<br/><!-- GIDEROSCST:Sprite.LAYOUT_ANCHOR_NORTHWEST 8--> [[Special:MyLanguage/Sprite.LAYOUT_ANCHOR_SOUTH|Sprite.LAYOUT_ANCHOR_SOUTH]]<br/><!-- GIDEROSCST:Sprite.LAYOUT_ANCHOR_SOUTH 5--> [[Special:MyLanguage/Sprite.LAYOUT_ANCHOR_SOUTHEAST|Sprite.LAYOUT_ANCHOR_SOUTHEAST]]<br/><!-- GIDEROSCST:Sprite.LAYOUT_ANCHOR_SOUTHEAST 4--> [[Special:MyLanguage/Sprite.LAYOUT_ANCHOR_SOUTHWEST|Sprite.LAYOUT_ANCHOR_SOUTHWEST]]<br/><!-- GIDEROSCST:Sprite.LAYOUT_ANCHOR_SOUTHWEST 6--> [[Special:MyLanguage/Sprite.LAYOUT_ANCHOR_WEST|Sprite.LAYOUT_ANCHOR_WEST]]<br/><!-- GIDEROSCST:Sprite.LAYOUT_ANCHOR_WEST 7--> [[Special:MyLanguage/Sprite.LAYOUT_FILL_BOTH|Sprite.LAYOUT_FILL_BOTH]]<br/><!-- GIDEROSCST:Sprite.LAYOUT_FILL_BOTH 1--> [[Special:MyLanguage/Sprite.LAYOUT_FILL_HORIZONTAL|Sprite.LAYOUT_FILL_HORIZONTAL]]<br/><!-- GIDEROSCST:Sprite.LAYOUT_FILL_HORIZONTAL 2--> [[Special:MyLanguage/Sprite.LAYOUT_FILL_NONE|Sprite.LAYOUT_FILL_NONE]]<br/><!-- GIDEROSCST:Sprite.LAYOUT_FILL_NONE 0--> [[Special:MyLanguage/Sprite.LAYOUT_FILL_VERTICAL|Sprite.LAYOUT_FILL_VERTICAL]]<br/><!-- GIDEROSCST:Sprite.LAYOUT_FILL_VERTICAL 3--> [[Special:MyLanguage/Sprite.MULTIPLY|Sprite.MULTIPLY]]<br/><!-- GIDEROSCST:Sprite.MULTIPLY multiply--> [[Special:MyLanguage/Sprite.NO_ALPHA|Sprite.NO_ALPHA]]<br/><!-- GIDEROSCST:Sprite.NO_ALPHA noAlpha--> [[Special:MyLanguage/Sprite.SCREEN|Sprite.SCREEN]]<br/><!-- GIDEROSCST:Sprite.SCREEN screen--> |} 33xu8519td35qwfyctdgv75lp12gsh9 Sprite.ADD 0 1369 14335 10149 2019-12-03T23:25:33Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' add<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate></translate> {{Sprite}} q9vp60ad35k2cskfqj1tjxualo6uif0 Sprite.ALPHA 0 1355 14336 9891 2019-12-03T23:25:45Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' alpha<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate></translate> {{Sprite}} tl43ek5hr4ibwyhw6a6l9j0xps2smk7 Sprite.LAYOUT ANCHOR CENTER 0 1645 14337 9572 2019-12-03T23:26:02Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.9<br/> '''<translate>Value</translate>:''' 0<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate></translate> {{Sprite}} og21m0q5326q5kxjlng3u0xvioteyip Sprite.LAYOUT ANCHOR EAST 0 1651 14338 10187 2019-12-03T23:26:17Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.9<br/> '''<translate>Value</translate>:''' 3<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate></translate> {{Sprite}} clsbjz9nthqkbrqykwnibssg5wac9u8 Sprite.LAYOUT ANCHOR NORTH 0 1652 14339 10386 2019-12-03T23:47:16Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.9<br/> '''<translate>Value</translate>:''' 1<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate></translate> {{Sprite}} hpjmok9g3bb4plf3ip09e355d27w7or Sprite.LAYOUT ANCHOR NORTHEAST 0 1647 14340 9689 2019-12-03T23:58:24Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.9<br/> '''<translate>Value</translate>:''' 2<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate></translate> {{Sprite}} peerf9vl0mlveiixiahbx2fel3v1zc0 Sprite.LAYOUT ANCHOR NORTHWEST 0 1653 14341 10426 2019-12-03T23:58:37Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.9<br/> '''<translate>Value</translate>:''' 8<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate></translate> {{Sprite}} 98zl6uuprs5kt0pia4xf0b0231j9y56 Sprite.LAYOUT ANCHOR SOUTH 0 1654 14342 10462 2019-12-03T23:59:28Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.9<br/> '''<translate>Value</translate>:''' 5<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate></translate> {{Sprite}} e9r0e1ty8f6m3704bslhd6rnpnagrdg Sprite.LAYOUT ANCHOR SOUTHEAST 0 1648 14343 10080 2019-12-03T23:59:42Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.9<br/> '''<translate>Value</translate>:''' 4<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate></translate> {{Sprite}} j0t721wklhckzd4wzcuslc3obaxigvt Sprite.LAYOUT ANCHOR SOUTHWEST 0 1646 14344 9679 2019-12-03T23:59:58Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.9<br/> '''<translate>Value</translate>:''' 6<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate></translate> {{Sprite}} 4ko4scrk83m2xteo9m5cotoob8wkbdi Sprite.LAYOUT ANCHOR WEST 0 1656 14345 10793 2019-12-04T00:00:15Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.9<br/> '''<translate>Value</translate>:''' 7<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate></translate> {{Sprite}} cwsewl9x7tz504mcbshldbniujim2zk Sprite.LAYOUT FILL BOTH 0 1644 14346 9554 2019-12-04T00:00:30Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.9<br/> '''<translate>Value</translate>:''' 1<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate></translate> {{Sprite}} hpjmok9g3bb4plf3ip09e355d27w7or Sprite.LAYOUT FILL HORIZONTAL 0 1655 14347 10518 2019-12-04T00:00:44Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.9<br/> '''<translate>Value</translate>:''' 2<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate></translate> {{Sprite}} peerf9vl0mlveiixiahbx2fel3v1zc0 Sprite.LAYOUT FILL NONE 0 1650 14348 10173 2019-12-04T00:00:57Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.9<br/> '''<translate>Value</translate>:''' 0<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate></translate> {{Sprite}} og21m0q5326q5kxjlng3u0xvioteyip Sprite.LAYOUT FILL VERTICAL 0 1649 14349 10092 2019-12-04T00:01:10Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.9<br/> '''<translate>Value</translate>:''' 3<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate></translate> {{Sprite}} clsbjz9nthqkbrqykwnibssg5wac9u8 Sprite.MULTIPLY 0 1203 14350 9641 2019-12-04T00:01:25Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' multiply<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate></translate> {{Sprite}} s0j3sqxqnzhe4sbxvzqmbsf7qihbyny Sprite.NO ALPHA 0 1251 14351 10145 2019-12-04T00:01:42Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' noAlpha<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate></translate> {{Sprite}} h5nufq063nclf7ocawjgqukyrkwk1fm Sprite.SCREEN 0 1189 14352 9550 2019-12-04T00:01:54Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' screen<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate></translate> {{Sprite}} lbvy23ni3vaysomvd1ot5uuk6lecbke Sprite.new 0 777 14261 10287 2019-12-03T23:04:24Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate>Creates a new Sprite object</translate> <source lang="lua"> Sprite.new() </source> {{Sprite}} 1wmi0xetv3zhum0p19ag44hhcpkgdie Sprite:addChild 0 1112 14262 10559 2019-12-03T23:04:38Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Adds a sprite as a child to this sprite. The child is<br /> added as a last child of this [[Special:MyLanguage/Sprite|Sprite]] instance.<br /> <br /> Sprites can have only one parent. Therefore if you add a child<br /> object that already has a different sprite as a parent,<br /> the sprite is removed from the child list of the other sprite<br /> and then added to this sprite.<br /> <br /></translate> <source lang="lua"> Sprite:addChild(child) </source> === <translate>Parameters</translate> === '''child''': (Sprite) <translate>The child sprite to add.</translate> <br/> {{Sprite}} tlb2qhisxl35ra8f3xiz6btuvs3d023 Sprite:addChildAt 0 539 14263 10039 2019-12-03T23:04:54Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Adds a sprite as a child to this sprite. The child is<br /> added at the index position specified. Indices start from 1.<br /> <br /> Sprites can have only one parent. Therefore if you add a child<br /> object that already has a different sprite as a parent,<br /> the sprite is removed from the child list of the other sprite<br /> and then added to this sprite.<br /> <br /></translate> <source lang="lua"> Sprite:addChildAt(child,index) </source> === <translate>Parameters</translate> === '''child''': (Sprite) <translate>The child sprite to add.</translate> <br/> '''index''': (number) <translate>The index position to which the child is added.</translate> <br/> {{Sprite}} 4306i1343srs2co2pr62mwm3ekddyy8 Sprite:clearBlendMode 0 172 14264 9564 2019-12-03T23:05:09Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Clears the blending mode.<br /> <br /></translate> <source lang="lua"> Sprite:clearBlendMode() </source> {{Sprite}} ew9zpnxw9xq75bhp8uw2d476wfn5o0u Sprite:contains 0 223 14265 9626 2019-12-03T23:05:22Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Determines whether the specified sprite is contained in the subtree of<br /> this [[Special:MyLanguage/Sprite|Sprite]] instance.<br /> <br /></translate> <source lang="lua"> (bool) = Sprite:contains(child) </source> === <translate>Parameters</translate> === '''child''': (Sprite) <translate>The child object to test.</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>''true'' if the child object is contained in the subtree of this [[Special:MyLanguage/Sprite|Sprite]] instance, otherwise ''false''.</translate><br/> {{Sprite}} ll64nfyoz0uclgskrrd4gzgt4cmcfa8 Sprite:get 0 544 14266 10043 2019-12-03T23:05:43Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns the specified property of this sprite instance by its name. These names are supported:<br /> <br /> <ul><br /> <li>''"x"''</li><br /> <li>''"y"''</li><br /> <li>''"z"''</li><br /> <li>''"rotation"''</li><br /> <li>''"rotationX"''</li><br /> <li>''"rotationY"''</li><br /> <li>''"scaleX"''</li><br /> <li>''"scaleY"''</li><br /> <li>''"scaleZ"''</li><br /> <li>''"alpha"''</li><br /> <li>''"redMultiplier"''</li><br /> <li>''"greenMultiplier"''</li><br /> <li>''"blueMultiplier"''</li><br /> <li>''"alphaMultiplier"''</li><br /> <li>''"anchorX"''</li><br /> <li>''"anchorY"''</li><br /> <li>''"anchorZ"''</li><br /> </ul><br /> <br /></translate> <source lang="lua"> (number) = Sprite:get(param) </source> === <translate>Parameters</translate> === '''param''': (string) <translate>The name of the parameter</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The value of the parameter</translate><br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">-- the following two lines do the same thing x = sprite:getX() x = sprite:get(&quot;x&quot;) -- the following two lines do the same thing y = sprite:getY() y = sprite:get(&quot;y&quot;) -- the following two lines do the same thing rotation = sprite:getRotation() rotation = sprite:get(&quot;rotation&quot;) -- the following two lines do the same thing scaleX = sprite:getScaleX() scaleX = sprite:get(&quot;scaleX&quot;) -- the following two lines do the same thing scaleY = sprite:getScaleY() scaleY = sprite:get(&quot;scaleY&quot;)</source> {{Sprite}} nxxmpr91o6rqzqlserg6vlcy0wj6010 Sprite:getAlpha 0 788 14267 10679 2019-12-03T23:06:10Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns the alpha transparency of this sprite. 0 means fully transparent and 1 means fully opaque.<br /> <br /></translate> <source lang="lua"> (number) = Sprite:getAlpha() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The alpha of the sprite (value between 0-1)</translate><br/> {{Sprite}} m4nnq6eiimd8pi6njce2a8b42zk6fyq Sprite:getAnchorPosition 0 516 14269 9998 2019-12-03T23:06:24Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.03.22<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate>Returns x,y,z anchor position of the [[Special:MyLanguage/Sprite|Sprite]] in its relative coordinates</translate> <source lang="lua"> (number), (number), (number) = Sprite:getAnchorPosition() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>anchor x position</translate><br/> '''<translate>Returns</translate>''' (number) <translate>anchor y position</translate><br/> '''<translate>Returns</translate>''' (number) <translate>anchor z position</translate><br/> {{Sprite}} fuhma4n4te1rm5bxo7fge8oyd2fy14k Sprite:getBounds 0 1092 14270 13431 2019-12-03T23:06:38Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns a rectangle (as x, y, width and height) that encloses the sprite as it appears in another sprite's coordinate system.<br /> <br /></translate> <source lang="lua"> (number), (number), (number), (number) = Sprite:getBounds(targetSprite) </source> === <translate>Parameters</translate> === '''targetSprite''': (Sprite) <translate>the sprite that defines the other coordinate system to transform</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x coordinate</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y coordinate</translate><br/> '''<translate>Returns</translate>''' (number) <translate>width of Sprite</translate><br/> '''<translate>Returns</translate>''' (number) <translate>height of Sprite</translate><br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">local x, y, width, height = sprite:getBounds(sprite) -- returns local (untransformed) bounds local x, y, width, height = sprite:getBounds(stage) -- returns bounds as transformed to the stage coordinate system</source> {{Sprite}} 5aii92zk11171kky9q9j3jkh53r2izv Sprite:getChildAt 0 244 14271 9651 2019-12-03T23:06:55Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns the child [[Special:MyLanguage/Sprite|Sprite]] instance that exists at the specified index. First child is at index 1.<br /> <br /></translate> <source lang="lua"> (Sprite) = Sprite:getChildAt(index) </source> === <translate>Parameters</translate> === '''index''': (number) <translate>The index position of the child object.</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (Sprite) <translate>The child sprite at the specified index position.</translate><br/> {{Sprite}} etkz17z1u2cksr1j92mjejmg1lu8z0y Sprite:getChildIndex 0 556 14272 10062 2019-12-03T23:07:08Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns the index of the specified child sprite.<br /> <br /></translate> <source lang="lua"> (number) = Sprite:getChildIndex(child) </source> === <translate>Parameters</translate> === '''child''': (Sprite) <translate>The child sprite to identify.</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The index of the specified child sprite.</translate><br/> {{Sprite}} 5a77fbx6npizgyxohbtw66get06ls8c Sprite:getChildrenAtPoint 0 2601 14273 13017 2019-12-03T23:07:28Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.12.1<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns the children Sprites that correspond to the given screen coordinates.<br /> <br /></translate> <source lang="lua"> (table) = Sprite:getChildrenAtPoint(x,y,visible,nosubs) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>x coordinate in global space.</translate> <br/> '''y''': (number) <translate>y coordinate in global space.</translate> <br/> '''visible''': (boolean) <translate>Only report visible sprites.</translate> <br/> '''nosubs''': (boolean) <translate>Don't report children of this sprite's children.</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>A list of Sprites that were found at that screen location.</translate><br/> {{Sprite}} kjqx25517xigdhaqughc0vu1y7ws7ex Sprite:getClip 0 1122 14274 10583 2019-12-03T23:07:43Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate>Returns the coordinates of the Sprite clip range if set with setClip</translate> <source lang="lua"> (number), (number), (number), (number) = Sprite:getClip() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x-coordinate of clip origin</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y-coordinate of clip origin</translate><br/> '''<translate>Returns</translate>''' (number) <translate>width of clip region</translate><br/> '''<translate>Returns</translate>''' (number) <translate>Height of clip region</translate><br/> {{Sprite}} t6oyj3dv8owf2x6kf7jy3mdb7bcuqc2 Sprite:getColorTransform 0 723 14275 10256 2019-12-03T23:07:57Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate>Returns the red, green, blue and alpha channel multipliers.<br /> <br /></translate> <source lang="lua"> (number), (number), (number), (number) = Sprite:getColorTransform() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>redMultiplier</translate><br/> '''<translate>Returns</translate>''' (number) <translate>greenMultiplier</translate><br/> '''<translate>Returns</translate>''' (number) <translate>blueMultiplier</translate><br/> '''<translate>Returns</translate>''' (number) <translate>alphaMultiplier</translate><br/> {{Sprite}} 2zg887w4zd1s59c8ihnqk4ogy6kmsva Sprite:getHeight 0 618 14276 10123 2019-12-03T23:08:11Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns the height of the sprite, in pixels. The height is calculated based on the<br /> bounds of the content of the sprite.<br /> <br /> If "true" is passed to this method, the original height is returned without accounting for transformations.</translate> <source lang="lua"> (number) = Sprite:getHeight(withoutTransform) </source> === <translate>Parameters</translate> === '''withoutTransform''': (boolean) <translate>If true, return the height without transformation, else return the transformed height</translate> '''optional'''<br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>Height of the sprite.</translate><br/> {{Sprite}} 2eatjckgpk3etk4rvxxwwza9yq13hnd Sprite:getLayoutConstraints 0 1439 14277 9818 2019-12-03T23:08:25Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.9<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> <br />See [[Special:MyLanguage/Sprite:setLayoutConstraints|Sprite:setLayoutConstraints]] for a description of the fields.<br /></translate> <source lang="lua"> (table) = Sprite:getLayoutConstraints() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>Table of layout constraints.</translate><br/> {{Sprite}} 5wdtrspzn1oiizzbqegycirt3xog7en Sprite:getLayoutInfo 0 1440 14278 10194 2019-12-03T23:08:40Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.9<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> <br /> Returns computed placement value according to Gideros layout system. The returned table can contain the following fields: * '''startx''': The 0-based index of the column the child was placed into<br/> * '''starty''': The 0-based index of the row the child was placed into<br/> * '''width''': The width of the child<br/> * '''height''': The height of the child<br/> * '''weightx''': The horizontal weight of the child<br/> * '''weighty''': The vertical weight of the child<br/> * '''minWidth''': Minimum width<br/> * '''minHeight''': Minimum height<br/></translate> <source lang="lua"> (table) = Sprite:getLayoutInfo() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>Table of layout information.</translate><br/> {{Sprite}} ddh6v6xmcmkiepdcx9uaw6pc57w59ba Sprite:getLayoutParameters 0 1442 14279 10703 2019-12-03T23:08:55Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.9<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> <br />See [[Special:MyLanguage/Sprite:setLayoutParameters|Sprite:setLayoutParameters]] for a description of the fields.<br /></translate> <source lang="lua"> (table) = Sprite:getLayoutParameters() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>Table of layout parameters.</translate><br/> {{Sprite}} o463ejnpwbkl9pt2bw5ydg6c5wtf37w Sprite:getMatrix 0 465 14280 9949 2019-12-03T23:09:07Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns the transformation matrix of the sprite. Each invocation of this function returns a new [[Special:MyLanguage/Matrix|Matrix]] object.<br /> <br /></translate> <source lang="lua"> (Matrix) = Sprite:getMatrix() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (Matrix) <translate>The transformation matrix of the sprite</translate><br/> {{Sprite}} hy2oz1hv89j8g5o75e754gpwke7kmr2 Sprite:getNumChildren 0 286 14281 9707 2019-12-03T23:09:25Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns the number of children of this sprite.<br /> <br /></translate> <source lang="lua"> (number) = Sprite:getNumChildren() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The number of children of this sprite.</translate><br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">local container1 = Sprite.new() local container2 = Sprite.new() local sprite1 = Sprite.new(); local sprite2 = Sprite.new(); container2:addChild(container1) container1:addChild(sprite1) container1:addChild(sprite2) print(container1:getNumChildren()) --&gt; 2 print(container2:getNumChildren()) --&gt; 1 print(sprite1:getNumChildren()) --&gt; 0 print(sprite2:getNumChildren()) --&gt; 0</source> {{Sprite}} rayya7ta8lrz8s6pi728mdj1u2s7j89 Sprite:getParent 0 994 14282 10442 2019-12-03T23:09:40Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns the [[Special:MyLanguage/Sprite|Sprite]] object that contains this [[Special:MyLanguage/Sprite|Sprite]] object.<br /> <br /></translate> <source lang="lua"> (Sprite) = Sprite:getParent() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (Sprite) <translate>The parent sprite.</translate><br/> {{Sprite}} a59ar7etuii48wzxr713wo1j45sai8k Sprite:getPosition 0 357 14283 9793 2019-12-03T23:09:56Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns the x, y and z coordinates of the sprite.<br /> <br /></translate> <source lang="lua"> (number), (number), (number) = Sprite:getPosition() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The x coordinates of the sprite</translate><br/> '''<translate>Returns</translate>''' (number) <translate>The y coordinates of the sprite</translate><br/> '''<translate>Returns</translate>''' (number) <translate>The z coordinates of the sprite</translate><br/> {{Sprite}} nepgm81klugnmpasl31pt6nknm3hdp2 Sprite:getRotation 0 1001 14284 10802 2019-12-03T23:10:10Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns the rotation of the sprite in degrees.<br /> <br /></translate> <source lang="lua"> (number) = Sprite:getRotation() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>Rotation of the Sprite in degrees</translate><br/> {{Sprite}} 5hcrj6ror1s4s6eyyi7swr6rvd1j1lp Sprite:getRotationX 0 284 14285 9698 2019-12-03T23:10:24Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.04.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns the rotation of the sprite around x axis in degrees.<br /> <br /></translate> <source lang="lua"> (number) = Sprite:getRotationX() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>Rotation of the Sprite on x in degrees</translate><br/> {{Sprite}} 5cfhi046ah65l262gd3q4fvh78ecpa9 Sprite:getRotationY 0 279 14286 9696 2019-12-03T23:10:36Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.04.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns the rotation of the sprite around Y axis in degrees.<br /> <br /></translate> <source lang="lua"> (number) = Sprite:getRotationY() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>Rotation of the Sprite on y in degrees</translate><br/> {{Sprite}} r26c566lqu3sddw0dhy62u1sx7lp7zy Sprite:getScale 0 929 14287 10399 2019-12-03T23:10:52Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns the horizontal, vertical and z axis scales of the sprite.<br /> <br /></translate> <source lang="lua"> (number), (number), (number) = Sprite:getScale() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The horizontal scale of the sprite</translate><br/> '''<translate>Returns</translate>''' (number) <translate>The vertical scale of the sprite</translate><br/> '''<translate>Returns</translate>''' (number) <translate>The depth scale of the sprite</translate><br/> {{Sprite}} f9up4tpalscrgknpc0fdsquwdcllbom Sprite:getScaleX 0 909 14288 10752 2019-12-03T23:11:04Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns the horizontal scale of the sprite.<br /> <br /></translate> <source lang="lua"> (number) = Sprite:getScaleX() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The horizontal scale of the sprite.</translate><br/> {{Sprite}} 5howccwzp56tg8f9fz38c1alrt7vsq3 Sprite:getScaleY 0 916 14289 10385 2019-12-03T23:11:16Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns the vertical scale of the sprite.<br /> <br /></translate> <source lang="lua"> (number) = Sprite:getScaleY() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The vertical scale of the object.</translate><br/> {{Sprite}} 65bmmgf77qbtz223svhmk2ob127x57g Sprite:getScaleZ 0 906 14290 10746 2019-12-03T23:11:30Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.04.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns the scale on z axis of the sprite.<br /> <br /></translate> <source lang="lua"> (number) = Sprite:getScaleZ() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>z axis scale</translate><br/> {{Sprite}} rp0yc4xnx4qbt6m19l9l08916arlt6b Sprite:getSkew 0 933 14291 10767 2019-12-03T23:11:42Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate>Returns the x and y skew parameters of the Sprite</translate> <source lang="lua"> (number), (number) = Sprite:getSkew() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The x-skew of the Sprite</translate><br/> '''<translate>Returns</translate>''' (number) <translate>The y-skew of the Sprite</translate><br/> {{Sprite}} syajgxdaf4cj0ge8xz4hus17e0fm2ax Sprite:getSkewX 0 820 14292 10696 2019-12-03T23:11:55Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate>Returns the sprite's X-skew (ie shear)</translate> <source lang="lua"> (number) = Sprite:getSkewX() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The sprite's X-skew</translate><br/> {{Sprite}} 39u6b0k9190b77is3iub6kfg3e75exk Sprite:getSkewY 0 828 14293 10699 2019-12-03T23:12:06Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate>Returns the y-skew of the Sprite</translate> <source lang="lua"> (number) = Sprite:getSkewY() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The y-skew of the Sprite</translate><br/> {{Sprite}} arc7rlo3fp6hzbodnj1i85op7wal4xi Sprite:getWidth 0 662 14294 10140 2019-12-03T23:12:24Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns the width of the sprite, in pixels. The width is calculated based on the<br /> bounds of the content of the sprite.<br /> <br /> If the parameter "true" is passed, the original width is returned without transformations.</translate> <source lang="lua"> (any), (any) = Sprite:getWidth(withoutTransform) </source> === <translate>Parameters</translate> === '''withoutTransform''': (boolean) <translate>If true, return the width of the Sprite without transformations else return the transformed width</translate> '''optional'''<br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (any) <translate>Width of the sprite.</translate><br/> '''<translate>Returns</translate>''' (any) <translate>Width of the sprite.</translate><br/> {{Sprite}} 2buc3b2f3m1jz2972dordwjzc46v1n6 Sprite:getX 0 1043 14295 10491 2019-12-03T23:12:37Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns the x coordinate of the sprite.<br /> <br /></translate> <source lang="lua"> (number) = Sprite:getX() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The x coordinate of the sprite</translate><br/> {{Sprite}} 2mlr24mag87lyir72z1k245b2mqjkpk Sprite:getY 0 1041 14296 10486 2019-12-03T23:12:49Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns the y coordinate of the sprite.<br /> <br /></translate> <source lang="lua"> (number), (any) = Sprite:getY() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The y coordinate of the sprite</translate><br/> '''<translate>Returns</translate>''' (any) <translate>The y coordinate of the sprite</translate><br/> {{Sprite}} o0x4erkl8izjqoekmrw3t50r4zafjl4 Sprite:getZ 0 1042 14297 10842 2019-12-03T23:13:02Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.04.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns the z coordinate of the sprite.<br /> <br /></translate> <source lang="lua"> (number) = Sprite:getZ() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>z position</translate><br/> {{Sprite}} f8vcy94pokotmw6c27rkyp6arewga4u Sprite:globalToLocal 0 566 14298 10073 2019-12-03T23:13:16Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Converts the x,y coordinates from the global to the sprite's (local) coordinates.<br /> <br /> <br /></translate> <source lang="lua"> (number), (number) = Sprite:globalToLocal(x,y) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>x coordinate of the global coordinate.</translate> <br/> '''y''': (number) <translate>y coordinate of the global coordinate.</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>1. x coordinate relative to the display object.</translate><br/> '''<translate>Returns</translate>''' (number) <translate>2. y coordinate relative to the display object.</translate><br/> {{Sprite}} q4tkfn7acr06ibt72xpp7fugyja39zz Sprite:hitTestPoint 0 620 14299 13014 2019-12-03T23:13:31Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Checks whether the given coordinates (in global coordinate system) is in bounds of the sprite.<br /> <br /> <br /></translate> <source lang="lua"> (bool) = Sprite:hitTestPoint(x,y,shapeFlag) </source> === <translate>Parameters</translate> === '''x''': (number) <translate></translate> <br/> '''y''': (number) <translate></translate> <br/> '''shapeFlag''': (bool) <translate>Take hidden, clipping/masking into consideration when testing hit point</translate> '''optional'''<br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>''true'' if the given global coordinates are in bounds of the sprite, ''false'' otherwise.</translate><br/> {{Sprite}} a62n8rmrrf9bkrsk99w2ui5yvb2o7y1 Sprite:isVisible 0 504 14300 9993 2019-12-03T23:13:46Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Returns whether or not the sprite is visible. Child sprites that are not visible are also taken<br /> into consideration while calculating bounds.<br /> <br /></translate> <source lang="lua"> (bool) = Sprite:isVisible() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>A value of ''true'' if sprite is visible; ''false'' otherwise.</translate><br/> {{Sprite}} lbodtujg3og5g3b03gqotjk3h98uk1l Sprite:localToGlobal 0 475 14301 9945 2019-12-03T23:14:00Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Converts the x,y coordinates from the sprite's (local) coordinates to the global coordinates.<br /> <br /></translate> <source lang="lua"> (number), (number) = Sprite:localToGlobal(x,y) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>x coordinate of the local coordinate.</translate> <br/> '''y''': (number) <translate>y coordinate of the local coordinate.</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>1. x coordinate relative to the display area.</translate><br/> '''<translate>Returns</translate>''' (number) <translate>2. y coordinate relative to the display area.</translate><br/> {{Sprite}} ciau9uo07q8x2mwolsunxhtx88f9d1u Sprite:removeChild 0 768 14302 10286 2019-12-03T23:14:16Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Removes the specified child [[Special:MyLanguage/Sprite|Sprite]] instance from the child list of this [[Special:MyLanguage/Sprite|Sprite]] instance.<br /> <br /></translate> <source lang="lua"> Sprite:removeChild(child) </source> === <translate>Parameters</translate> === '''child''': (Sprite) <translate>The child sprite to remove.</translate> <br/> {{Sprite}} siw3t5m4t07t419u8rn4caa7rs4yf3r Sprite:removeChildAt 0 791 14303 10681 2019-12-03T23:14:31Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Removes the child [[Special:MyLanguage/Sprite|Sprite]] instance at the specifed index. Index of the first child is 1<br /> and index of the last child can be get from [[Special:MyLanguage/Sprite:getNumChildren|Sprite:getNumChildren]] function.<br /> <br /></translate> <source lang="lua"> Sprite:removeChildAt(index) </source> === <translate>Parameters</translate> === '''index''': (number) <translate>The child index of the sprite to remove.</translate> <br/> {{Sprite}} o44p7j7tpc9r4ztg5376fpj5newx1a9 Sprite:removeFromParent 0 622 14304 10148 2019-12-03T23:14:48Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> If the sprite has a parent, removes the sprite from the child list of its parent sprite. This function is equilavent to:<br /> <br /> &lt;pre&gt;&lt;code&gt;<br /> function Sprite:removeFromParent()<br /> local parent = self:getParent()<br /> if parent ~= nil then<br /> parent:removeChild(self)<br /> end<br /> end<br /> <br /> &lt;/code&gt;&lt;/pre&gt;<br /></translate> <source lang="lua"> Sprite:removeFromParent() </source> {{Sprite}} lavczyirkcbpxejj60hf2gu40tqwmbt Sprite:set 0 673 14305 10227 2019-12-03T23:15:10Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Sets the specified property of this sprite instance by its name. These names are supported:<br /> <br /> <ul><br /> <li>''"x"''</li><br /> <li>''"y"''</li><br /> <li>''"z"''</li><br /> <li>''"rotation"''</li><br /> <li>''"rotationX"''</li><br /> <li>''"rotationY"''</li><br /> <li>''"scaleX"''</li><br /> <li>''"scaleY"''</li><br /> <li>''"scaleZ"''</li><br /> <li>''"alpha"''</li><br /> <li>''"redMultiplier"''</li><br /> <li>''"greenMultiplier"''</li><br /> <li>''"blueMultiplier"''</li><br /> <li>''"alphaMultiplier"''</li><br /> <li>''"anchorX"''</li><br /> <li>''"anchorY"''</li><br /> <li>''"anchorZ"''</li><br /> </ul><br /> <br /></translate> <source lang="lua"> Sprite:set(param,value) </source> === <translate>Parameters</translate> === '''param''': (string) <translate>The name of the parameter</translate> <br/> '''value''': (number) <translate>The new value of the specified parameter</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">-- the following two lines do the same thing sprite:setX(10) sprite:set(&quot;x&quot;, 10) -- the following two lines do the same thing sprite:setY(10) sprite:set(&quot;y&quot;, 10) -- the following two lines do the same thing sprite:setRotation(10) sprite:set(&quot;rotation&quot;, 10) -- the following two lines do the same thing sprite:setScaleX(0.5) sprite:set(&quot;scaleX&quot;, 0.5) -- the following two lines do the same thing sprite:setScaleY(0.5) sprite:set(&quot;scaleY&quot;, 0.5) -- the following two lines do the same thing sprite:setScale(0.5) sprite:set(&quot;scale&quot;, 0.5)</source> {{Sprite}} 588rlbhq8v0xgvi9zwwqa84l34tw85z Sprite:setAlpha 0 1045 14306 10493 2019-12-03T23:15:26Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Sets the alpha transparency of this sprite. 0 means fully transparent and 1 means fully opaque.<br /> <br /></translate> <source lang="lua"> Sprite:setAlpha(alpha) </source> === <translate>Parameters</translate> === '''alpha''': (number) <translate>The new alpha transparency of the sprite</translate> <br/> {{Sprite}} kh3hmbj27k9ucx2c9x4nmnk4cnybsv4 Sprite:setAnchorPosition 0 508 14307 9992 2019-12-03T23:15:39Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.03.22<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate>Sets x, y, z anchor position of [[Special:MyLanguage/Sprite|Sprite]] in it's relative coordinates. Meaning Sprite with dimensions 100x100 and anchor position of 50x50 would rotate around its center</translate> <source lang="lua"> Sprite:setAnchorPosition(anchorX,anchorY,anchorZ) </source> === <translate>Parameters</translate> === '''anchorX''': (number) <translate>Anchor position in Sprite's internal coordinates</translate> <br/> '''anchorY''': (number) <translate>Anchor position in Sprite's internal coordinates</translate> <br/> '''anchorZ''': (number) <translate>Anchor position in Sprite's internal coordinates</translate> '''optional'''<br/> {{Sprite}} 55d2qo9hjlykziv46ogryt95lipjawv Sprite:setBlendMode 0 198 14308 9591 2019-12-03T23:15:56Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Sets the blend mode of the sprite. This method can be called with 1 or 2 parameters. If one parameter is passed it must be one of the following blending modes:<br /> <br /> <ul><br /> <li>Sprite.ALPHA = "alpha"</li><br /> <li>Sprite.NO_ALPHA = "noAlpha"</li><br /> <li>Sprite.ADD = "add"</li><br /> <li>Sprite.MULTIPLY = "multiply"</li><br /> <li>Sprite.SCREEN = "screen"</li><br /> </ul><br /> <br /> If a [[Special:MyLanguage/Sprite|Sprite]] object doesn't set any blending mode, it takes the blending mode from its parent sprite.<br /> <br /> <ul><br /> <li>*Note:** The following two lines are completely same:</li><br /> </ul><br /> <pre><code><br /> sprite:setBlendMode("add")<br /> sprite:setBlendMode(Sprite.ADD)<br /> </code></pre><br /> It's a matter of taste which one to choose.<br /> <br /> <br /> If two parameters are passed to this method, then a source and destination blend can be set (in that order) and each take the values: <br /> <ul><br /> <li>Sprite.ZERO = "zero"</li><br /> <li>Sprite.ONE = "one"</li><br /> <li>Sprite.SRC_COLOR = "srcColor"</li><br /> <li>Sprite.ONE_MINUS_SRC_COLOR = "oneMinusSrcColor"</li><br /> <li>Sprite.DST_COLOR = "dstColor"</li><br /> <li>Sprite.ONE_MINUS_DST_COLOR = "oneMinusDstColor"</li><br /> <li>Sprite.SRC_ALPHA = "srcAlpha"</li><br /> <li>Sprite.ONE_MINUS_SRC_ALPHA = "oneMinusSrcAlpha"</li><br /> <li>Sprite.DST_ALPHA = "dstAlpha"</li><br /> <li>Sprite.ONE_MINUS_DST_ALPHA = "oneMinusDstAlpha"</li><br /> <li>Sprite.SRC_ALPHA_SATURATE = "srcAlphaSaturate"</li><br /> </ul><br /></translate> <source lang="lua"> Sprite:setBlendMode(blendMode or src,dst) </source> === <translate>Parameters</translate> === '''blendMode or src''': (String) <translate>If one parameter is used, this is the blend mode. If two parameters are used this is the source blend specification.</translate> <br/> '''dst''': (string) <translate>Destination blend mode</translate> '''optional'''<br/> {{Sprite}} 08mgxgz9w7pcd73j6i24qu1pfruubkb Sprite:setClip 0 845 14309 10344 2019-12-03T23:16:13Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.04.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate>Clip Sprite contents from provided x, y position to provided width and height Setting width or height to -1 will disable it</translate> <source lang="lua"> Sprite:setClip(x,y,width,height) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>x position from where to clip</translate> <br/> '''y''': (number) <translate>y position from where to clip</translate> <br/> '''width''': (number) <translate>width of how much to display before clipping</translate> <br/> '''height''': (number) <translate>width of how much to display before clipping</translate> <br/> {{Sprite}} bsgs67ypo10mp6cmkg2in70gltskmzf Sprite:setColorTransform 0 737 14310 10264 2019-12-03T23:16:26Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Sets the red, green, blue and alpha channel multipliers (values between 0 and 1). This function lets you adjust the color multipliers of a display object.<br /> This adjustment also applies to the children of this sprite instance.<br /> <br /></translate> <source lang="lua"> Sprite:setColorTransform(redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier) </source> === <translate>Parameters</translate> === '''redMultiplier''': (number, default = 1) <translate>The red multiplier of this sprite (values between 0 and 1)</translate> <br/> '''greenMultiplier''': (number, default = 1) <translate>The green multiplier of this sprite(values between 0 and 1)</translate> <br/> '''blueMultiplier''': (number, default = 1) <translate>The blue multiplier of this sprite(values between 0 and 1)</translate> <br/> '''alphaMultiplier''': (number, default = 1) <translate>The alpha multiplier of this sprite(values between 0 and 1)</translate> <br/> {{Sprite}} otbfydi12azq0k9ezwrovy0pjqq50jv Sprite:setLayoutConstraints 0 1443 14311 13445 2019-12-03T23:17:02Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.9 <br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]] <br/> === <translate>Description</translate> === <translate> This function specify the child placement rules within the grid defined on its parent by [[Special:MyLanguage/Sprite:setLayoutParameters|Sprite:setLayoutParameters]]. <br/> Gideros layout system is heavily based on Java GridBagLayout principle. See here for more explanation: https://www.math.uni-hamburg.de/doc/java/tutorial/uiswing/layout/gridbag.html <br/> The constraint table can contain the following fields: * '''gridx''': The 0-based index of the column the child must be placed into * '''gridy''': The 0-based index of the row the child must be placed into * '''gridwidth''': The number of column this child will take * '''gridheight''': The number of row this child will take * '''weightx''': The horizontal weight of the child. Used to distribute extra space among children * '''weighty''': The vertical weight of the child. Used to distribute extra space among children * '''anchor''': Defines where the child should be placed inside its grid space. Can be [[Special:MyLanguage/Sprite.LAYOUT_ANCHOR_NORTHWEST|Sprite.LAYOUT_ANCHOR_NORTHWEST]], [[Special:MyLanguage/Sprite.LAYOUT_ANCHOR_NORTH|Sprite.LAYOUT_ANCHOR_NORTH]], [[Special:MyLanguage/Sprite.LAYOUT_ANCHOR_NORTHEAST|Sprite.LAYOUT_ANCHOR_NORTHEAST]], [[Special:MyLanguage/Sprite.LAYOUT_ANCHOR_WEST|Sprite.LAYOUT_ANCHOR_WEST]], [[Special:MyLanguage/Sprite.LAYOUT_ANCHOR_CENTER|Sprite.LAYOUT_ANCHOR_CENTER]], [[Special:MyLanguage/Sprite.LAYOUT_ANCHOR_EAST|Sprite.LAYOUT_ANCHOR_EAST]], [[Special:MyLanguage/Sprite.LAYOUT_ANCHOR_SOUTHWEST|Sprite.LAYOUT_ANCHOR_SOUTHWEST]], [[Special:MyLanguage/Sprite.LAYOUT_ANCHOR_SOUTH|Sprite.LAYOUT_ANCHOR_SOUTH]] or [[Special:MyLanguage/Sprite.LAYOUT_ANCHOR_SOUTHEAST|Sprite.LAYOUT_ANCHOR_SOUTHEAST]] * '''fill''': In which directions the child should be expanded to fit the grid space. Can be [[Special:MyLanguage/Sprite.LAYOUT_FILL_NONE|Sprite.LAYOUT_FILL_NONE]], [[Special:MyLanguage/Sprite.LAYOUT_FILL_HORIZONTAL|Sprite.LAYOUT_FILL_HORIZONTAL]], [[Special:MyLanguage/Sprite.LAYOUT_FILL_VERTICAL|Sprite.LAYOUT_FILL_VERTICAL]] or [[Special:MyLanguage/Sprite.LAYOUT_FILL_BOTH|Sprite.LAYOUT_FILL_BOTH]] * '''ipadx''': Internal horizontal padding * '''ipady''': Internal vertical padding * '''minWidth''': Minimum width * '''minHeight''': Minimum height * '''prefWidth''': Preferred width * '''prefHeight''': Preferred height * '''insetTop''': the top margin * '''insetLeft''': the left margin * '''insetBottom''': the bottom margin * '''insetRight''': the right margin <br/> Specifying a '''nil''' table will clear layout constraints. <br/> When a [[Special:MyLanguage/Sprite|Sprite]] is resized by the layout system, an ''Event.LAYOUT_RESIZED'' is triggered. </translate> <source lang="lua"> Sprite:setLayoutConstraints(constraints) </source> === <translate>Parameters</translate> === '''constraints''': (table) <translate>Table of layout constraints.</translate> <br/> === <translate>Examples</translate> === '''Example''': pixels <br/> <gallery widths=136px heights=240px> Layout parameters example.png </gallery> <br/> <source lang="lua"> -- LAYOUT CONSTRAINTS @Nanocore -- BUTTONS HOLDER local myholder = Pixel.new(0x0, 0.5, 256, 256) myholder:setPosition(8, 8) myholder:setLayoutParameters({ columnWeights = {1, 1, 1}, -- 3 columns rowWeights = {1, 1, 1, 1}, -- 4 rows columnWidths = {32, 32, 32}, -- min columns width rowHeights = {32, 32, 32, 32}, -- min rows width }) -- BUTTONS local mybtn1 = Pixel.new(0xff0000, 1, 32, 32) mybtn1:setLayoutConstraints({ gridx = 0, gridy = 0, gridwidth = 2, gridheight = 2, anchor = Sprite.LAYOUT_ANCHOR_NORTHWEST, fill = Sprite.LAYOUT_FILL_BOTH, }) myholder:addChild(mybtn1) local mybtn2 = Pixel.new(0x00ff00, 1, 32, 32) mybtn2:setLayoutConstraints({ gridx = 1, gridy = 2, gridwidth = 1, anchor = Sprite.LAYOUT_ANCHOR_NORTHWEST, fill = Sprite.LAYOUT_FILL_VERTICAL, }) myholder:addChild(mybtn2) local mybtn3 = Pixel.new(0x0000ff, 1, 32, 32) mybtn3:setLayoutConstraints({ gridx = 2, gridy = 3, gridwidth = 1, anchor = Sprite.LAYOUT_ANCHOR_NORTHWEST, fill = Sprite.LAYOUT_FILL_BOTH, }) myholder:addChild(mybtn3) -- ADD TO STAGE stage:addChild(myholder) </source> <br/> {{Sprite}} 33msuhrllyba8zqsb9yjg44wvqzpfn5 Sprite:setLayoutParameters 0 1441 14312 13444 2019-12-03T23:18:34Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.9 <br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]] <br/> === <translate>Description</translate> === <translate> Gideros Layout arranges a sprite's children into cells of a grid. With this method, you tell the parent's sprite how the rows and columns of the layout grid should be sized. <br/> If there is extra space available after applying minimum widths and heights, it is distributed according to relative weights of each row/column. <br/> Gideros layout system is heavily based on Java GridBagLayout principle. See here for more explanation: https://www.math.uni-hamburg.de/doc/java/tutorial/uiswing/layout/gridbag.html <br/> The following parameters apply: * '''columnWidths''': an array of minimum width for each column * '''rowHeights''': an array of minimum height for each row * '''columnWeights''': an array of relative weights for each column * '''rowWeights''': an array of relative weights for each row * '''insetTop''': the top margin * '''insetLeft''': the left margin * '''insetBottom''': the bottom margin * '''insetRight''': the right margin <br/> Specifying a '''nil''' table will clear layout parameters. </translate> <source lang="lua"> Sprite:setLayoutParameters(layout) </source> === <translate>Parameters</translate> === '''layout''': (table) <translate>Table of layout parameters.</translate> <br/> === <translate>Examples</translate> === '''Example 1''': center an image inside another image <br/> <source lang="lua"> -- LAYOUT CONSTRAINTS 01 @hgy29 local ticket = Bitmap.new(Texture.new("gfx/vip/ticket.png")) local text = Bitmap.new(Texture.new("gfx/vip/text.png")) -- Use auto layout on ticket to center text automatically ticket:setLayoutParameters{ rowWeights = {1}, columnWeights = {1} } text:setLayoutConstraints{} ticket:addChild(text) stage:addChild(ticket) </source> <br/> '''Example 2''': pixels <br/> <gallery widths=136px heights=240px> Layout parameters example.png </gallery> <br/> <source lang="lua"> -- LAYOUT CONSTRAINTS 02 @Nanocore -- BUTTONS HOLDER local myholder = Pixel.new(0x0, 0.5, 256, 256) myholder:setPosition(8, 8) myholder:setLayoutParameters({ columnWeights = {1, 1, 1}, -- 3 columns rowWeights = {1, 1, 1, 1}, -- 4 rows columnWidths = {32, 32, 32}, -- min columns width rowHeights = {32, 32, 32, 32}, -- min rows width }) -- BUTTONS local mybtn1 = Pixel.new(0xff0000, 1, 32, 32) mybtn1:setLayoutConstraints({ gridx = 0, gridy = 0, gridwidth = 2, gridheight = 2, anchor = Sprite.LAYOUT_ANCHOR_NORTHWEST, fill = Sprite.LAYOUT_FILL_BOTH, }) myholder:addChild(mybtn1) local mybtn2 = Pixel.new(0x00ff00, 1, 32, 32) mybtn2:setLayoutConstraints({ gridx = 1, gridy = 2, gridwidth = 1, anchor = Sprite.LAYOUT_ANCHOR_NORTHWEST, fill = Sprite.LAYOUT_FILL_VERTICAL, }) myholder:addChild(mybtn2) local mybtn3 = Pixel.new(0x0000ff, 1, 32, 32) mybtn3:setLayoutConstraints({ gridx = 2, gridy = 3, gridwidth = 1, anchor = Sprite.LAYOUT_ANCHOR_NORTHWEST, fill = Sprite.LAYOUT_FILL_BOTH, }) myholder:addChild(mybtn3) -- ADD TO STAGE stage:addChild(myholder) </source> <br/> {{Sprite}} 1pc2gvh8lpeozqfcvbge1a0ta8siven Sprite:setMatrix 0 436 14313 9894 2019-12-03T23:18:50Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Sets the transformation matrix of the sprite.<br /> <br /></translate> <source lang="lua"> Sprite:setMatrix(matrix) </source> === <translate>Parameters</translate> === '''matrix''': (Matrix) <translate></translate> <br/> {{Sprite}} i6gk6rykjibi37ifahbud6uecsqn5vj Sprite:setPosition 0 328 14314 9772 2019-12-03T23:19:02Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Sets the x, y and z coordinates of the sprite.<br /> <br /></translate> <source lang="lua"> Sprite:setPosition(x,y,z) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>The new x coordinate of the sprite</translate> <br/> '''y''': (number) <translate>The new y coordinate of the sprite</translate> <br/> '''z''': (number) <translate>The new z coordinate of the sprite</translate> '''optional'''<br/> {{Sprite}} ak6v1zzcnxz5tvacq3fvms6esl3us34 Sprite:setRotation 0 733 14315 13339 2019-12-03T23:19:20Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6 <br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]] <br/> === <translate>Description</translate> === <translate> Sets the rotation of the sprite in degrees. </translate> <br/> <source lang="lua"> Sprite:setRotation(rotation) </source> === <translate>Parameters</translate> === '''rotation''': (number) <translate>rotation of the sprite</translate> <br/> === <translate>Example</translate> === <source lang="lua"> -- let's define a pixel and add it to the stage local mypixel = Pixel.new(0xff0000, 1, 64, 64) mypixel:setAnchorPoint(0.5, 0.5) mypixel:setPosition(64, 64) stage:addChild(mypixel) function onTimer(event) -- add 1 degree each time the function is called mypixel:setRotation(mypixel:getRotation() + 1) end -- create our timer and add an event listener -- 24 = delay in milliseconds -- 360 = number of repetitions (here the result is 360 degrees) local timer = Timer.new(24, 360) timer:addEventListener(Event.TIMER, onTimer, timer) timer:start() </source> <br/> {{Sprite}} 06tqx29z60idbixqq11td0nx21h566j Sprite:setRotationX 0 853 14316 10354 2019-12-03T23:19:36Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.04.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Sets the rotation of the sprite in degrees around x axis.<br /></translate> <source lang="lua"> Sprite:setRotationX() </source> {{Sprite}} 5tc8iwqw0ax8d4bfsjeeeuo38bdo092 Sprite:setRotationY 0 849 14317 10349 2019-12-03T23:19:50Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.04.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Sets the rotation of the sprite in degrees around y axis.<br /></translate> <source lang="lua"> Sprite:setRotationY() </source> {{Sprite}} 0ox3oab0cba5wlviyonpb7rf2h9q4jd Sprite:setScale 0 1120 14318 10579 2019-12-03T23:20:04Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Sets the horizontal, vertical and z axis scales of the sprite.<br /> <br /></translate> <source lang="lua"> Sprite:setScale(scaleX,scaleY,scaleZ) </source> === <translate>Parameters</translate> === '''scaleX''': (number) <translate>of the object</translate> <br/> '''scaleY''': (number, default = scaleX) <translate>of the object</translate> <br/> '''scaleZ''': (number, default = scaleX) <translate>of the object</translate> <br/> {{Sprite}} fsagtfnyvd5d9eswmxtdpe6i4v0u7ra Sprite:setScaleX 0 719 14319 10637 2019-12-03T23:20:17Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Sets the horizontal scale of the sprite.<br /> <br /></translate> <source lang="lua"> Sprite:setScaleX(scaleX) </source> === <translate>Parameters</translate> === '''scaleX''': (number) <translate>horizontal scale of the sprite</translate> <br/> {{Sprite}} 7mppweebqya0itaim55pjt0gkvhz8qw Sprite:setScaleY 0 722 14320 10255 2019-12-03T23:20:29Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Sets the vertical scale of the sprite.<br /> <br /></translate> <source lang="lua"> Sprite:setScaleY(scaleY) </source> === <translate>Parameters</translate> === '''scaleY''': (number) <translate>of the object</translate> <br/> {{Sprite}} cib4956g104ocwnpx53uivc4h558m38 Sprite:setScaleZ 0 724 14321 10257 2019-12-03T23:20:42Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.04.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate>Set scale on z axis</translate> <source lang="lua"> Sprite:setScaleZ(scale) </source> === <translate>Parameters</translate> === '''scale''': (number) <translate>scale on z axis</translate> <br/> {{Sprite}} ki0tbiljdrgsixuq0ihntampttend5m Sprite:setShader 0 643 14322 10174 2019-12-03T23:20:55Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate>Set shader for this sprite. If nil is provided, sets default shader for current object</translate> <source lang="lua"> Sprite:setShader(shader) </source> === <translate>Parameters</translate> === '''shader''': (Shader) <translate>shader to use for this object</translate> <br/> {{Sprite}} ljmytmqdkv7w5ji6htjfrxw2f26r4xj Sprite:setShaderConstant 0 734 14323 10651 2019-12-03T23:21:13Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.4<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate>To change the value of a uniform from lua</translate> <source lang="lua"> Sprite:setShaderConstant(uniform name,data type,mult,data) </source> === <translate>Parameters</translate> === '''uniform name''': (string) <translate>The uniform name to change</translate> <br/> '''data type''': (int) <translate>The type if data to set (one of the Shader.Cxxx constants)</translate> <br/> '''mult''': (number) <translate>number of elements of the given type to set</translate> <br/> '''data''': (varies) <translate>And the actual data to set, either as a table or as multiple arguments</translate> <br/> {{Sprite}} quwuoej8hg4c6nwdkac2xw9zamedkfa Sprite:setSkew 0 410 14324 9870 2019-12-03T23:21:26Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate>Set the skew (ie shear) of the Sprite</translate> <source lang="lua"> Sprite:setSkew(kx,ky) </source> === <translate>Parameters</translate> === '''kx''': (number) <translate>The x-skew of the Sprite</translate> <br/> '''ky''': (number) <translate>The y-skew of the Sprite</translate> <br/> {{Sprite}} 083gqb8wp54us4eya2ufzir9m845fve Sprite:setSkewX 0 559 14325 10066 2019-12-03T23:21:39Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate>Skew (aka "shear") transformation effect</translate> <source lang="lua"> Sprite:setSkewX(kx) </source> === <translate>Parameters</translate> === '''kx''': (number) <translate>Amount of skew in range -90... 90 degrees</translate> <br/> {{Sprite}} m6zuohy0lwjok8ta2087gwhpx2mt3au Sprite:setSkewY 0 558 14326 10064 2019-12-03T23:21:55Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate>Set's the Sprite's Y-skew (ie shear)</translate> <source lang="lua"> Sprite:setSkewY(ky) </source> === <translate>Parameters</translate> === '''ky''': (number) <translate>The y-skew of the Sprite</translate> <br/> {{Sprite}} iibqx4wm9gdb6malkdeg9c7jez2bf2i Sprite:setStencilOperation 0 324 14327 13428 2019-12-03T23:22:18Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.6 <br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]] <br/> === <translate>Description</translate> === <translate> Allows to set a stencil operation to be used when drawing this sprite. <br/> The table can contain the following fields: <ul> <li><b>stencilClear</b>: (boolean) whether the stencil should be cleared beforehand.</li> <li><b>stencilMask</b>: (integer) the mask value used in stencil operations.</li> <li><b>stencilWriteMask</b>: (integer) the mask value used when writing to stencil.</li> <li><b>stencilRef</b>: (integer) the reference value used in stencil operations.</li> <li><b>stencilFunc</b>: (integer) the stencil function to use.</li> <li><b>stencilFail</b>: (integer) the stencil operation when stencil test failed.</li> <li><b>depthFail</b>: (integer) the stencil operation when depth test failed.</li> <li><b>depthPass</b>: (integer) the stencil operation when depth test has passed.</li> </ul> <br /> Stencil function and operations code are defined in Sprite.STENCIL_xxx fields and correspond to the GL_xxx relevant values in OpenGL stencil documentation. </translate> <source lang="lua"> Sprite:setStencilOperation(op) </source> === <translate>Parameters</translate> === '''op''': (table) <translate>A table containing the stencil operation settings, or nil to disable stencil</translate> === <translate>Examples</translate> === '''Example''': <source lang="lua"> -- STENCILOPERATION @hgy29 local bg = Bitmap.new(Texture.new("gfx/vip/background.png")) local ticket = Bitmap.new(Texture.new("gfx/vip/ticket.png")) local text = Bitmap.new(Texture.new("gfx/vip/text.png")) local fx1 = Bitmap.new(Texture.new("gfx/vip/fx1.png")) local fx2 = Bitmap.new(Texture.new("gfx/vip/fx2.png")) stage:addChild(bg) bg:setScale(0.5) stage:addChild(ticket) ticket:setPosition(80,20) ticket:setScale(0.5) ticket:addChild(fx1) fx1:setX(-100) fx1:addChild(fx2) fx2:setX(-100) ticket:addChild(text) -- Use auto layout on ticket to center text automatically ticket:setLayoutParameters{ rowWeights = {1}, columnWeights = {1} } text:setLayoutConstraints{} -- Use stencil for masking glow: -- 1) Clear stencil and set it to '1' for every pixel drawn on 'ticket' ticket:setStencilOperation{ stencilClear = true, stenciMask = 1, stencilWriteMask = 1, stencilRef = 1, stencilFunc = Sprite.STENCIL_ALWAYS, depthPass = Sprite.STENCIL_REPLACE } --2) Only draw fx1/fx2 if stencil isn't 0 fx1:setStencilOperation{ stencilClear = false, stencilMask = 1, stencilRef = 0, stencilFunc = Sprite.STENCIL_NOTEQUAL } local dir = 1 stage:addEventListener(Event.ENTER_FRAME, function() if fx1:getX() > 450 then dir = -1 elseif fx1:getX() < -100 then dir = 1 end fx1:setX(fx1:getX() + dir*5) end) </source> <br/> {{Sprite}} o99xgv0pkp7qvily92qwxm86tvawrno Sprite:setStopEventPropagation 0 2662 14328 13417 2019-12-03T23:22:36Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2019.9<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate>Selects the sets of input events that will not be propagated to parent Sprite if this Sprite is visible.<br /> </translate> <source lang="lua"> Sprite:setStopEventPropagation(mask) </source> === <translate>Parameters</translate> === '''mask''': (bitmask or boolean) <translate>A combination of Sprite.EVENTMASK_MOUSE,Sprite.EVENTMASK_TOUCH or Sprite.EVENTMASK_KEY, or false/true for none/all event stopped</translate> <br/> {{Sprite}} mfnt3bc7fzizu2726la73i3q6jwsuu6 Sprite:setVisible 0 446 14329 9904 2019-12-03T23:23:24Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Sets whether or not the sprite is visible. Sprites that are not visible are also taken<br /> into consideration while calculating bounds.<br /> <br /></translate> <source lang="lua"> Sprite:setVisible(visible) </source> === <translate>Parameters</translate> === '''visible''': (bool) <translate>whether or not the sprite is visible</translate> <br/> {{Sprite}} bkc2f3fe2gcyhfi62uaif8u141g92np Sprite:setX 0 602 14330 10089 2019-12-03T23:23:38Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Sets the x coordinate of the sprite<br /> <br /></translate> <source lang="lua"> Sprite:setX(x) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>The new x coordinate of the sprite</translate> <br/> {{Sprite}} ev6ijysg9y8x4o0nppz6ep4560rn774 Sprite:setY 0 569 14331 10076 2019-12-03T23:24:27Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Sets the y coordinate of the sprite.<br /> <br /></translate> <source lang="lua"> Sprite:setY(y) </source> === <translate>Parameters</translate> === '''y''': (number) <translate>The new y coordinate of the sprite</translate> <br/> {{Sprite}} kd9qun3jw1mhljljwkzv5csolyjgefo Sprite:setZ 0 565 14332 10075 2019-12-03T23:24:46Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.04.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Sets the z coordinate of the sprite<br /> <br /></translate> <source lang="lua"> Sprite:setZ(z) </source> === <translate>Parameters</translate> === '''z''': (number) <translate>position on z axis</translate> <br/> {{Sprite}} 3nnpubbpwacf8tct0nwr1bcqovl5xlm Sprite:swapChildren 0 754 14333 10657 2019-12-03T23:25:00Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.04.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate>Swap two children index places</translate> <source lang="lua"> Sprite:swapChildren(child1,child2) </source> === <translate>Parameters</translate> === '''child1''': (Sprite) <translate>First child</translate> <br/> '''child2''': (Sprite) <translate>Second child</translate> <br/> {{Sprite}} kiqxmnjd5o84l1p4w73vmx97qt8csk5 Sprite:swapChildrenAt 0 675 14334 10223 2019-12-03T23:25:14Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.04.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> Swaps two child sprites at specifed indexes. Each index must be between 1<br /> and the index number of the last child. Can be used to sort sprites into<br /> a specific order much faster than adding and removing sprites.<br/> <br /></translate> <source lang="lua"> Sprite:swapChildrenAt(index1,index2) </source> === <translate>Parameters</translate> === '''index1''': (number) <translate>The child index of the first sprite to swap.</translate> <br/> '''index2''': (number) <translate>The child index of the second sprite to swap.</translate> <br/> {{Sprite}} n6z9z7wvdnx58l584zpihhqk2ktdx84 Stage 0 32 14970 14369 2019-12-09T23:12:20Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Stage --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === The [[Special:MyLanguage/Stage|Stage]] class represents the top of the scene tree hierarchy. The instances of [[Special:MyLanguage/Stage|Stage]] is not created directly (there is not any ''Stage.new'' function) but there is already a global variable ''stage''. {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Stage:setClearColorBuffer|Stage:setClearColorBuffer]] ''<translate>Enable/disable draw call for background color</translate>''<br/><!-- GIDEROSMTD:Stage:setClearColorBuffer(state) Enable/disable draw call for background color --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} p7xjli7na8ewiz9ejql4xtcn2qi43dh Stage:setClearColorBuffer 0 237 14370 9643 2019-12-04T00:32:28Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Stage|Stage]]<br/> === <translate>Description</translate> === <translate>If you are covering whole background with image, you can disable background color draw call for better performance</translate> <source lang="lua"> Stage:setClearColorBuffer(state) </source> === <translate>Parameters</translate> === '''state''': (bool) <translate>false to disable draw call, true to enable</translate> <br/> {{Stage}} sg9qp19wf5o05l23xrp13vckzen00b9 TTFont 0 125 14979 14372 2019-12-09T23:33:13Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:TTFont --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/FontBase|FontBase]]<br/> === <translate>Description</translate> === The [[Special:MyLanguage/TTFont|TTFont]] class is used to load true type fonts. === <translate>Examples</translate> === <source lang="lua"> local font = TTFont.new("tahoma.ttf", 30) </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/TTFont.new|TTFont.new]] ''<translate>creates a new TTFont object</translate>''<br/><!-- GIDEROSMTD:TTFont.new(filename,size,text,filtering,outlineSize) creates a new TTFont object --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} faiq12mnlexf9i91xbusguegd9j0v4a TTFont.new 0 920 14990 14373 2019-12-10T15:12:10Z MoKaLux 19 formatting wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TTFont|TTFont]]<br/> === <translate>Description</translate> === Creates a new [[Special:MyLanguage/TTFont|TTFont]] object. <source lang="lua"> TTFont.new(filename,size,text,filtering,outlineSize) </source> === <translate>Parameters</translate> === '''filename''': (string) <translate>The name of the TTF file to be loaded</translate> <br/> '''size''': (number) <translate>size of the font</translate> <br/> '''text''': (string, optional) <translate>if specified, TTFont caches the characters of specified text to speed up the rendering. If instead of specified symbols empty quotes "" are provided, then all font symbols are cached.</translate> <br/> '''filtering''': (boolean, default = false) or (positive number, default = 0) <translate>Whether or not the font texture is filtered</translate> '''optional'''<br/> '''outlineSize''': (number) <translate>If set, the font will be rendered with an outline of the given size</translate> '''optional'''<br/> Starting from gideros 2017.9, 'text' optional parameter can be an empty string '''""''', in which case Gideros will automatically cache characters as they are used. Also, 2017.9 allows filename to be a table of several file names and associated size factor. Two forms are accepted: <source lang="lua">{"font1.ttf","font2.ttf",..}</source> or <source lang="lua">{{file="font1.ttf", sizeMult=1},{file="font2.ttf", sizeMult=1.1},...}</source> Characters will be looked up in each file in sequence until a glyph is found. {{TTFont}} br8jcdwf3nluwmtisu95ungsp542yfu TextField 0 87 14971 14375 2019-12-09T23:14:25Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:TextField --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === The [[Special:MyLanguage/TextField|TextField]] class is used to create objects for text display. === <translate>Examples</translate> === '''Example 1:''' bitmap font: <source lang="lua"> local font = Font.new("myfont.txt", "myfont.png") -- you need to add your bitmap font local textfield = TextField.new(font, "some text") stage:addChild(textfield) textfield:setText("some other text") -- change the text </source> '''Example 2:''' default font: <source lang="lua"> -- to use the default font, pass nil value for the font parameter local textfield2 = TextField.new(nil, "some text with default font") stage:addChild(textfield2) </source> '''Example 3:''' TTFont: <source lang="lua"> local font = TTFont.new("fonts/Tahoma.ttf", 32, "", true, 1) -- you need to add your .ttf font local text = TextField.new(font, "This is a text") text:setPosition(100, 100) stage:addChild(text) </source> '''Example 4:''' colored text: <source lang="lua"> local text = TextField.new(nil, "This is a \e[color=#f005]semi transparent red\e[color] text") text:setPosition(32, 64) stage:addChild(text) </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/TextField.new|TextField.new]] ''<translate>creates a new TextField object with the specified font and text</translate>''<br/><!-- GIDEROSMTD:TextField.new(font,text,sample,layout) creates a new TextField object with the specified font and text --> [[Special:MyLanguage/TextField:getLayout|TextField:getLayout]] ''<translate>Retrieve the layout parameters of this Textfield</translate>''<br/><!-- GIDEROSMTD:TextField:getLayout() Retrieve the layout parameters of this Textfield --> [[Special:MyLanguage/TextField:getLetterSpacing|TextField:getLetterSpacing]] ''<translate>returns the letter-spacing property which is used to increase or decrease the space between characters in a text</translate>''<br/><!-- GIDEROSMTD:TextField:getLetterSpacing() returns the letter-spacing property which is used to increase or decrease the space between characters in a text --> [[Special:MyLanguage/TextField:getLineHeight|TextField:getLineHeight]] ''<translate>Get line height</translate>''<br/><!-- GIDEROSMTD:TextField:getLineHeight() Get line height --> [[Special:MyLanguage/TextField:getPointFromTextPosition|TextField:getPointFromTextPosition]] ''<translate>returns the coordinates from a given offset within the text</translate>''<br/><!-- GIDEROSMTD:TextField:getPointFromTextPosition(offset) returns the coordinates from a given offset within the text --> [[Special:MyLanguage/TextField:getSample|TextField:getSample]] ''<translate>get string that was used as sample for determining line height</translate>''<br/><!-- GIDEROSMTD:TextField:getSample() get string that was used as sample for determining line height --> [[Special:MyLanguage/TextField:getText|TextField:getText]] ''<translate>returns the text displayed</translate>''<br/><!-- GIDEROSMTD:TextField:getText() returns the text displayed --> [[Special:MyLanguage/TextField:getTextColor|TextField:getTextColor]] ''<translate>returns the color of the text in a text field in hexadecimal format</translate>''<br/><!-- GIDEROSMTD:TextField:getTextColor() returns the color of the text in a text field in hexadecimal format --> [[Special:MyLanguage/TextField:getTextPositionFromPoint|TextField:getTextPositionFromPoint]] ''<translate>returns the offset into a text from x,y coordinates</translate>''<br/><!-- GIDEROSMTD:TextField:getTextPositionFromPoint(x,y) returns the offset into a text from x,y coordinates --> [[Special:MyLanguage/TextField:setFont|TextField:setFont]] ''<translate>set font to use</translate>''<br/><!-- GIDEROSMTD:TextField:setFont(font) set font to use --> [[Special:MyLanguage/TextField:setLayout|TextField:setLayout]] ''<translate>Change the layout parameters for this TextField</translate>''<br/><!-- GIDEROSMTD:TextField:setLayout(layout) Change the layout parameters for this TextField --> [[Special:MyLanguage/TextField:setLetterSpacing|TextField:setLetterSpacing]] ''<translate>sets the letter-spacing property which is used to increase or decrease the space between characters in a text</translate>''<br/><!-- GIDEROSMTD:TextField:setLetterSpacing(spacing) sets the letter-spacing property which is used to increase or decrease the space between characters in a text --> [[Special:MyLanguage/TextField:setSample|TextField:setSample]] ''<translate>Set string that will be used as sample for determining text's line height</translate>''<br/><!-- GIDEROSMTD:TextField:setSample(sample) Set string that will be used as sample for determining text's line height --> [[Special:MyLanguage/TextField:setText|TextField:setText]] ''<translate>sets the text to be displayed</translate>''<br/><!-- GIDEROSMTD:TextField:setText(text) sets the text to be displayed --> [[Special:MyLanguage/TextField:setTextColor|TextField:setTextColor]] ''<translate>sets the color of the text in a text field in hexadecimal format</translate>''<br/><!-- GIDEROSMTD:TextField:setTextColor(color) sets the color of the text in a text field in hexadecimal format --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} ovtaq8y353x7tyaj9gio6bz9zhv9dvw TextField.new 0 195 14376 9590 2019-12-04T00:37:14Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextField|TextField]]<br/> === <translate>Description</translate> === <translate><br /> Creates a new [[Special:MyLanguage/TextField|TextField]] object with the specified font and text. Gideros runtime includes a<br /> default font. If you specify ''nil'' for the font parameter while creating the [[Special:MyLanguage/TextField|TextField]] object, default font is used.<br /> <br /></translate> <source lang="lua"> TextField.new(font,text,sample,layout) </source> === <translate>Parameters</translate> === '''font''': (FontBase) <translate>The font used for displaying this [[Special:MyLanguage/TextField|TextField]] object. If nil, default font is used.</translate> <br/> '''text''': (string, optional) <translate>The text to be displayed.</translate> <br/> '''sample''': (string) <translate>sample to determine line height</translate> '''optional'''<br/> '''layout''': (table) <translate>Layout parameters, see [[Special:MyLanguage/TextField:setLayout|TextField:setLayout]]</translate> '''optional'''<br/> {{TextField}} afl1vwf27jpyi01midgu7ggiszobmhy TextField:getLayout 0 144 14377 9535 2019-12-04T00:37:26Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.10<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextField|TextField]]<br/> === <translate>Description</translate> === <translate>Retrieve the layout parameters of this TextField</translate> <source lang="lua"> (table) = TextField:getLayout() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>Layout parameters</translate><br/> {{TextField}} 15nv03w0v112icw7je3izr4v0y7i4g9 TextField:getLetterSpacing 0 1135 14378 10595 2019-12-04T00:37:40Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextField|TextField]]<br/> === <translate>Description</translate> === <translate><br /> Returns the letter-spacing property which is used to increase or decrease the space between characters in a text.<br /> <br /></translate> <source lang="lua"> (number) = TextField:getLetterSpacing() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The letter-spacing property of the text field.</translate><br/> {{TextField}} hdug8ijfwdlorubd17lzhu80d80h9p0 TextField:getLineHeight 0 1099 14379 10545 2019-12-04T00:37:58Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.08<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextField|TextField]]<br/> === <translate>Description</translate> === <translate>Get line height</translate> <source lang="lua"> (number) = TextField:getLineHeight() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>line height in pixels</translate><br/> {{TextField}} 3ents4zv8h7vcfk3h0k00d2wobblc51 TextField:getPointFromTextPosition 0 2628 14989 14380 2019-12-10T14:17:43Z MoKaLux 19 added example + 1 typo wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2019.5<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextField|TextField]]<br/> === <translate>Description</translate> === <translate>Returns the coordinates from a given offset within the text.</translate> <source lang="lua"> (number),(number) = TextField:getPointFromTextPosition(offset) </source> === <translate>Parameters</translate> === '''offset''': (string) <translate>The byte offset into the text string.</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The X coordinate.</translate><br/> '''<translate>Returns</translate>''' (number) <translate>The Y coordinate.</translate><br/> === <translate>Example</translate> === '''Draws a red underline under the 'is' word:''' <source lang="lua"> local font = TTFont.new("fonts/Tahoma.ttf", 32, "", true, 1) local text = TextField.new(font, "This is a text") text:setPosition(100, 100) local isS, isE = string.find(text:getText(), " is ") --Get 'is' word position local isSX, isSY = text:getPointFromTextPosition(isS) --Get 'i' starting point local isEX, isEY = text:getPointFromTextPosition(isE - 1) -- Get 's' end point -- Draw a red underline under the 'is' word local underline = Pixel.new(0xFF0000, 1, isEX - isSX, 3) underline:setPosition(100 + isSX, 100 + 2) stage:addChild(text) stage:addChild(underline) </source> {{TextField}} 13vzshh6tti3beqzexqc208nqmewg0u TextField:getSample 0 592 14381 10111 2019-12-04T00:38:22Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.08<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextField|TextField]]<br/> === <translate>Description</translate> === <translate>get string that was used as sample for determining line height</translate> <source lang="lua"> (string) = TextField:getSample() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>string used as sample</translate><br/> {{TextField}} 6n97vxjlc6b3n9kovnmc6cfqrh71ev5 TextField:getText 0 531 14382 10013 2019-12-04T00:38:35Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextField|TextField]]<br/> === <translate>Description</translate> === <translate><br /> Returns the text displayed.<br /> <br /></translate> <source lang="lua"> (string) = TextField:getText() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>The text displayed.</translate><br/> {{TextField}} temvykmezjzcwshgewb60uhdjoao4zy TextField:getTextColor 0 189 14383 9586 2019-12-04T00:38:49Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextField|TextField]]<br/> === <translate>Description</translate> === <translate><br /></translate> <source lang="lua"> (number) = TextField:getTextColor() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The color of the text in a text field, in hexadecimal format.</translate><br/> {{TextField}} okljwrumc6isrfvxg9k1tss9597nid4 TextField:getTextPositionFromPoint 0 2629 14384 13162 2019-12-04T00:39:03Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2019.5<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextField|TextField]]<br/> === <translate>Description</translate> === <translate>returns the offset into a text from x,y coordinates<br /></translate> <source lang="lua"> (number),(number),(number) = TextField:getTextPositionFromPoint(x,y) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>The queried X coordinate.</translate> <br/> '''y''': (number) <translate>The queried Y coordinate.</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The resolved byte offset within the text string.</translate><br/> '''<translate>Returns</translate>''' (number) <translate>The corrected X coordinate.</translate><br/> '''<translate>Returns</translate>''' (number) <translate>The corrected Y coordinate.</translate><br/> {{TextField}} szzfb2x8c2jqws5vdc9oybrwqfrbj8h TextField:setFont 0 851 14385 10709 2019-12-04T00:39:20Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.08<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextField|TextField]]<br/> === <translate>Description</translate> === <translate>set font to use</translate> <source lang="lua"> TextField:setFont(font) </source> === <translate>Parameters</translate> === '''font''': (FontBase) <translate>font to use</translate> <br/> {{TextField}} jf6cyvtp827djhtuwfse286s6z9glkh TextField:setLayout 0 564 14777 14387 2019-12-07T03:34:38Z MoKaLux 19 formatting + 1 typo wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.10<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextField|TextField]]<br/> === <translate>Description</translate> === Change the layout parameters for this TextField Layout parameters can contain the following fields: * w,h: Width/height of the area to layout the text in * flags: A or combination of [[Special:MyLanguage/FontBase|FontBase]].TLF_xxx constants instructing how to layout the text * letterSpacing: The space to add between each letter of the text * lineSpacing: The space to add between each line of the text * tabSpace: The size of a tab in space characters increment, default to 4 if unspecified * breakChar: A string that will be inserted to indicated broken words <source lang="lua"> TextField:setLayout(layout) </source> === <translate>Parameters</translate> === '''layout''': (table) <translate>Layout parameters</translate> <br/> === <translate>Example</translate> === <source lang="lua"> -- a string variable local mystring = "Some very long text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor." -- the text field with default system font local textfield = TextField.new(nil, mystring) -- we set the string that will be used as sample for determining text line height textfield:setSample(mystring) -- then we set the layout: width, height, line spacing and justify center textfield:setLayout( {w=200, h=100, lineSpacing=7, flags=FontBase.TLF_CENTER} ) -- finally, we set the text position and add it to stage textfield:setPosition(50, 50) stage:addChild(textfield) </source> {{TextField}} pvxaht9xjnbwp54x4vnn7jxs8dyog2m TextField:setLetterSpacing 0 269 14388 9682 2019-12-04T00:42:10Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextField|TextField]]<br/> === <translate>Description</translate> === <translate><br /> Sets the letter-spacing property which is used to increase or decrease the space between characters in a text.<br /> <br /></translate> <source lang="lua"> TextField:setLetterSpacing(spacing) </source> === <translate>Parameters</translate> === '''spacing''': (number) <translate></translate> <br/> {{TextField}} iqjw9ctrm1i96e0hrg7p14hut1e4i9y TextField:setSample 0 232 14389 9635 2019-12-04T00:42:31Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.08<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextField|TextField]]<br/> === <translate>Description</translate> === <translate>Set string that will be used as sample for determining text's line height</translate> <source lang="lua"> TextField:setSample(sample) </source> === <translate>Parameters</translate> === '''sample''': (string) <translate>string to use as sample</translate> <br/> {{TextField}} bgsz7kngi8xnjdljyqpa9f6eo1pa5hv TextField:setText 0 836 14390 10335 2019-12-04T00:42:45Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextField|TextField]]<br/> === <translate>Description</translate> === <translate><br /> Sets the text to be displayed.<br /> <br /></translate> <source lang="lua"> TextField:setText(text) </source> === <translate>Parameters</translate> === '''text''': (string) <translate>The text to be displayed.</translate> <br/> {{TextField}} 1r2qi8tv2g2b13x1832pf1av3oo0mfk TextField:setTextColor 0 639 14392 14391 2019-12-04T00:43:58Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextField|TextField]]<br/> === <translate>Description</translate> === <translate>Sets the color of the text in a text field in hexadecimal format.</translate> <source lang="lua"> TextField:setTextColor(color) </source> === <translate>Parameters</translate> === '''color''': (number) <translate>color of the text in hexadecimal format.</translate> <br/> === <translate>Examples</translate> === <source lang="lua">textfield:setTextColor(0xff0000) -- red textfield:setTextColor(0x00ff00) -- green textfield:setTextColor(0x0000ff) -- blue</source> {{TextField}} j7m9o2epkjh4rk3fz00bzd0gzlqtdn0 TextInputDialog 0 80 14972 14395 2019-12-09T23:16:04Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:TextInputDialog --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/AlertDialog|AlertDialog]]<br/> === <translate>Description</translate> === The [[Special:MyLanguage/TextInputDialog|TextInputDialog]] class is used to display native text input dialogs with one text edit field, one button (as cancel button) and two optional buttons. When the user presses any buttons in the alert dialog, it is dismissed and [[Special:MyLanguage/Event.COMPLETE|Event.COMPLETE]] event is dispatched. If text input dialog is dismissed by any other means (by pressing back button on Android or by pressing close button on desktop), it behaves as cancel button is pressed. === <translate>Examples</translate> === <source lang="lua"> local textInputDialog = TextInputDialog.new("my title", "my message", "some text", "Cancel", "OK") local function onComplete(event) print(event.text, event.buttonIndex, event.buttonText) end textInputDialog:addEventListener(Event.COMPLETE, onComplete) textInputDialog:show() </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/TextInputDialog.new|TextInputDialog.new]] <br/><!-- GIDEROSMTD:TextInputDialog.new(title,message,text,cancelButton,button1,button2) --> [[Special:MyLanguage/TextInputDialog:getInputType|TextInputDialog:getInputType]] <br/><!-- GIDEROSMTD:TextInputDialog:getInputType() --> [[Special:MyLanguage/TextInputDialog:getText|TextInputDialog:getText]] <br/><!-- GIDEROSMTD:TextInputDialog:getText() --> [[Special:MyLanguage/TextInputDialog:isSecureInput|TextInputDialog:isSecureInput]] <br/><!-- GIDEROSMTD:TextInputDialog:isSecureInput() --> [[Special:MyLanguage/TextInputDialog:setInputType|TextInputDialog:setInputType]] <br/><!-- GIDEROSMTD:TextInputDialog:setInputType(type) --> [[Special:MyLanguage/TextInputDialog:setSecureInput|TextInputDialog:setSecureInput]] <br/><!-- GIDEROSMTD:TextInputDialog:setSecureInput(secureInput) --> [[Special:MyLanguage/TextInputDialog:setText|TextInputDialog:setText]] <br/><!-- GIDEROSMTD:TextInputDialog:setText(text) --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === [[Special:MyLanguage/Event.COMPLETE|Event.COMPLETE]]<br/><!-- GIDEROSEVT:Event.COMPLETE complete--> === <translate>Constants</translate> === [[Special:MyLanguage/TextInputDialog.EMAIL|TextInputDialog.EMAIL]]<br/><!-- GIDEROSCST:TextInputDialog.EMAIL email--> [[Special:MyLanguage/TextInputDialog.NUMBER|TextInputDialog.NUMBER]]<br/><!-- GIDEROSCST:TextInputDialog.NUMBER number--> [[Special:MyLanguage/TextInputDialog.PHONE|TextInputDialog.PHONE]]<br/><!-- GIDEROSCST:TextInputDialog.PHONE phone--> [[Special:MyLanguage/TextInputDialog.TEXT|TextInputDialog.TEXT]]<br/><!-- GIDEROSCST:TextInputDialog.TEXT text--> [[Special:MyLanguage/TextInputDialog.URL|TextInputDialog.URL]]<br/><!-- GIDEROSCST:TextInputDialog.URL url--> |} m16x2bzg4lf4gv796suwogr4av803it TextInputDialog.EMAIL 0 1334 14404 10507 2019-12-04T00:56:50Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' email<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/TextInputDialog|TextInputDialog]]<br/> === <translate>Description</translate> === <translate></translate> {{TextInputDialog}} nexyhhox5v84cujd2bqmpy1039at8ph TextInputDialog.NUMBER 0 1272 14405 10323 2019-12-04T00:57:02Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' number<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/TextInputDialog|TextInputDialog]]<br/> === <translate>Description</translate> === <translate></translate> {{TextInputDialog}} 2jsv8huht34xzqaddbubg13s4wh6fod TextInputDialog.PHONE 0 1215 14406 9737 2019-12-04T00:57:14Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' phone<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/TextInputDialog|TextInputDialog]]<br/> === <translate>Description</translate> === <translate></translate> {{TextInputDialog}} jhak47y1svls0ywa3s0u13jfybj90da TextInputDialog.TEXT 0 1192 14407 9565 2019-12-04T00:57:25Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' text<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/TextInputDialog|TextInputDialog]]<br/> === <translate>Description</translate> === <translate></translate> {{TextInputDialog}} ee82m1mpxn0n1up87ty865ez2j9kzqf TextInputDialog.URL 0 1365 14408 10057 2019-12-04T00:57:37Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' url<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/TextInputDialog|TextInputDialog]]<br/> === <translate>Description</translate> === <translate></translate> {{TextInputDialog}} rmebxwfpicwlbyxs4zzb0qm2chhtgwr TextInputDialog.new 0 530 14411 14410 2019-12-04T00:59:50Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextInputDialog|TextInputDialog]]<br/> === <translate>Description</translate> === <translate>Creates a new [[Special:MyLanguage/TextInputDialog|TextInputDialog]] object.</translate> <source lang="lua"> TextInputDialog.new(title,message,text,cancelButton,button1,button2) </source> === <translate>Parameters</translate> === '''title''': (string) <translate></translate> <br/> '''message''': (string) <translate>Descriptive text that provides more details than the title.</translate> <br/> '''text''': (string) <translate>The text on the text field.</translate> <br/> '''cancelButton''': (string) <translate>The text of the cancel button.</translate> <br/> '''button1''': (string, optional) <translate>The text of the 1st optional button.</translate> <br/> '''button2''': (string, optional) <translate>The text of the 2st optional button.</translate> <br/> {{TextInputDialog}} codgyhnt8iljw4phgtvjvpmzy2edhso TextInputDialog:getInputType 0 604 14398 10119 2019-12-04T00:50:36Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextInputDialog|TextInputDialog]]<br/> === <translate>Description</translate> === <translate><br /> Returns the keyboard type associated with the text field.<br /> <br /></translate> <source lang="lua"> (string) = TextInputDialog:getInputType() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>The keyboard type associated with the text field (TextInputDialog.EMAIL, TextInputDialog.NUMBER, TextInputDialog.PHONE, TextInputDialog.TEXT, TextInputDialog.URL)</translate><br/> {{TextInputDialog}} 98hq49vjxt1i639mwwvxw57915hvctt TextInputDialog:getText 0 423 14399 9873 2019-12-04T00:50:54Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextInputDialog|TextInputDialog]]<br/> === <translate>Description</translate> === <translate><br /> Returns the text on the text field.<br /> <br /></translate> <source lang="lua"> (string) = TextInputDialog:getText() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>The text on the text field.</translate><br/> {{TextInputDialog}} 9wuchi0vhm66p2cug5atcqwzi5eoham TextInputDialog:isSecureInput 0 251 14400 9658 2019-12-04T00:51:07Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextInputDialog|TextInputDialog]]<br/> === <translate>Description</translate> === <translate><br /> Returns whether the text object hides the text being entered.<br /> <br /></translate> <source lang="lua"> (bool) = TextInputDialog:isSecureInput() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>Whether the text object hides the text being entered.</translate><br/> {{TextInputDialog}} mz5242c09ujmb944n81634e7ba9b7m7 TextInputDialog:setInputType 0 973 14401 10787 2019-12-04T00:55:40Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextInputDialog|TextInputDialog]]<br/> === <translate>Description</translate> === <translate> Sets the input (keyboard) type associated with the text field. The options are: <ul> <li>[[Special:MyLanguage/TextInputDialog.TEXT|TextInputDialog.TEXT]]: Default keyboard type</li> <li>[[Special:MyLanguage/TextInputDialog.NUMBER|TextInputDialog.NUMBER]]: Numeric keypad</li> <li>[[Special:MyLanguage/TextInputDialog.PHONE|TextInputDialog.PHONE]]: Keypad designed for entering telephone numbers</li> <li>[[Special:MyLanguage/TextInputDialog.EMAIL|TextInputDialog.EMAIL]]: Keyboard optimized for specifying email addresses</li> <li>[[Special:MyLanguage/TextInputDialog.URL|TextInputDialog.URL]]: Keyboard optimized for URL entry</li> </ul> </translate> <source lang="lua"> TextInputDialog:setInputType(type) </source> === <translate>Parameters</translate> === '''type''': (string) <translate>Tnput type associated with the text field.</translate> <br/> {{TextInputDialog}} hzsacr4q589w0goa5ezhytxqbh0gcmm TextInputDialog:setSecureInput 0 1134 14402 10586 2019-12-04T00:56:17Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextInputDialog|TextInputDialog]]<br/> === <translate>Description</translate> === <translate><br /> Sets whether the text object should hide the text being entered.<br /> <br /></translate> <source lang="lua"> TextInputDialog:setSecureInput(secureInput) </source> === <translate>Parameters</translate> === '''secureInput''': (boolean) <translate>If &#039;true&#039;, the text object hides the text being entered.</translate> <br/> {{TextInputDialog}} m1tudkfx87zj376ruykf2ghf8s5eghu TextInputDialog:setText 0 875 14403 10358 2019-12-04T00:56:38Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextInputDialog|TextInputDialog]]<br/> === <translate>Description</translate> === <translate><br /> Sets the text on the text field.<br /> <br /></translate> <source lang="lua"> TextInputDialog:setText(text) </source> === <translate>Parameters</translate> === '''text''': (string) <translate>The text on the text field.</translate> <br/> {{TextInputDialog}} 4krpos8mlfrkst20gw4nye03w3aukpc Texture 0 57 14988 14985 2019-12-10T13:45:45Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Texture --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/TextureBase|TextureBase]]<br/> === <translate>Description</translate> === The [[Special:MyLanguage/Texture|Texture]] class lets you work with textures in an application. The [[Special:MyLanguage/Texture|Texture]] class lets you create a new [[Special:MyLanguage/Texture|Texture]] object to load from an image file and display in scene tree. === <translate>Example</translate> === <source lang="lua"> -- TEXTURE REPEAT wall = Shape.new() local texture = Texture.new("gfx/enemy01.png", true, {wrap = Texture.REPEAT}) -- put your image.png wall:setFillStyle(Shape.TEXTURE, texture) wall:beginPath() wall:moveTo(0,0) wall:lineTo(150, 0) wall:lineTo(150, 150) wall:lineTo(0, 150) wall:closePath() wall:endPath() wall:setAnchorPoint(0.5, 0.5) wall:setPosition(128, 128) stage:addChild(wall) </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Texture.new|Texture.new]] ''<translate>creates a new Texture object</translate>''<br/><!-- GIDEROSMTD:Texture.new(filename,filtering,options) creates a new Texture object --> [[Special:MyLanguage/Texture.new|Texture.new]]<br/><!-- GIDEROSMTD:Texture.new(pixels,width,height,filtering,options) --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === [[Special:MyLanguage/Texture.CLAMP|Texture.CLAMP]]<br/><!-- GIDEROSCST:Texture.CLAMP--> [[Special:MyLanguage/Texture.REPEAT|Texture.REPEAT]]<br/><!-- GIDEROSCST:Texture.REPEAT--> |} nqv1he180bwujcxumbz9clugxtmv3jk Texture.CLAMP 0 2854 14987 2019-12-10T13:43:27Z MoKaLux 19 Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' clamp<br/> '''<translate>Defined by</translate>:'..." wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' clamp<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/TextureBase|TextureBase]]<br/> === <translate>Description</translate> === <translate></translate> {{Texture}} cnszb07l0mb4ui0vhydu00nme1rh6g8 Texture.REPEAT 0 2853 14986 2019-12-10T13:41:42Z MoKaLux 19 Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' repeat<br/> '''<translate>Defined by</translate>:..." wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' repeat<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/TextureBase|TextureBase]]<br/> === <translate>Description</translate> === <translate></translate> {{Texture}} ibmyx1y91j90y7eybiruyd28rly7hqd Texture.new 0 326 14861 14414 2019-12-08T19:44:54Z MoKaLux 19 formatting wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Texture|Texture]]<br/> === <translate>Description</translate> === Creates a new Texture object. <source lang="lua"> Texture.new(filename,filtering,options) </source> === <translate>Parameters</translate> === '''filename''': (string) <translate>The name of the texture file to be loaded.</translate><br/> '''filtering''': (boolean, default = false) <translate>Whether or not the texture is filtered.</translate><br/> '''options''': (table, optional) <translate>A table that specifies optional paramaters. The following options are supported:</translate><br/> * '''transparentColor''':<translate>Specify which color stands for transparent, for formats that don't supply an alpha channel such as JPEG</translate> * '''wrap''':<translate>How to treat texels outside the texture. Possible values are Texture.CLAMP and Texture.REPEAT.</translate> * '''format''':<translate>The GPU pixel format for the texture</translate> * '''extend''':<translate>Wether the texture should be extended to a power of two size. Defaults to true.</translate> * '''scale''':<translate>The scale at which this texture was made, if it cannot be determined by a suffix. Defaults to 1.</translate> === <translate>Example</translate> === <source lang="lua"> -- do not filter and make the color 0xff00ff transparent local texture = Texture.new("image.png", false, {transparentColor = 0xff00ff}) -- enable filtering and repeat the texture local texture = Texture.new("image.png", true, {wrap = Texture.REPEAT}) </source> __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.08<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Texture|Texture]]<br/> === <translate>Description</translate> === Create a texture from pixel data. <source lang="lua"> Texture.new(pixels, width, height, filtering, options) </source> === <translate>Parameters</translate> === '''pixels''': (string) <translate>A string containing actual R,G,B,A compoents of each pixel in the new texture. Each component is stored as a byte. You can pass nil if you don't need to initialize texture content</translate><br/> '''width''': (number) <translate>width of the texture to create</translate><br/> '''height''': (number) <translate>Height of the texture to create</translate><br/> '''filtering''': (boolean, default to false) <translate>indicate that the texture should be filtered</translate> '''optional'''<br/> '''options''': (table, optional) <translate>A table that specifies optional paramaters. The following options are supported:</translate><br/> * '''transparentColor''':<translate>Specify which color stands for transparent, for formats that don't supply an alpha channel such as JPEG</translate> * '''wrap''':<translate>How to treat texels outside the texture. Possible values are Texture.CLAMP and Texture.REPEAT.</translate> * '''format''':<translate>The GPU pixel format for the texture</translate> * '''extend''':<translate>Wether the texture should be extended to a power of two size. Defaults to true.</translate> * '''scale''':<translate>The scale at which this texture was made, if it cannot be determined by a suffix. Defaults to 1.</translate> === <translate>Example</translate> === <source lang="lua"> -- Create a 300x400 empty texture. Prevent gideros from extending the texture to the next power of two size local texture = Texture.new(nil,300,400, false, {extend=false}) </source> {{Texture}} g2b75ycucbagd9fq6ezedf60wb04lue TextureBase 0 129 14974 14416 2019-12-09T23:22:12Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:TextureBase --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> === <translate>Description</translate> === [[Special:MyLanguage/TextureBase|TextureBase]] is the base class for [[Special:MyLanguage/Texture|Texture]] and [[Special:MyLanguage/TexturePack|TexturePack]] classes. It provides a common functionaly to texture related classes. *TextureBase.CLAMP = "clamp" *TextureBase.REPEAT = "repeat" {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/TextureBase:getHeight|TextureBase:getHeight]] ''<translate>returns the height of the texture in pixels</translate>''<br/><!-- GIDEROSMTD:TextureBase:getHeight() returns the height of the texture in pixels --> [[Special:MyLanguage/TextureBase:getWidth|TextureBase:getWidth]] ''<translate>returns the width of the texture in pixels</translate>''<br/><!-- GIDEROSMTD:TextureBase:getWidth() returns the width of the texture in pixels --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === [[Special:MyLanguage/TextureBase.CLAMP|TextureBase.CLAMP]]<br/><!-- GIDEROSCST:TextureBase.CLAMP clamp--> [[Special:MyLanguage/TextureBase.REPEAT|TextureBase.REPEAT]]<br/><!-- GIDEROSCST:TextureBase.REPEAT repeat--> [[Special:MyLanguage/TextureBase.RGB565|TextureBase.RGB565]]<br/><!-- GIDEROSCST:TextureBase.RGB565 rgb565--> [[Special:MyLanguage/TextureBase.RGB888|TextureBase.RGB888]]<br/><!-- GIDEROSCST:TextureBase.RGB888 rgb888--> [[Special:MyLanguage/TextureBase.RGBA4444|TextureBase.RGBA4444]]<br/><!-- GIDEROSCST:TextureBase.RGBA4444 rgba4444--> [[Special:MyLanguage/TextureBase.RGBA5551|TextureBase.RGBA5551]]<br/><!-- GIDEROSCST:TextureBase.RGBA5551 rgba5551--> [[Special:MyLanguage/TextureBase.RGBA8888|TextureBase.RGBA8888]]<br/><!-- GIDEROSCST:TextureBase.RGBA8888 rgba8888--> |} a9t5mllnv4whsok2wc8m8lieti4t8b4 TextureBase.CLAMP 0 1218 14419 9743 2019-12-04T01:08:05Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' clamp<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/TextureBase|TextureBase]]<br/> === <translate>Description</translate> === <translate></translate> {{TextureBase}} 1x0ochbfoycf22ex826xz7004l6ucur TextureBase.REPEAT 0 1190 14420 9546 2019-12-04T01:08:19Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' repeat<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/TextureBase|TextureBase]]<br/> === <translate>Description</translate> === <translate></translate> {{TextureBase}} rrrmlpflau2xvdkus48x6fjhribfiup TextureBase.RGB565 0 1259 14421 10620 2019-12-04T01:08:31Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' rgb565<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/TextureBase|TextureBase]]<br/> === <translate>Description</translate> === <translate>Texture format that can be provided to Texture and TexturePack options table</translate> {{TextureBase}} 2dlz5iaylhscx4xxpzks0blvid814if TextureBase.RGB888 0 1183 14422 9510 2019-12-04T01:08:56Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' rgb888<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/TextureBase|TextureBase]]<br/> === <translate>Description</translate> === <translate>Texture format that can be provided to Texture and TexturePack options table</translate> {{TextureBase}} 5bk701i2s8vkq8ttaoenyuzek6u6moy TextureBase.RGBA4444 0 1219 14423 9742 2019-12-04T01:09:08Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' rgba4444<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/TextureBase|TextureBase]]<br/> === <translate>Description</translate> === <translate>Texture format that can be provided to Texture and TexturePack options table</translate> {{TextureBase}} o23ksosemwrh2cuzbhohpgd5tw36m9g TextureBase.RGBA5551 0 1212 14424 9705 2019-12-04T01:09:24Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' rgba5551<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/TextureBase|TextureBase]]<br/> === <translate>Description</translate> === <translate>Texture format that can be provided to Texture and TexturePack options table</translate> {{TextureBase}} fxuvhp269ruc0dcllcgt1eslw3vd2ce TextureBase.RGBA8888 0 1358 14425 9919 2019-12-04T01:09:35Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Value</translate>:''' rgba8888<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/TextureBase|TextureBase]]<br/> === <translate>Description</translate> === <translate>Texture format that can be provided to Texture and TexturePack options table</translate> {{TextureBase}} phjigplxvoo94c1rglg6c5pt5fnbjpg TextureBase:getHeight 0 834 14417 10333 2019-12-04T01:07:37Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextureBase|TextureBase]]<br/> === <translate>Description</translate> === <translate><br /> Returns the height of the texture in pixels.<br /> <br /></translate> <source lang="lua"> (number) = TextureBase:getHeight() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The height of the texture in pixels.</translate><br/> {{TextureBase}} kzzgvxbaphs3f3xpeb6hxaaxd1hnx98 TextureBase:getWidth 0 962 14418 10782 2019-12-04T01:07:52Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextureBase|TextureBase]]<br/> === <translate>Description</translate> === <translate><br /> Returns the width of the texture in pixels.<br /> <br /></translate> <source lang="lua"> (number) = TextureBase:getWidth() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The width of the texture in pixels.</translate><br/> {{TextureBase}} 78xbb9t56t20vgskhau0qtouzznklij TexturePack 0 34 14975 14428 2019-12-09T23:27:37Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/TextureBase|TextureBase]]<br/> === <translate>Description</translate> === The [[Special:MyLanguage/TexturePack|TexturePack]] class specifies a texture pack (or texture atlas). A texture atlas is a large image which contains many smaller sub-images. Gideros supports dynamic creation of texture atlases and pre-packed texture atlasses by using "Gideros Texture Packer" tool. ==== Dynamic Creation of Texture Packs ==== To create a texture pack dynamically (at run-time), create [[Special:MyLanguage/TexturePack|TexturePack]] object with a table of file names of textures. <source lang="lua"> local pack = TexturePack.new({"1.png", "2.png", "3.png", "4.png")} </source> ==== Static Creation of Texture Packs ==== To create a pre-packed texture atlas, use "Gideros Texture Packer" tool: [[File:Texture packer.png]] This tool exports two files: A ''.txt'' file that specifies the positions of texture regions and a ''.png'' file of packed texture. Use these two files to create texture pack: <source lang="lua"> local pack = TexturePack.new("pack.txt", "pack.png") </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/TexturePack.new|TexturePack.new]] ''<translate>creates a new TexturePack object</translate>''<br/><!-- GIDEROSMTD:TexturePack.new(textures,padding,filtering,options) creates a new TexturePack object --> [[Special:MyLanguage/TexturePack.new|TexturePack.new]] <br/><!-- GIDEROSMTD:TexturePack.new(txtfile,imagefile,filtering,options) --> [[Special:MyLanguage/TexturePack:getTextureRegion|TexturePack:getTextureRegion]] ''<translate>returns the texture region of texture pack</translate>''<br/><!-- GIDEROSMTD:TexturePack:getTextureRegion(texturename) returns the texture region of texture pack --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} nc57d50y53oy17gxrdrg7vzzmqju9fd TexturePack.new 0 288 14429 13117 2019-12-04T01:16:10Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TexturePack|TexturePack]]<br/> === <translate>Description</translate> === <translate><br /> Creates a new [[Special:MyLanguage/TexturePack|TexturePack]] object. This function creates the texture pack at runtime.<br /> <br /></translate> <source lang="lua"> TexturePack.new(textures,padding,filtering,options) </source> === <translate>Parameters</translate> === '''textures''': (table) <translate>file names of textures.</translate> <br/> '''padding''': (number) <translate>the spacing between textures in pixels</translate> <br/> '''filtering''': (boolean, default = false) <translate>Whether or not the texture is filtered.</translate> <br/> '''options''': (table, optional) <translate>A table that specifies optional paramaters. Currently, &quot;transparentColor&quot; and &quot;format&quot; fields are supported.</translate> <br/> __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TexturePack|TexturePack]]<br/> === <translate>Description</translate> === <translate><br /> Creates a new [[Special:MyLanguage/TexturePack|TexturePack]] object. This function loads the pre-packed texture atlas created by &quot;Gideros Texture Packer&quot; tool.<br /> <br /></translate> <source lang="lua"> TexturePack.new(txtfile,imagefile,filtering,options) </source> === <translate>Parameters</translate> === '''txtfile''': (string) <translate></translate> <br/> '''imagefile''': (string) <translate></translate> <br/> '''filtering''': (boolean, default = false) <translate>Whether or not the texture is filtered.</translate> <br/> '''options''': (table, optional) <translate>A table that specifies optional paramaters. Currently, &quot;transparentColor&quot; and &quot;format&quot fields are supported.</translate> <br/> {{TexturePack}} otzxb1mur1xe5uw47hniv2y4lj0yad2 TexturePack:getTextureRegion 0 979 14430 13280 2019-12-04T01:16:33Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TexturePack|TexturePack]]<br/> === <translate>Description</translate> === <translate><br /> Returns the texture region of texture pack.<br /> <br /></translate> <source lang="lua"> (TextureRegion) = TexturePack:getTextureRegion(texturename) </source> === <translate>Parameters</translate> === '''texturename''': (string) <translate></translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (TextureRegion) <translate>TextureRegion by specified name</translate><br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">local pack = TexturePack.new({"gfx/1.png", "gfx/2.png", "gfx/3.png", "gfx/4.png"}) local region1 = pack:getTextureRegion("gfx/1.png") local region2 = pack:getTextureRegion("gfx/2.png") local region3 = pack:getTextureRegion("gfx/3.png") local region4 = pack:getTextureRegion("gfx/4.png")</source> {{TexturePack}} nmyax4b65yb8j97lbhth1eia47s20ep TextureRegion 0 61 14976 14432 2019-12-09T23:29:07Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:TextureRegion --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> === <translate>Description</translate> === The [[Special:MyLanguage/TextureRegion|TextureRegion]] class specifies a texture and a rectangular region in it. It is used to define independent texture regions within a texture atlas which is a large image, which contains many smaller sub-images. === <translate>Examples</translate> === <source lang="lua"> local texture = Texture.new("atlas.png") -- define 4 equal regions of size 100x100 from "atlas.png" local region1 = TextureRegion.new(texture, 0, 0, 100, 100) local region2 = TextureRegion.new(texture, 100, 0, 100, 100) local region3 = TextureRegion.new(texture, 100, 100, 100, 100) local region4 = TextureRegion.new(texture, 0, 100, 100, 100) -- add these regions to scene tree local bitmap1 = Bitmap.new(region1) local bitmap2 = Bitmap.new(region2) local bitmap3 = Bitmap.new(region3) local bitmap4 = Bitmap.new(region4) stage:addChild(bitmap1) stage:addChild(bitmap2) stage:addChild(bitmap3) stage:addChild(bitmap4) </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/TextureRegion.new|TextureRegion.new]] ''<translate>creates a new TextureRegion object</translate>''<br/><!-- GIDEROSMTD:TextureRegion.new(texture) creates a new TextureRegion object --> [[Special:MyLanguage/TextureRegion.new|TextureRegion.new]] <br/><!-- GIDEROSMTD:TextureRegion.new(texture,x,y,width,height) --> [[Special:MyLanguage/TextureRegion:getRegion|TextureRegion:getRegion]] ''<translate>returns the coordinates of the region</translate>''<br/><!-- GIDEROSMTD:TextureRegion:getRegion(baseCoordiniates) returns the coordinates of the region --> [[Special:MyLanguage/TextureRegion:getScale|TextureRegion:getScale]] ''<translate>returns the scale ratio of the underlying atlas</translate>''<br/><!-- GIDEROSMTD:TextureRegion:getScale() returns the scale ratio of the underlying atlas --> [[Special:MyLanguage/TextureRegion:setRegion|TextureRegion:setRegion]] ''<translate>sets the coordinates of the region</translate>''<br/><!-- GIDEROSMTD:TextureRegion:setRegion(x,y,width,height) sets the coordinates of the region --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} 0bqh890s2f0fe9msetck5crzgggjl4k TextureRegion.new 0 372 14433 13273 2019-12-04T01:19:13Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextureRegion|TextureRegion]]<br/> === <translate>Description</translate> === <translate><br /> Creates a new TextureRegion object.<br /> <br /></translate> <source lang="lua"> TextureRegion.new(texture) </source> === <translate>Parameters</translate> === '''texture''': (TextureBase) <translate>texture object</translate> <br/> __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextureRegion|TextureRegion]]<br/> === <translate>Description</translate> === <translate><br /> Creates a new TextureRegion object. If TextureRegion object is created with 1 parameter (texture), it specifies the whole texture.<br /> If TextureRegion object is created with 5 parameters (texture, x, y, width, height), if specifies a rectangular region within texture.<br /> </translate> <source lang="lua"> TextureRegion.new(texture,x,y,width,height) </source> === <translate>Parameters</translate> === '''texture''': (TextureBase) <translate>texture object</translate> <br/> '''x''': (number) <translate>left coordinate of the region</translate> <br/> '''y''': (number) <translate>top coordinate of the region</translate> <br/> '''width''': (number) <translate>width of the region</translate> <br/> '''height''': (number) <translate>height of the region</translate> <br/> {{TextureRegion}} ludsq3tphf2s4irvaxqc3ez2pm0ns1x TextureRegion:getRegion 0 448 14434 9905 2019-12-04T01:19:34Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.08.2<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextureRegion|TextureRegion]]<br/> === <translate>Description</translate> === <translate><br /> Returns the coordinates of the region.<br /> If transparent areas were trimmed during texture pack export, also reports the amount trimmed. <br /></translate> <source lang="lua"> (number), (number), (number), (number), (number), (number), (number), (number) = TextureRegion:getRegion(baseCoordiniates) </source> === <translate>Parameters</translate> === '''baseCoordiniates''': (boolean) <translate>Returns values in base (@1) size</translate> '''optional'''<br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x coordinate from texture</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y coordinate from texture</translate><br/> '''<translate>Returns</translate>''' (number) <translate>width of region</translate><br/> '''<translate>Returns</translate>''' (number) <translate>height of region</translate><br/> '''<translate>Returns</translate>''' (number) <translate>left trim</translate><br/> '''<translate>Returns</translate>''' (number) <translate>top trim</translate><br/> '''<translate>Returns</translate>''' (number) <translate>right trim</translate><br/> '''<translate>Returns</translate>''' (number) <translate>bottom trim</translate><br/> {{TextureRegion}} 5fsyhjlkye8ojazvlathm5i2hvtz4h4 TextureRegion:getScale 0 919 14435 10393 2019-12-04T01:19:54Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.6.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextureRegion|TextureRegion]]<br/> === <translate>Description</translate> === <translate><br /> Returns the scale factor of the underlying atlas <br /></translate> <source lang="lua"> (number) = TextureRegion:getScale() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>scale</translate><br/> {{TextureRegion}} bms8utvwsmi24gw5ip6mbmyc705hwl8 TextureRegion:setRegion 0 728 14436 10643 2019-12-04T01:20:06Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.08.2<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TextureRegion|TextureRegion]]<br/> === <translate>Description</translate> === <translate><br /> Sets the coordinates of the region.<br /> <br /></translate> <source lang="lua"> TextureRegion:setRegion(x,y,width,height) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>left coordinate of the region</translate> <br/> '''y''': (number) <translate>top coordinate of the region</translate> <br/> '''width''': (number) <translate>width of the region</translate> <br/> '''height''': (number) <translate>height of the region</translate> <br/> {{TextureRegion}} cppzuzxobsnorue65cgk75ibtd0g00z Textures and Bitmaps 0 1742 11070 2018-09-10T19:25:24Z Anthony 1 Created page with "Texture class is used to load an image file and holds the data stored in the image file. The Bitmap class inherits from Sprite and wraps a Texture object for on-screen display..." wikitext text/x-wiki Texture class is used to load an image file and holds the data stored in the image file. The Bitmap class inherits from Sprite and wraps a Texture object for on-screen display. By separating image display (Bitmap) from data (Texture), it’s possible to create many Bitmap objects simultaneously display the same Texture object each with its own display characteristics. - Load a texture: <source lang="lua"> local texture = Texture.new("image.png") </source> - Load a texture with filtering: <source lang="lua"> local texture = Texture.new("image.png", true) </source> - Create a Bitmap object to display the texture <source lang="lua"> local bitmap = Bitmap.new(texture) </source> - Add the Bitmap object to the stage <source lang="lua"> stage:addChild(bitmap) </source> === Anchor Point === Each Bitmap object has an anchor point that affects the positioning of the texture displayed. By modifying the anchor point, you change the origin of the texture. For example, setting the anchor point to (0.5, 0.5) moves the center of the texture to the origin. If you set the anchor point to (1, 1) instead, the bottom-right corner of the texture will be the origin. The default value of anchor point is (0, 0) which means top-left of the texture is the origin by default. [[File:Anchorpoint.png]] setAnchorPoint(0,0) setAnchorPoint(0.5, 0.5) setAnchorPoint(1,1) In this example, we set the anchor point to (0.5, 0.5): <source lang="lua"> local bitmap = Bitmap.new(Texture.new("image.png")) bitmap:setAnchorPoint(0.5, 0.5) </source> === What is a Texture Atlas? === Texture atlas is a single large image which contains many smaller sub-images. Each sub-image contained in the texture atlas is defined with a rectangular area. There are two main reasons of using a texture atlas instead of many independent textures: 1. Texture atlasses usually consume less memory. To use an image as a texture, it’s width and height always have to be a power of two. Gideros automatically increase the texture size to conform this rule. For example, an image with dimensions of 100x200 becomes a texture with dimensions of 128x256 in memory. That’s where the texture atlas becomes handy. Texture atlases usually have a power-of-two dimensions and therefore doesn’t need to be enlarged. 2. Rendering from a texture atlas is usually faster. Each texture is bound to OpenGL just before rendering it and binding is costly operation. Using texture atlases instead of individual textures helps in reducing bind operations ==== TextureRegion ==== The TextureRegion class specifies a texture and a rectangular region in it. It is used to define independent texture regions within a texture atlas which is a large image, which contains many smaller sub-images. Displaying the texture regions is same with displaying textures: Create a Bitmap object that wraps the TextureRegion object: - Load a texture: <source lang="lua"> local texture = Texture.new("image.png") </source> - Create a texture region as top left point is (30, 40) with dimensions (100, 50): <source lang="lua"> local textureRegion = TextureRegion.new(texture, 30, 40, 100, 50) </source> - Create a Bitmap object to display the texture region: <source lang="lua"> local bitmap = Bitmap.new(textureRegion) </source> ==== TexturePack ==== TexturePack class is used to create and load texture atlases. You can either create your texture atlas dynamically in your game, or use a pre-packed texture atlas. After creation of your texture pack, you can get a region of it as a TextureRegion object by using getTextureRegion function. These features are described below in more detailed. ===== Dynamic Creation of Texture Packs ===== To create a texture pack dynamically (at run-time), create TexturePack object with an array of file names of textures: <source lang="lua"> local texturePack = TexturePack.new({"1.png", "2.png", "3.png", "4.png"}) </source> Gideros loads and packs these images fast and gives you a ready to use texture pack. After creating your texture pack, you can display it easily since it's also a texture in itself: <source lang="lua"> local bitmap = Bitmap.new(texturePack) stage:addChild(bitmap) </source> '''Note:''' Gideros uses an algorithm called MaxRects to pack the textures. This algorithm is considered as one of the best packing algorithms in terms of speed and efficiency. If you are interested, you can find the details of MaxRects algorithm at http://clb.demon.fi/projects/even-more-rectangle-bin-packing ===== Pre-packed Texture Packs ===== Another option to create texture packs is to use an external texture packer tool. Gideros Texture Packer, which comes with the installation package can be used to create texture packs. ===== Getting Texture Regions from Texture Packs ===== To get the texture region from the texture pack, you need to call the name of the image. <source lang="lua"> local texturePack = TexturePack.new({"1.png", "2.png", "3.png", "4.png"}) local textureRegion = texturePack:getTextureRegion(“1.png”) </source> cqpohwqd0zgbeoyf6drxlxuyvtbkdak TileMap 0 77 14977 14438 2019-12-09T23:30:29Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:TileMap --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === The [[Special:MyLanguage/TileMap|TileMap]] class is used to work with tile maps easily and efficiently. Check ''Desert'' and ''Sewers'' examples provided with Gideros for usage of TileMap with export from editor. {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/TileMap.new|TileMap.new]] ''<translate>creates a new TileMap instance</translate>''<br/><!-- GIDEROSMTD:TileMap.new(width,height,texture,tilewidth,tileheight,spacingx,spacingy,marginx,marginy,displaywidth,displayheight) creates a new TileMap instance --> [[Special:MyLanguage/TileMap:clearTile|TileMap:clearTile]] ''<translate>set an empty tile at given indices</translate>''<br/><!-- GIDEROSMTD:TileMap:clearTile(x,y) set an empty tile at given indices --> [[Special:MyLanguage/TileMap:getTile|TileMap:getTile]] ''<translate>returns the index of the tile</translate>''<br/><!-- GIDEROSMTD:TileMap:getTile(x,y) returns the index of the tile --> [[Special:MyLanguage/TileMap:setRepeat|TileMap:setRepeat]] ''<translate>Indicate if the tilemap should repeat itself</translate>''<br/><!-- GIDEROSMTD:TileMap:setRepeat(x,y) Indicate if the tilemap should repeat itself --> [[Special:MyLanguage/TileMap:setTexture|TileMap:setTexture]] ''<translate>Change the tile texture/atlas used by the tilemap</translate>''<br/><!-- GIDEROSMTD:TileMap:setTexture(texture,tilewidth,tileheight,spacingx,spacingy,marginx,marginy) Change the tile texture/atlas used by the tilemap --> [[Special:MyLanguage/TileMap:setTile|TileMap:setTile]] ''<translate>sets the index of the tile</translate>''<br/><!-- GIDEROSMTD:TileMap:setTile(x,y,tx,ty,flip,color,alpha) sets the index of the tile --> [[Special:MyLanguage/TileMap:shift|TileMap:shift]] ''<translate>shifts the tile map</translate>''<br/><!-- GIDEROSMTD:TileMap:shift(dx,dy) shifts the tile map --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === [[Special:MyLanguage/TileMap.FLIP_DIAGONAL|TileMap.FLIP_DIAGONAL]]<br/><!-- GIDEROSCST:TileMap.FLIP_DIAGONAL 1--> [[Special:MyLanguage/TileMap.FLIP_HORIZONTAL|TileMap.FLIP_HORIZONTAL]]<br/><!-- GIDEROSCST:TileMap.FLIP_HORIZONTAL 4--> [[Special:MyLanguage/TileMap.FLIP_VERTICAL|TileMap.FLIP_VERTICAL]]<br/><!-- GIDEROSCST:TileMap.FLIP_VERTICAL 2--> |} te5v5ohra071vkimezvh7kg0i5tav00 TileMap.FLIP DIAGONAL 0 1270 14446 10302 2019-12-04T01:25:39Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 1<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/TileMap|TileMap]]<br/> === <translate>Description</translate> === <translate></translate> {{TileMap}} ovmtjonfpwebn37np5fvzim49sd5r0h TileMap.FLIP HORIZONTAL 0 1208 14447 9680 2019-12-04T01:25:49Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 4<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/TileMap|TileMap]]<br/> === <translate>Description</translate> === <translate></translate> {{TileMap}} 0ego18551v1bp8hgc0w55xbr623dm2e TileMap.FLIP VERTICAL 0 1193 14448 9577 2019-12-04T01:26:00Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 2<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/TileMap|TileMap]]<br/> === <translate>Description</translate> === <translate></translate> {{TileMap}} p258q6ap0d87d678j1yog84anvt2mm2 TileMap.new 0 840 14439 10342 2019-12-04T01:23:54Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TileMap|TileMap]]<br/> === <translate>Description</translate> === <translate><br /> Creates a new [[Special:MyLanguage/TileMap|TileMap]] instance.<br /> <br /></translate> <source lang="lua"> TileMap.new(width,height,texture,tilewidth,tileheight,spacingx,spacingy,marginx,marginy,displaywidth,displayheight) </source> === <translate>Parameters</translate> === '''width''': (number) <translate>The width of the map in tiles</translate> <br/> '''height''': (number) <translate>The height of the map in tiles</translate> <br/> '''texture''': (TextureBase) <translate>The texture used in rendering tile map</translate> <br/> '''tilewidth''': (number) <translate>The width of a tile in pixels</translate> <br/> '''tileheight''': (number) <translate>The height of a tile in pixels</translate> <br/> '''spacingx''': (number, default = 0) <translate>The x-spacing in pixels between the tiles in this tileset</translate> <br/> '''spacingy''': (number, default = 0) <translate>The y-spacing in pixels between the tiles in this tileset</translate> <br/> '''marginx''': (number, default = 0) <translate>The x-margin from the top-left of the texture</translate> <br/> '''marginy''': (number, default = 0) <translate>The y-margin from the top-left of the texture</translate> <br/> '''displaywidth''': (number, default = tilewidth) <translate>The display width of a tile in pixels</translate> <br/> '''displayheight''': (number, default = tileheight) <translate>The display height of a tile in pixels</translate> <br/> {{TileMap}} jra4tbexbypobr83nykspa6tfrzdqzk TileMap:clearTile 0 601 14440 10078 2019-12-04T01:24:10Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TileMap|TileMap]]<br/> === <translate>Description</translate> === <translate><br /> Set an empty tile at given indices. The tile indices are starting from 1.<br /> <br /></translate> <source lang="lua"> TileMap:clearTile(x,y) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>The x-position of tile</translate> <br/> '''y''': (number) <translate>The y-position of tile</translate> <br/> {{TileMap}} hihzc4ms4bepy13kystlk2xazv84x5j TileMap:getTile 0 155 14441 9541 2019-12-04T01:24:27Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TileMap|TileMap]]<br/> === <translate>Description</translate> === <translate><br /> Returns the index of the tile. The tile indices are starting from 1.<br /> <br /></translate> <source lang="lua"> (number), (number), (number), (number), (number) = TileMap:getTile(x,y) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>The x-position of tile</translate> <br/> '''y''': (number) <translate>The y-position of tile</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x tile position of texture or nil if tile is not set</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y tile position of texture or nil if tile is not set</translate><br/> '''<translate>Returns</translate>''' (number) <translate>flip flag (TileMap.FLIP_DIAGONAL, TileMap.FLIP_HORIZONTAL, TileMap.FLIP_VERTICAL) of tile or nil if tile is not set</translate><br/> '''<translate>Returns</translate>''' (number) <translate>Color tint of the tile</translate><br/> '''<translate>Returns</translate>''' (number) <translate>Alpha tint of the tile</translate><br/> {{TileMap}} pi4z818r5ypafa6bgc11gpjz9tkl33e TileMap:setRepeat 0 300 14442 9723 2019-12-04T01:24:41Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.2<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TileMap|TileMap]]<br/> === <translate>Description</translate> === <translate><br /> Indicate if the tilemap should repeat itself.<br /> <br /></translate> <source lang="lua"> TileMap:setRepeat(x,y) </source> === <translate>Parameters</translate> === '''x''': (boolean) <translate>Tilemap is repeating along x axis</translate> <br/> '''y''': (boolean) <translate>Tilemap is repeating along y axis</translate> <br/> {{TileMap}} qvpxotq25ls7dkmq1o3rugrcek51pyy TileMap:setTexture 0 356 14443 9791 2019-12-04T01:24:55Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.2<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TileMap|TileMap]]<br/> === <translate>Description</translate> === <translate><br /> Change the tile texture/atlas used by the tilemap.<br /> <br /></translate> <source lang="lua"> TileMap:setTexture(texture,tilewidth,tileheight,spacingx,spacingy,marginx,marginy) </source> === <translate>Parameters</translate> === '''texture''': (TextureBase) <translate>The texture used in rendering tile map</translate> <br/> '''tilewidth''': (number) <translate>The width of a tile in pixels</translate> <br/> '''tileheight''': (number) <translate>The height of a tile in pixels</translate> <br/> '''spacingx''': (number, default = 0) <translate>The x-spacing in pixels between the tiles in this tileset</translate> <br/> '''spacingy''': (number, default = 0) <translate>The y-spacing in pixels between the tiles in this tileset</translate> <br/> '''marginx''': (number, default = 0) <translate>The x-margin from the top-left of the texture</translate> <br/> '''marginy''': (number, default = 0) <translate>The y-margin from the top-left of the texture</translate> <br/> {{TileMap}} 5kjxwwr7222vo3pkppfdd0jkov7fbtt TileMap:setTile 0 670 14444 10215 2019-12-04T01:25:10Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TileMap|TileMap]]<br/> === <translate>Description</translate> === <translate><br /> Sets the index of the tile. The tile indices are starting from 1.<br /> <br /></translate> <source lang="lua"> TileMap:setTile(x,y,tx,ty,flip,color,alpha) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>The x-position of tile</translate> <br/> '''y''': (number) <translate>The y-position of tile</translate> <br/> '''tx''': (number) <translate>The x-index of the tile</translate> <br/> '''ty''': (number) <translate>The y-index of the tile</translate> <br/> '''flip''': (number, default = 0) <translate>flip flag of tile. Can be combination of TileMap.FLIP_HORIZONTAL, TileMap.FLIP_VERTICAL and TileMap.FLIP_DIAGONAL</translate> <br/> '''color''': (number) <translate>Color tint of the tile, default to white (0xFFFFFF)</translate> '''optional'''<br/> '''alpha''': (number) <translate>Alpha tint of the tile, default to opaque (1.0)</translate> '''optional'''<br/> {{TileMap}} trb2i0i9o8acvqbpeeqta3h19ar8dtj TileMap:shift 0 1013 14445 10812 2019-12-04T01:25:26Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/TileMap|TileMap]]<br/> === <translate>Description</translate> === <translate>Shifts the tile map to change tile's graphic. The arguments are in tiles, not in pixels. By shifting the tile map one by one as needed, you can create dynamic tile maps.<br /> <br /></translate> <source lang="lua"> TileMap:shift(dx,dy) </source> === <translate>Parameters</translate> === '''dx''': (number) <translate>The x amount of shift in tiles</translate> <br/> '''dy''': (number) <translate>The y amount of shift in tiles</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">tilemap:shift(-1, 0) -- shifts the tile map to the left tilemap:shift(1, 0) -- shifts the tile map to the right tilemap:shift(0, -1) -- shifts the tile map to the up tilemap:shift(0, 1) -- shifts the tile map to the down</source> {{TileMap}} hylanyon9fzjmzwgzai3acx1xqdc0db Timer 0 124 14978 14450 2019-12-09T23:31:57Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Timer --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> === <translate>Description</translate> === The [[Special:MyLanguage/Timer|Timer]] class is used to execute a code at specified intervals. The listener functions are registered through [[Special:MyLanguage/Event.TIMER|Event.TIMER]] and [[Special:MyLanguage/Event.TIMER_COMPLETE|Event.TIMER_COMPLETE]] events. === <translate>Example</translate> === <source lang="lua"> -- TIMER -- let's define a pixel and add it to the stage local mypixel = Pixel.new(0xff0000, 1, 64, 64) mypixel:setPosition(64, 64) stage:addChild(mypixel) function onTimer(event) -- add 1 degree each time the function is called mypixel:setRotation(mypixel:getRotation() + 1) end -- create our timer and add an event listener -- 24 = delay in milliseconds -- (optional) 360 = number of repetitions (here the result is 360 degrees) local timer = Timer.new(24, 360) -- local timer = Timer.new(24) -- to run indefinitely timer:addEventListener(Event.TIMER, onTimer, timer) timer:start() </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Timer.delayedCall|Timer.delayedCall]] ''<translate>delayed call a function after a set amount of time</translate>''<br/><!-- GIDEROSMTD:Timer.delayedCall(delay,func,data) delayed call a function after a set amount of time --> [[Special:MyLanguage/Timer.new|Timer.new]] ''<translate>creates a new Timer object</translate>''<br/><!-- GIDEROSMTD:Timer.new(delay,repeatCount) creates a new Timer object --> [[Special:MyLanguage/Timer.pauseAll|Timer.pauseAll]] ''<translate>pause all timers</translate>''<br/><!-- GIDEROSMTD:Timer.pauseAll() pause all timers --> [[Special:MyLanguage/Timer.resumeAll|Timer.resumeAll]] ''<translate>resume all timers</translate>''<br/><!-- GIDEROSMTD:Timer.resumeAll() resume all timers --> [[Special:MyLanguage/Timer.stopAll|Timer.stopAll]] ''<translate>stop all timers</translate>''<br/><!-- GIDEROSMTD:Timer.stopAll() stop all timers --> [[Special:MyLanguage/Timer:getCurrentCount|Timer:getCurrentCount]] ''<translate>returns the current trigger count of the timer</translate>''<br/><!-- GIDEROSMTD:Timer:getCurrentCount() returns the current trigger count of the timer --> [[Special:MyLanguage/Timer:getDelay|Timer:getDelay]] ''<translate>returns the time interval between timer events in milliseconds</translate>''<br/><!-- GIDEROSMTD:Timer:getDelay() returns the time interval between timer events in milliseconds --> [[Special:MyLanguage/Timer:getRepeatCount|Timer:getRepeatCount]] ''<translate>returns the number of repetitions the timer will make</translate>''<br/><!-- GIDEROSMTD:Timer:getRepeatCount() returns the number of repetitions the timer will make --> [[Special:MyLanguage/Timer:isRunning|Timer:isRunning]] ''<translate>returns the current running status of timer</translate>''<br/><!-- GIDEROSMTD:Timer:isRunning() returns the current running status of timer --> [[Special:MyLanguage/Timer:reset|Timer:reset]] ''<translate>stops the timer and sets the currentCount property to 0</translate>''<br/><!-- GIDEROSMTD:Timer:reset() stops the timer and sets the currentCount property to 0 --> [[Special:MyLanguage/Timer:setDelay|Timer:setDelay]] ''<translate>sets the time interval between timer events in milliseconds</translate>''<br/><!-- GIDEROSMTD:Timer:setDelay(delay) sets the time interval between timer events in milliseconds --> [[Special:MyLanguage/Timer:setRepeatCount|Timer:setRepeatCount]] ''<translate>sets the number of repetitions the timer will make</translate>''<br/><!-- GIDEROSMTD:Timer:setRepeatCount(repeatCount) sets the number of repetitions the timer will make --> [[Special:MyLanguage/Timer:start|Timer:start]] ''<translate>starts the timer</translate>''<br/><!-- GIDEROSMTD:Timer:start() starts the timer --> [[Special:MyLanguage/Timer:stop|Timer:stop]] ''<translate>stops the timer</translate>''<br/><!-- GIDEROSMTD:Timer:stop() stops the timer --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === [[Special:MyLanguage/Event.TIMER|Event.TIMER]]<br/><!-- GIDEROSEVT:Event.TIMER timer--> [[Special:MyLanguage/Event.TIMER_COMPLETE|Event.TIMER_COMPLETE]]<br/><!-- GIDEROSEVT:Event.TIMER_COMPLETE timerComplete--> === <translate>Constants</translate> === |} 2jhf6onta7pw943hv8tai7v8vdrovte Timer.delayedCall 0 1089 14451 10532 2019-12-04T01:30:00Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Timer|Timer]]<br/> === <translate>Description</translate> === <translate><br /> Provides a simple way to call a function after a set amount of time. This function returns the<br /> [[Special:MyLanguage/Timer|Timer]] object created inside.<br /> <br /></translate> <source lang="lua"> (Timer) = Timer.delayedCall(delay,func,data) </source> === <translate>Parameters</translate> === '''delay''': (number) <translate>Delay in miliseconds before the function is called</translate> <br/> '''func''': (function) <translate>Function to call</translate> <br/> '''data''': (any) <translate>An optional data parameter that is passed as a first argument to the function</translate> '''optional'''<br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (Timer) <translate>The [[Special:MyLanguage/Timer|Timer]] object</translate><br/> {{Timer}} gf1ing028644ve1l102slx6x9j2iipa Timer.new 0 889 14452 10376 2019-12-04T01:30:16Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Timer|Timer]]<br/> === <translate>Description</translate> === <translate><br /> Creates a new [[Special:MyLanguage/Timer|Timer]] object with the specified delay and repeatCount states.<br /> <br /></translate> <source lang="lua"> Timer.new(delay,repeatCount) </source> === <translate>Parameters</translate> === '''delay''': (any) <translate>The time interval between timer events in milliseconds.</translate> <br/> '''repeatCount''': (default = 0) <translate>The number of repetitions. A value of 0 runs the timer infinitely. If nonzero, the timer runs the specified number of times and then stops.</translate> <br/> {{Timer}} tstqv2jnf54jj2mpnngp7hu5oozk4s8 Timer.pauseAll 0 407 14453 9853 2019-12-04T01:30:28Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Timer|Timer]]<br/> === <translate>Description</translate> === <translate><br /> Pause all timers. Suitable for temporarily pausing all timers when application is paused.<br /> <br /></translate> <source lang="lua"> Timer.pauseAll() </source> {{Timer}} 42hov8ava13985tcjjgfsilnjd9h16m Timer.resumeAll 0 659 14454 10137 2019-12-04T01:30:40Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Timer|Timer]]<br/> === <translate>Description</translate> === <translate><br /> Resume all timers.<br /> <br /></translate> <source lang="lua"> Timer.resumeAll() </source> {{Timer}} 516l32k6y3q77ovi4kjq2h8gwoq38i4 Timer.stopAll 0 857 14455 10710 2019-12-04T01:30:51Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Timer|Timer]]<br/> === <translate>Description</translate> === <translate><br /> Stop all timers.<br /> <br /></translate> <source lang="lua"> Timer.stopAll() </source> {{Timer}} oikc4dmw0r8yp1wo36l4teblst99r5x Timer:getCurrentCount 0 555 14456 10061 2019-12-04T01:31:03Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Timer|Timer]]<br/> === <translate>Description</translate> === <translate><br /> Returns the current trigger count of the timer. It starts with 0 and if it reaches ''repeatCount'' value, timer stops.<br /> <br /></translate> <source lang="lua"> (number) = Timer:getCurrentCount() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The current repeat count.</translate><br/> {{Timer}} jp3xvmh2ixys0iwajgcx1n7s93i7bgl Timer:getDelay 0 295 14457 9717 2019-12-04T01:31:15Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Timer|Timer]]<br/> === <translate>Description</translate> === <translate><br /> Returns the time interval between timer events in milliseconds.<br /> <br /></translate> <source lang="lua"> (number) = Timer:getDelay() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The time interval between timer events in milliseconds.</translate><br/> {{Timer}} g1zuo94yil4a5nyj3ysvxjt5edma0d9 Timer:getRepeatCount 0 218 14458 9619 2019-12-04T01:31:27Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Timer|Timer]]<br/> === <translate>Description</translate> === <translate><br /> Returns the number of repetitions the timer will make. A value of 0 means the timer runs infinitely. If nonzero, the timer runs the specified number of times and then stops.<br /> <br /></translate> <source lang="lua"> (number) = Timer:getRepeatCount() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The number of repetitions.</translate><br/> {{Timer}} 6ftpc30pykz133063clblke1yn3wj3z Timer:isRunning 0 641 14459 10180 2019-12-04T01:31:40Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Timer|Timer]]<br/> === <translate>Description</translate> === <translate><br /> Returns the current running status of timer.<br /> <br /></translate> <source lang="lua"> (bool) = Timer:isRunning() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>''true'' if the timer is running, ''false'' otherwise.</translate><br/> {{Timer}} lojny1vje4kpjjwqsfa488qjb1k1tg8 Timer:reset 0 464 14460 9927 2019-12-04T01:31:52Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Timer|Timer]]<br/> === <translate>Description</translate> === <translate><br /> Stops the timer and sets the ''currentCount'' property to 0.<br /> <br /></translate> <source lang="lua"> Timer:reset() </source> {{Timer}} 59p8n48uwzu7a58g2q0b1zn7mk1ogie Timer:setDelay 0 450 14461 9906 2019-12-04T01:32:03Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Timer|Timer]]<br/> === <translate>Description</translate> === <translate><br /> Sets the time interval between timer events in milliseconds.<br /> <br /></translate> <source lang="lua"> Timer:setDelay(delay) </source> === <translate>Parameters</translate> === '''delay''': (number) <translate>The time interval between timer events in milliseconds.</translate> <br/> {{Timer}} hu5f5im5fgpzlnzjjrrfdih1krhvzk8 Timer:setRepeatCount 0 1014 14462 10810 2019-12-04T01:32:14Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Timer|Timer]]<br/> === <translate>Description</translate> === <translate><br /> Sets the number of repetitions the timer will make. A value of 0 means the timer runs infinitely. If nonzero, the timer runs the specified number of times and then stops.<br /> <br /></translate> <source lang="lua"> Timer:setRepeatCount(repeatCount) </source> === <translate>Parameters</translate> === '''repeatCount''': (number) <translate>the number of repetitions the timer will make</translate> <br/> {{Timer}} sinwq2yphut5e8nw7ufvb06l8i1022w Timer:start 0 898 14463 10375 2019-12-04T01:32:28Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Timer|Timer]]<br/> === <translate>Description</translate> === <translate><br /> Starts the timer.<br /> <br /></translate> <source lang="lua"> Timer:start() </source> {{Timer}} o5gfsi7v83q8hswdrsefx5eq5kbu3r4 Timer:stop 0 759 14464 10275 2019-12-04T01:32:40Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Timer|Timer]]<br/> === <translate>Description</translate> === <translate><br /> Stops the timer. This function doesn&#039;t change the ''currentCount'' property.<br /> <br /></translate> <source lang="lua"> Timer:stop() </source> {{Timer}} pdlzcecppgo601ueu5zvi4fayfkbibg UrlLoader 0 65 14984 14980 2019-12-10T12:08:21Z MoKaLux 19 added GIDEROSOBJ:UrlLoader wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:UrlLoader --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2012.2.2<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> === <translate>Description</translate> === The [[Special:MyLanguage/UrlLoader|UrlLoader]] class is used to download data from an URL. It can be used to download (and optionally save) text files, XML files, JSON files, image files or binary files, etc. Downloaded data is delivered at ''event.data'' field of [[Special:MyLanguage/Event.COMPLETE|Event.COMPLETE]] event as string. Lua is eight-bit clean and so strings may contain characters with any numeric value, including embedded zeros. That means that you can store any binary data into a string. ==== HTTP Request Methods ==== UrlLoader supports GET, POST, PUT and DELETE methods. These are defined by these string constants: <ul> <li>''UrlLoader.GET = "get"''</li> <li>''UrlLoader.POST = "post"''</li> <li>''UrlLoader.PUT = "put"''</li> <li>''UrlLoader.DELETE = "delete"''</li> </ul> === <translate>Examples</translate> === '''The example below shows downloading an image file from an URL, saving it to the documents folder and displaying it on the stage. This example also shows downloading progress and handling errors:''' <source lang="lua"> local loader = UrlLoader.new("http://example.com/image.png") local function onComplete(event) local out = io.open("|D|image.png", "wb") out:write(event.data) out:close() local b = Bitmap.new(Texture.new("|D|image.png")) stage:addChild(b) end local function onError() print("error") end local function onProgress(event) print("progress: " .. event.bytesLoaded .. " of " .. event.bytesTotal) end loader:addEventListener(Event.COMPLETE, onComplete) loader:addEventListener(Event.ERROR, onError) loader:addEventListener(Event.PROGRESS, onProgress) </source> '''Uploading a file:''' <source lang="lua"> local filename = "crate.png" local file = io.open(filename, "rb") local contents = file:read( "*a" ) local boundary = "somerndstring" local send = "--"..boundary.. "\r\nContent-Disposition: form-data; ".. "name="..filename.."; filename="..filename.. "\r\nContent-type: image/png".. "\r\n\r\n"..contents.. "\r\n--"..boundary.."--\r\n"; local headers = { ["Content-Type"] = "multipart/form-data; boundary="..boundary, ["Content-Length"] = #send, } local loader = UrlLoader.new("http://localhost/gideros.php", UrlLoader.POST, headers, send) loader:addEventListener(Event.COMPLETE, function(e) print(e.data) end) </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/UrlLoader.new|UrlLoader.new]] ''<translate>creates a new UrlLoader object</translate>''<br/><!-- GIDEROSMTD:UrlLoader.new(url,method,headers,body) creates a new UrlLoader object --> [[Special:MyLanguage/UrlLoader:close|UrlLoader:close]] ''<translate>terminates the current loading operation</translate>''<br/><!-- GIDEROSMTD:UrlLoader:close() terminates the current loading operation --> [[Special:MyLanguage/UrlLoader:ignoreSslErrors|UrlLoader:ignoreSslErrors]] ''<translate>Ignores SSL certificate related errors</translate>''<br/><!-- GIDEROSMTD:UrlLoader:ignoreSslErrors() Ignores SSL certificate related errors --> [[Special:MyLanguage/UrlLoader:load|UrlLoader:load]] ''<translate>loads data from the specified URL</translate>''<br/><!-- GIDEROSMTD:UrlLoader:load(url,method,headers,body) loads data from the specified URL --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === [[Special:MyLanguage/Event.COMPLETE|Event.COMPLETE]]<br/><!-- GIDEROSEVT:Event.COMPLETE complete--> [[Special:MyLanguage/Event.ERROR|Event.ERROR]]<br/><!-- GIDEROSEVT:Event.ERROR error--> [[Special:MyLanguage/Event.PROGRESS|Event.PROGRESS]]<br/><!-- GIDEROSEVT:Event.PROGRESS progress--> === <translate>Constants</translate> === [[Special:MyLanguage/UrlLoader.DELETE|UrlLoader.DELETE]]<br/><!-- GIDEROSCST:UrlLoader.DELETE delete--> [[Special:MyLanguage/UrlLoader.GET|UrlLoader.GET]]<br/><!-- GIDEROSCST:UrlLoader.GET get--> [[Special:MyLanguage/UrlLoader.POST|UrlLoader.POST]]<br/><!-- GIDEROSCST:UrlLoader.POST post--> [[Special:MyLanguage/UrlLoader.PUT|UrlLoader.PUT]]<br/><!-- GIDEROSCST:UrlLoader.PUT put--> |} 2fdk79c2whwwavj7ecb7jt33isdvwjq UrlLoader.DELETE 0 1333 14474 10500 2019-12-04T01:50:38Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' delete<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/UrlLoader|UrlLoader]]<br/> === <translate>Description</translate> === <translate></translate> {{UrlLoader}} rirxwdeiehwgphtzp8ot31sqckdx28v UrlLoader.GET 0 1227 14475 9814 2019-12-04T01:50:50Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' get<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/UrlLoader|UrlLoader]]<br/> === <translate>Description</translate> === <translate></translate> {{UrlLoader}} icw9kok84dmx8vxnhlqmedqiw4tuh9s UrlLoader.POST 0 1210 14476 9703 2019-12-04T01:51:01Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' post<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/UrlLoader|UrlLoader]]<br/> === <translate>Description</translate> === <translate></translate> {{UrlLoader}} 6mljaxqzt9xeq5y12t61lfa26a0sn0z UrlLoader.PUT 0 1300 14477 10452 2019-12-04T01:51:11Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' put<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/UrlLoader|UrlLoader]]<br/> === <translate>Description</translate> === <translate></translate> {{UrlLoader}} 56e38yflr17tu26wybwocsrd5q8bxrn UrlLoader.new 0 698 14470 13269 2019-12-04T01:49:38Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.2.2<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/UrlLoader|UrlLoader]]<br/> === <translate>Description</translate> === <translate><br /> Creates a new [[Special:MyLanguage/UrlLoader|UrlLoader]] object.<br /> <br /> ''url'' parameter specifies the URL to download. This parameter is optional and if specified loading starts immediately.<br /> <br /> ''method'' parameter specifies the HTTP request method. It can be one of the values of [[Special:MyLanguage/UrlLoader.GET|UrlLoader.GET]], [[Special:MyLanguage/UrlLoader.POST|UrlLoader.POST]], [[Special:MyLanguage/UrlLoader.PUT|UrlLoader.PUT]] or [[Special:MyLanguage/UrlLoader.DELETE|UrlLoader.DELETE]].<br /> The default HTTP method is [[Special:MyLanguage/UrlLoader.GET|UrlLoader.GET]].<br /> <br /> ''body'' parameter specifies the HTTP body data. This parameter is used only when the HTTP method is [[Special:MyLanguage/UrlLoader.POST|UrlLoader.POST]] or or [[Special:MyLanguage/UrlLoader.PUT|UrlLoader.PUT]].<br /> <br /> After loading is finished, loaded data is stored at ''event.data'' field of [[Special:MyLanguage/Event.COMPLETE|Event.COMPLETE]] event as string.<br /> <br /></translate> <source lang="lua"> UrlLoader.new(url,method,headers,body) </source> === <translate>Parameters</translate> === '''url''': (string, optional) <translate>URL to download. This parameter is optional and if specified loading starts immediately.</translate> <br/> '''method''': (string, default = "get") <translate>HTTP request method.</translate> <br/> '''headers''': (table, optional) <translate>HTTP headers.</translate> <br/> '''body''': (string, optional) <translate>HTTP body data. This data is sent as the message body of a request.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">local url = "http://www.[yourDomain].com/application.php?userid=gideros&login=guest" local loader1 = UrlLoader.new(url) local loader2 = UrlLoader.new(url, UrlLoader.GET) -- same as the previous line local loader3 = UrlLoader.new(url, UrlLoader.POST, "my post data") local loader4 = UrlLoader.new(url, UrlLoader.PUT, "my put data") local loader5 = UrlLoader.new(url, UrlLoader.DELETE) local headers = { ["Content-Type"] = "application/x-www-form-urlencoded", ["User-Agent"] = "Gideros Browser", } local loader6 = UrlLoader.new(url, UrlLoader.PUT, headers, "key=value")</source> {{UrlLoader}} nvt2ejhyea1lrou473md7eygsr4z4r4 UrlLoader:close 0 846 14471 10715 2019-12-04T01:49:52Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.2.2<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/UrlLoader|UrlLoader]]<br/> === <translate>Description</translate> === <translate><br /> Terminates the current loading operation.<br /> <br /></translate> <source lang="lua"> UrlLoader:close() </source> {{UrlLoader}} jp2z2kjlaplcry4fc6b93xcl6qfdik1 UrlLoader:ignoreSslErrors 0 832 14472 10329 2019-12-04T01:50:07Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.04.18<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/UrlLoader|UrlLoader]]<br/> === <translate>Description</translate> === <translate>Ignores SSL certificate related errors</translate> <source lang="lua"> UrlLoader:ignoreSslErrors() </source> {{UrlLoader}} ixuoklcun1z9smuaz5ttrdo81yvu7tc UrlLoader:load 0 802 14473 10316 2019-12-04T01:50:24Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.2.2<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/UrlLoader|UrlLoader]]<br/> === <translate>Description</translate> === <translate><br /> Loads data from the specified URL. If there is any load operation in progress, it is terminated and new progress starts.<br /> Please refer to [[UrlLoader.new]] for more detailed description of ''url'', ''method'' and ''body'' parameters.<br /> <br /></translate> <source lang="lua"> UrlLoader:load(url,method,headers,body) </source> === <translate>Parameters</translate> === '''url''': (string, optional) <translate>URL to download. This parameter is optional and if specified loading starts immediately.</translate> <br/> '''method''': (string, default = &quot;get&quot;) <translate>HTTP request method.</translate> <br/> '''headers''': (table, optional) <translate>HTTP headers.</translate> <br/> '''body''': (string, optional) <translate>HTTP body data. This data is sent as the message body of a request.</translate> <br/> {{UrlLoader}} 8ocetmsqts55nuwuy2kpda5z5esfwz3 Viewport 0 121 14981 14480 2019-12-09T23:38:24Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Viewport --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2016.04<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === A Viewport sprite allows to display another view of a tree hierarchy already on stage. Sprites can't have two parents, but thanks to Viewport you can display the same Sprite twice on the stage. Useful for split screen games, mini maps and so on. === <translate>Examples</translate> === '''Displaying same Bitmap in multiple views:''' <source lang="lua"> -- content we want to display in multiple views local content = Bitmap.new(Texture.new("ball.png")) -- now setup view 1 as a 300x300 window view1=Viewport.new() view1:setClip(0,0,300,300) view1:setContent(content) -- add some transformations, just to see the difference view1:setTransform(Matrix.new(1.7320507764816, -1.0000001192093, 1.0000001192093, 1.7320507764816, 50, 50)) -- add view to stage stage:addChild(view1) -- now setup view 2 as a 200x200 window view2=Viewport.new() view2:setClip(0,0,200,200) view2:setPosition(0,300) -- lower down the screen view2:setContent(content) -- add some transformations, just to see the difference view2:setTransform(Matrix.new(0.32139378786087, -0.38302224874496, 0.38302224874496, 0.32139378786087, 30, 30)) -- add view to stage stage:addChild(view2) </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Viewport:lookAngles|Viewport:lookAngles]] <br/><!-- GIDEROSMTD:Viewport:lookAngles(eyex,eyey,eyez,pitch,yaw,roll) --> [[Special:MyLanguage/Viewport:lookAt|Viewport:lookAt]] <br/><!-- GIDEROSMTD:Viewport:lookAt(eyex,eyey,eyez,targetx,targety,targetz,upx,upy,upz) --> [[Special:MyLanguage/Viewport:setContent|Viewport:setContent]] <br/><!-- GIDEROSMTD:Viewport:setContent(content) --> [[Special:MyLanguage/Viewport:setProjection|Viewport:setProjection]] ''<translate>Specify a projection matrix to use when displaying the content. </translate>''<br/><!-- GIDEROSMTD:Viewport:setProjection(matrix) Specify a projection matrix to use when displaying the content. --> [[Special:MyLanguage/Viewport:setTransform|Viewport:setTransform]] <br/><!-- GIDEROSMTD:Viewport:setTransform(transform) --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} a9nqolcv39mo70wxsw079g6g351o1qc Viewport:lookAngles 0 652 14481 10139 2019-12-04T01:54:58Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Viewport|Viewport]]<br/> === <translate>Description</translate> === <translate>Set up the transform matrix of this viewport taking eye position and pitch,yaw,roll angles as arguments</translate> <source lang="lua"> Viewport:lookAngles(eyex,eyey,eyez,pitch,yaw,roll) </source> === <translate>Parameters</translate> === '''eyex''': (number) <translate>eye X coordinate</translate> <br/> '''eyey''': (number) <translate>eye Y coordinate</translate> <br/> '''eyez''': (number) <translate>eye Z coordinate</translate> <br/> '''pitch''': (number) <translate>pitch angle in degrees</translate> <br/> '''yaw''': (number) <translate>yaw angle in degrees</translate> <br/> '''roll''': (number) <translate>roll angle in degrees</translate> <br/> {{Viewport}} 0yjl3tia3kydkfo6as5b4s8zna7ce7s Viewport:lookAt 0 695 14482 10243 2019-12-04T01:55:11Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Viewport|Viewport]]<br/> === <translate>Description</translate> === <translate>Set up the transform matrix of this viewport taking eye and target positions and up direction as arguments.</translate> <source lang="lua"> Viewport:lookAt(eyex,eyey,eyez,targetx,targety,targetz,upx,upy,upz) </source> === <translate>Parameters</translate> === '''eyex''': (number) <translate>eye X coordinate</translate> <br/> '''eyey''': (number) <translate>eye Y coordinate</translate> <br/> '''eyez''': (number) <translate>eye Z coordinate</translate> <br/> '''targetx''': (number) <translate>target X coordinate</translate> <br/> '''targety''': (number) <translate>target Y coordinate</translate> <br/> '''targetz''': (number) <translate>target Z coordinate</translate> <br/> '''upx''': (number) <translate>up X coordinate</translate> <br/> '''upy''': (number) <translate>up Y coordinate</translate> <br/> '''upz''': (number) <translate>up Z coordinate</translate> <br/> {{Viewport}} myw22zs6q7it9gxzw0kk36wamtxqbs5 Viewport:setContent 0 666 14483 10207 2019-12-04T01:55:22Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Viewport|Viewport]]<br/> === <translate>Description</translate> === <translate>Specify which sprite should be displayed by this Viewport</translate> <source lang="lua"> Viewport:setContent(content) </source> === <translate>Parameters</translate> === '''content''': (sprite) <translate>The sprite hierarchy to be displayed by this Viewport</translate> <br/> {{Viewport}} oo68t9yvx2mmfrbq6sxd6zsmnjx8tb4 Viewport:setProjection 0 1066 14484 10512 2019-12-04T01:55:36Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Viewport|Viewport]]<br/> === <translate>Description</translate> === <translate>Specify a projection matrix to use when displaying the content. Useful for rendering 3D worlds where units are not related to screen dimensions, and where a perspective must be applied.</translate> <source lang="lua"> Viewport:setProjection(matrix) </source> === <translate>Parameters</translate> === '''matrix''': (Matrix) <translate>Matrix to transform viewport</translate> <br/> {{Viewport}} el2apjddrs4ispsslx0qq72xhjcyiaq Viewport:setTransform 0 452 14485 9925 2019-12-04T01:55:47Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.04<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Viewport|Viewport]]<br/> === <translate>Description</translate> === <translate>Specify a matrix by which the content will be transformed before being displayed.</translate> <source lang="lua"> Viewport:setTransform(transform) </source> === <translate>Parameters</translate> === '''transform''': (Matrix) <translate>A Matrix object which will be applied to the content before display</translate> <br/> {{Viewport}} ny3b1c41lvwky61q2zako1j62b4p058 Ads 0 85 14835 14583 2019-12-08T12:36:26Z MoKaLux 19 formatting wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Ads --> '''<translate>Supported platforms</translate>:'''<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/EventDispatcher|EventDispatcher]]<br/> === <translate>Description</translate> === The idea is to provide common Ads interface for most of available ad frameworks, so that user's would not have to create a plugin for each of them separately, but rather it would be possible to wrap ad framework in single Java or Objective-C class (depending on the platform) and add it to the project, without even recompiling existing Ads Interface plugin. <br/> Additionally it would be able to support multiple ad frameworks simultaneously so users could switch and fall back between ad frameworks on runtime. <br/> More information available in [http://docs.giderosmobile.com/interface/ads](Ads interface guide). === <translate>Examples</translate> === '''Example 1: Admob''' <source lang="lua"> Ads = Core.class(Sprite) -- you need to add "Ads" and "Gaming" to your project Plugins function Ads:init() -- ads self.ADMOB_APP_ID = "ca-app-pub-3940256099942544~3347511713" -- google test id self.ADMOB_UNIT_ID = "ca-app-pub-3940256099942544/6300978111" -- google test id -- admob (setup for simple banner adverts), note: only visible on phone/tablet if application:getDeviceInfo() == "Android" then require 'ads' --create real object for on device self.ADMOB = Ads.new('admob') self.ADMOB:setKey(self.ADMOB_APP_ID) self.ADMOB:addEventListener(Event.AD_RECEIVED, function() -- show ad self.ADMOB:showAd('banner') self.ADMOB:setAlignment('center', 'bottom') end) self.ADMOB:addEventListener(Event.AD_FAILED, function(e) end) self.ADMOB:addEventListener(Event.AD_ACTION_BEGIN, function() end) self.ADMOB:addEventListener(Event.AD_ACTION_END, function() end) self.ADMOB:addEventListener(Event.AD_DISMISSED, function() end) else self.ADMOB = {} -- create fake object for testing in windows player self.ADMOB.loadAd = function() end self.ADMOB.showAd = function() end end -- LISTENERS self:addEventListener("enterBegin", self.onTransitionInBegin, self) self:addEventListener("enterEnd", self.onTransitionInEnd, self) self:addEventListener("exitBegin", self.onTransitionOutBegin, self) self:addEventListener("exitEnd", self.onTransitionOutEnd, self) end -- EVENT LISTENERS function Ads:onTransitionInBegin() end function Ads:onTransitionInEnd() self.ADMOB:loadAd("banner", self.ADMOB_UNIT_ID) end function Ads:onTransitionOutBegin() end function Ads:onTransitionOutEnd() end </source> '''Example 2: creating fallbacks with Ads frameworks''' <source lang="lua"> --require plugin require "ads" --initialize amazon amazon = Ads.new("amazon") amazon:setKey("amazon-key") --initialize admob admob = Ads.new("admob") admob:setKey("admob-key") --if amazon fails --show admob amazon:addEventListener(Event.AD_FAILED, function(e) print("amazon AD_FAILED", e.error) admob:showAd("auto") end) --if admob fails --show amazon admob:addEventListener(Event.AD_FAILED, function(e) print("admob AD_FAILED", e.error) amazon:showAd("auto") end) --start displaying amazon ads amazon:showAd("auto") </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Ads.new|Ads.new]] ''<translate>initializes new ad framework</translate>''<br/><!-- GIDEROSMTD:Ads.new(adframework) initializes new ad framework --> [[Special:MyLanguage/Ads:enableTesting|Ads:enableTesting]] ''<translate>enable testing ads</translate>''<br/><!-- GIDEROSMTD:Ads:enableTesting() enable testing ads --> [[Special:MyLanguage/Ads:get|Ads:get]] ''<translate>gets property value of the ad</translate>''<br/><!-- GIDEROSMTD:Ads:get(property) gets property value of the ad --> [[Special:MyLanguage/Ads:getHeight|Ads:getHeight]] ''<translate>gets the height of the ad</translate>''<br/><!-- GIDEROSMTD:Ads:getHeight() gets the height of the ad --> [[Special:MyLanguage/Ads:getPosition|Ads:getPosition]] ''<translate>gets x and y position of the ad</translate>''<br/><!-- GIDEROSMTD:Ads:getPosition() gets x and y position of the ad --> [[Special:MyLanguage/Ads:getWidth|Ads:getWidth]] ''<translate>gets width of the ad</translate>''<br/><!-- GIDEROSMTD:Ads:getWidth() gets width of the ad --> [[Special:MyLanguage/Ads:getX|Ads:getX]] ''<translate>gets x position of the ad</translate>''<br/><!-- GIDEROSMTD:Ads:getX() gets x position of the ad --> [[Special:MyLanguage/Ads:getY|Ads:getY]] ''<translate>gets y position of the ad</translate>''<br/><!-- GIDEROSMTD:Ads:getY() gets y position of the ad --> [[Special:MyLanguage/Ads:hideAd|Ads:hideAd]] ''<translate>hides ads</translate>''<br/><!-- GIDEROSMTD:Ads:hideAd() hides ads --> [[Special:MyLanguage/Ads:set|Ads:set]] ''<translate>sets property value of the ad</translate>''<br/><!-- GIDEROSMTD:Ads:set(property,value) sets property value of the ad --> [[Special:MyLanguage/Ads:setAlignment|Ads:setAlignment]] ''<translate>sets alignment of the ad</translate>''<br/><!-- GIDEROSMTD:Ads:setAlignment(horizontal,vertical) sets alignment of the ad --> [[Special:MyLanguage/Ads:setKey|Ads:setKey]] ''<translate>set keys for the framework</translate>''<br/><!-- GIDEROSMTD:Ads:setKey(...) set keys for the framework --> [[Special:MyLanguage/Ads:setPosition|Ads:setPosition]] ''<translate>sets position of the ad</translate>''<br/><!-- GIDEROSMTD:Ads:setPosition(x,y) sets position of the ad --> [[Special:MyLanguage/Ads:setX|Ads:setX]] ''<translate>Sets x position of the ad</translate>''<br/><!-- GIDEROSMTD:Ads:setX(x) Sets x position of the ad --> [[Special:MyLanguage/Ads:setY|Ads:setY]] ''<translate>sets y position of the ad</translate>''<br/><!-- GIDEROSMTD:Ads:setY(y) sets y position of the ad --> [[Special:MyLanguage/Ads:showAd|Ads:showAd]] ''<translate>display ad</translate>''<br/><!-- GIDEROSMTD:Ads:showAd(...) display ad --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === [[Special:MyLanguage/Event.AD_ACTION_BEGIN|Event.AD_ACTION_BEGIN]]<br/><!-- GIDEROSEVT:Event.AD_ACTION_BEGIN adActionBegin--> [[Special:MyLanguage/Event.AD_ACTION_END|Event.AD_ACTION_END]]<br/><!-- GIDEROSEVT:Event.AD_ACTION_END adActionEnd--> [[Special:MyLanguage/Event.AD_DISMISSED|Event.AD_DISMISSED]]<br/><!-- GIDEROSEVT:Event.AD_DISMISSED adDismissed--> [[Special:MyLanguage/Event.AD_ERROR|Event.AD_ERROR]]<br/><!-- GIDEROSEVT:Event.AD_ERROR adError--> [[Special:MyLanguage/Event.AD_FAILED|Event.AD_FAILED]]<br/><!-- GIDEROSEVT:Event.AD_FAILED adFailed--> [[Special:MyLanguage/Event.AD_RECEIVED|Event.AD_RECEIVED]]<br/><!-- GIDEROSEVT:Event.AD_RECEIVED adReceived--> [[Special:MyLanguage/Event.AD_REWARDED|Event.AD_REWARDED]]<br/><!-- GIDEROSEVT:Event.AD_RECEIVED adReceived--> === <translate>Constants</translate> === |} {{Ads}} bm6zgcen262ik487b3p056r2u6afwqd Ads.new 0 731 14488 10647 2019-12-04T03:59:13Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Description</translate> === <translate>Initializes new ad framework For the possible values check [http://docs.giderosmobile.com/interface/ads](Ads Interface Guide)</translate> <source lang="lua"> Ads.new(adframework) </source> === <translate>Parameters</translate> === '''adframework''': (string) <translate>name of the adframework</translate> <br/> {{Ads}} i7lavuq5geov7f9gfmdh1m086i4vzpa Ads:enableTesting 0 431 14489 9897 2019-12-04T03:59:25Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Description</translate> === <translate>Enable testing ads if supported by framework</translate> <source lang="lua"> Ads:enableTesting() </source> {{Ads}} k3rg9utd14wqmtpr0b5egsbp4ykc02k Ads:get 0 496 14490 9980 2019-12-04T03:59:43Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Description</translate> === <translate>Gets property value of the ad (accepted values x, y)</translate> <source lang="lua"> (varies) = Ads:get(property) </source> === <translate>Parameters</translate> === '''property''': (string) <translate>value for which property to get</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (varies) <translate>value of the property</translate><br/> {{Ads}} qfijscx9z8hzhppy5kiklox7torytkd Ads:getHeight 0 364 14491 9798 2019-12-04T04:00:34Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Description</translate> === <translate>Gets the height of the ad in Gideros logical dimensions, taking into consideration applied automatic scaling</translate> <source lang="lua"> (number) = Ads:getHeight() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>height of the banner ad</translate><br/> {{Ads}} rpwvdou6hpp2brr1sh9vq2e4l6if7mh Ads:getPosition 0 168 14492 9557 2019-12-04T04:21:24Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Description</translate> === <translate>Gets x and y position of the ad in Gideros logical dimensions, taking into consideration applied automatic scaling</translate> <source lang="lua"> (number), (number) = Ads:getPosition() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x position of the ad</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y position of the ad</translate><br/> {{Ads}} gsju8l4q6ty4zh86j24ozuf9krlyru2 Ads:getWidth 0 755 14493 10661 2019-12-04T04:21:36Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Description</translate> === <translate>Gets width of the ad in Gideros logical dimensions, taking into consideration applied automatic scaling</translate> <source lang="lua"> (number) = Ads:getWidth() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>width of the banner ad</translate><br/> {{Ads}} ik6sb74u9x4m0fz69v6y6ljcrxip2db Ads:getX 0 344 14494 9782 2019-12-04T04:21:48Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Description</translate> === <translate>Gets x position of the ad in Gideros logical dimensions, taking into consideration applied automatic scaling</translate> <source lang="lua"> (number) = Ads:getX() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x position of the ad</translate><br/> {{Ads}} mewa90k6xtzeloh11dxzwzsv4f52pbs Ads:getY 0 347 14495 9783 2019-12-04T04:22:00Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Description</translate> === <translate>Gets y position of the ad in Gideros logical dimensions, taking into consideration applied automatic scaling</translate> <source lang="lua"> (number) = Ads:getY() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>get y position of the ad</translate><br/> {{Ads}} caazgr9bh6wpw387ynsbmrn75385x3i Ads:hideAd 0 139 14496 9525 2019-12-04T04:22:13Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Description</translate> === <translate>Hides displayed ads</translate> <source lang="lua"> Ads:hideAd() </source> {{Ads}} khp27bbgmmzubpl8n7wl375zle8ov1u Ads:set 0 908 14497 10753 2019-12-04T04:22:24Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Description</translate> === <translate>Sets property value of the ad (accepted values: x, y)</translate> <source lang="lua"> Ads:set(property,value) </source> === <translate>Parameters</translate> === '''property''': (string) <translate>name of the property to set</translate> <br/> '''value''': (varies) <translate>value to set</translate> <br/> {{Ads}} 6n1ga7z5al366h7pn12iyliy7qfrbrz Ads:setAlignment 0 573 14498 10072 2019-12-04T04:22:36Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Description</translate> === <translate>Sets alignment of the ad First value is for the horizontal alignment and can have values as "left", "center", "right" Second value is for the vertical alignment and can have values as "top", "center", "bottom"</translate> <source lang="lua"> Ads:setAlignment(horizontal,vertical) </source> === <translate>Parameters</translate> === '''horizontal''': (strong) <translate>horizontal alignment</translate> <br/> '''vertical''': (string) <translate>vertical alignment</translate> <br/> {{Ads}} csp3ncshh8h5ezbkuwlzaewj8lig1i4 Ads:setKey 0 298 14499 9724 2019-12-04T04:22:48Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Description</translate> === <translate>provide all the keys/appids/etc needed for the framework, which you will get in same order on Native part in Map/Array object For the possible values check [http://docs.giderosmobile.com/interface/ads](Ads Interface Guide) Methods tab</translate> <source lang="lua"> Ads:setKey(...) </source> === <translate>Parameters</translate> === '''...''': (values) <translate>Varies for each ad framework</translate> <br/> {{Ads}} 5q3b8z487euh6e9xroizrrefd61n5ul Ads:setPosition 0 951 14500 10422 2019-12-04T04:23:00Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Description</translate> === <translate>Sets position of the ad in Gideros logical dimensions, taking into consideration applied automatic scaling</translate> <source lang="lua"> Ads:setPosition(x,y) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>x position to set</translate> <br/> '''y''': (number) <translate>y position to set</translate> <br/> {{Ads}} l8q0chxoydlccr1np2g25axve3lddi5 Ads:setX 0 815 14501 10336 2019-12-04T04:23:11Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Description</translate> === <translate>Sets x position of the ad in Gideros logical dimensions, taking into consideration applied automatic scaling</translate> <source lang="lua"> Ads:setX(x) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>set x coordinate</translate> <br/> {{Ads}} 696z4ac087kg3jp3fv9bcwla8ibkyzp Ads:setY 0 812 14502 10318 2019-12-04T04:23:22Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Description</translate> === <translate>Sets y position of the ad in Gideros logical dimensions, taking into consideration applied automatic scaling</translate> <source lang="lua"> Ads:setY(y) </source> === <translate>Parameters</translate> === '''y''': (number) <translate>set y coordinate</translate> <br/> {{Ads}} b6wppd22jdyko9sadrjluvqb508uyh5 Ads:showAd 0 637 14503 13488 2019-12-04T04:23:33Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Ads|Ads]]<br/> === <translate>Description</translate> === <translate>Display provided ad type with any other additional information. '''For the possible values check [http://docs.giderosmobile.com/interface/ads](Ads Interface Guide) Methods tab'''</translate> <source lang="lua"> Ads:showAd(...) </source> === <translate>Parameters</translate> === '''...''': (varies) <translate>varies for each ad framework</translate> <br/> {{Ads}} j636wi160d034sioivhhzd32zvuxntw Bit 0 24 14514 11646 2019-12-04T05:04:55Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:bit --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2013.09<br/> === <translate>Description</translate> === <translate>Provides bit based operations</translate> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/bit.arshift|bit.arshift]] ''<translate>Returns the bitwise arithmetic right-shift</translate>''<br/><!-- GIDEROSMTD:bit.arshift(x,n) Returns the bitwise arithmetic right-shift --> [[Special:MyLanguage/bit.band|bit.band]] ''<translate>Returns the bitwise and of its argument.</translate>''<br/><!-- GIDEROSMTD:bit.band(x1,x2) Returns the bitwise and of its argument. --> [[Special:MyLanguage/bit.bnot|bit.bnot]] ''<translate>Returns the bitwise not of its argument.</translate>''<br/><!-- GIDEROSMTD:bit.bnot(x) Returns the bitwise not of its argument. --> [[Special:MyLanguage/bit.bor|bit.bor]] ''<translate>Returns the bitwise or of its argument.</translate>''<br/><!-- GIDEROSMTD:bit.bor(x1,x2) Returns the bitwise or of its argument. --> [[Special:MyLanguage/bit.bswap|bit.bswap]] ''<translate>Swaps the bytes of its argument and returns it</translate>''<br/><!-- GIDEROSMTD:bit.bswap(x) Swaps the bytes of its argument and returns it --> [[Special:MyLanguage/bit.bxor|bit.bxor]] ''<translate>Returns the bitwise xor of its argument.</translate>''<br/><!-- GIDEROSMTD:bit.bxor(x1,x2) Returns the bitwise xor of its argument. --> [[Special:MyLanguage/bit.lshift|bit.lshift]] ''<translate>Returns the bitwise logical left-shift</translate>''<br/><!-- GIDEROSMTD:bit.lshift(x,n) Returns the bitwise logical left-shift --> [[Special:MyLanguage/bit.rol|bit.rol]] ''<translate>Returns the bitwise left rotation</translate>''<br/><!-- GIDEROSMTD:bit.rol(x,n) Returns the bitwise left rotation --> [[Special:MyLanguage/bit.ror|bit.ror]] ''<translate>Returns the bitwise right rotation</translate>''<br/><!-- GIDEROSMTD:bit.ror(x,n) Returns the bitwise right rotation --> [[Special:MyLanguage/bit.rshift|bit.rshift]] ''<translate>Returns the bitwise logical right-shift</translate>''<br/><!-- GIDEROSMTD:bit.rshift(x,n) Returns the bitwise logical right-shift --> [[Special:MyLanguage/bit.tobit|bit.tobit]] ''<translate>Normalizes a number to the numeric range for bit operations</translate>''<br/><!-- GIDEROSMTD:bit.tobit(x) Normalizes a number to the numeric range for bit operations --> [[Special:MyLanguage/bit.tohex|bit.tohex]] ''<translate>Converts its first argument to a hex string.</translate>''<br/><!-- GIDEROSMTD:bit.tohex(x,n) Converts its first argument to a hex string. --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} {{Bit}} p28h4s18p86rt449y0kd9i2zzx08iwd Bit.arshift 0 190 14515 9584 2019-12-04T05:05:25Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/bit|bit]]<br/> === <translate>Description</translate> === <translate>Returns the bitwise arithmetic right-shift by the number of bits given by the second argument.</translate> <source lang="lua"> (number) = bit.arshift(x,n) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>number to shift</translate> <br/> '''n''': (number) <translate>amount of bits to shift</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>bitwise arithmetic right-shift</translate><br/> {{Bit}} fwsmid8f0qh39nzk53ocvh196sk3go8 Bit.band 0 795 14516 10307 2019-12-04T05:05:41Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/bit|bit]]<br/> === <translate>Description</translate> === <translate>Returns the bitwise and of its argument.</translate> <source lang="lua"> (number) = bit.band(x1,x2) </source> === <translate>Parameters</translate> === '''x1''': (number) <translate>first number for and operation</translate> <br/> '''x2''': (number) <translate>second and more numbers can be provided for and operation</translate> '''optional'''<br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>bitwise and</translate><br/> {{Bit}} nzzlrauyd6pgsuuvu9i95yphqls7dy0 Bit.bnot 0 663 14517 10201 2019-12-04T05:06:03Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/bit|bit]]<br/> === <translate>Description</translate> === <translate>Returns the bitwise not of its argument.</translate> <source lang="lua"> (number) = bit.bnot(x) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>number to which to apply bitwise not</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>bitwise not</translate><br/> {{Bit}} 8r6vvrbcn7rh0u2wg5lwj1bi9l0pimu Bit.bor 0 725 14518 10254 2019-12-04T05:06:16Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/bit|bit]]<br/> === <translate>Description</translate> === <translate>Returns the bitwise or of its argument.</translate> <source lang="lua"> (number) = bit.bor(x1,x2) </source> === <translate>Parameters</translate> === '''x1''': (number) <translate>first number for or operation</translate> <br/> '''x2''': (number) <translate>second and more numbers can be provided for or operation</translate> '''optional'''<br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>bitwise or</translate><br/> {{Bit}} jvd0hka95vk9j59jb0vl4a57ka101eh Bit.bswap 0 785 14519 10309 2019-12-04T05:06:26Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/bit|bit]]<br/> === <translate>Description</translate> === <translate>Swaps the bytes of its argument and returns it. This can be used to convert little-endian 32 bit numbers to big-endian 32 bit numbers or vice versa.</translate> <source lang="lua"> (number) = bit.bswap(x) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>number to swap</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>Swapped bytes</translate><br/> {{Bit}} du95fvskqlpoaki2cfb10vnr54eqh4s Bit.bxor 0 1104 14520 10555 2019-12-04T05:06:37Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/bit|bit]]<br/> === <translate>Description</translate> === <translate>Returns the bitwise xor of its argument.</translate> <source lang="lua"> (number) = bit.bxor(x1,x2) </source> === <translate>Parameters</translate> === '''x1''': (number) <translate>first number for xor operation</translate> <br/> '''x2''': (number) <translate>second and more numbers can be provided for xor operation</translate> '''optional'''<br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>bitwise xor</translate><br/> {{Bit}} 27817dc4yobt8h1c5e11pnfxvdgvyag Bit.lshift 0 362 14521 9802 2019-12-04T05:06:49Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/bit|bit]]<br/> === <translate>Description</translate> === <translate>Returns the bitwise logical left-shift by the number of bits given by the second argument.</translate> <source lang="lua"> (number) = bit.lshift(x,n) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>number to shift</translate> <br/> '''n''': (number) <translate>amount of bits to shift</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>bitwise logical left-shift</translate><br/> {{Bit}} hgrn0cbfwyxuxcczsj9ospwyjwc1d2i Bit.rol 0 210 14522 9609 2019-12-04T05:07:03Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/bit|bit]]<br/> === <translate>Description</translate> === <translate>Returns the bitwise left rotation of its first argument by the number of bits given by the second argument. Bits shifted out on one side are shifted back in on the other side.</translate> <source lang="lua"> (number) = bit.rol(x,n) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>number to rotate</translate> <br/> '''n''': (number) <translate>amount of bits to rotate</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>bitwise left rotation</translate><br/> {{Bit}} rsnj0cwcffwzkzsbzu6t58s4myey9rp Bit.ror 0 219 14523 9625 2019-12-04T05:07:15Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/bit|bit]]<br/> === <translate>Description</translate> === <translate>Returns the bitwise right rotation of its first argument by the number of bits given by the second argument. Bits shifted out on one side are shifted back in on the other side.</translate> <source lang="lua"> (number) = bit.ror(x,n) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>number to rotate</translate> <br/> '''n''': (number) <translate>amount of bits to rotate</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>bitwise right rotation</translate><br/> {{Bit}} 71e20y7agi202irya3ykj7w9an5gmy1 Bit.rshift 0 621 14524 10151 2019-12-04T05:07:26Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/bit|bit]]<br/> === <translate>Description</translate> === <translate>Returns the bitwise logical right-shift by the number of bits given by the second argument.</translate> <source lang="lua"> (number) = bit.rshift(x,n) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>number to shift</translate> <br/> '''n''': (number) <translate>amount of bits to shift</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>bitwise logical right-shift</translate><br/> {{Bit}} 7w7j2j8h4wzam716xossp5pjmkc54fo Bit.tobit 0 966 14525 10786 2019-12-04T05:07:39Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/bit|bit]]<br/> === <translate>Description</translate> === <translate>Normalizes a number to the numeric range for bit operations and returns it. This function is usually not needed since all bit operations already normalize all of their input arguments.</translate> <source lang="lua"> (number) = bit.tobit(x) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>number which range to normalize</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>normalized number</translate><br/> {{Bit}} df0mjsmfc0fozx2mx2ahw6t3x9ek7hg Bit.tohex 0 184 14526 9576 2019-12-04T05:07:52Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/bit|bit]]<br/> === <translate>Description</translate> === <translate>Converts its first argument to a hex string. The number of hex digits is given by the absolute value of the optional second argument. Positive numbers between 1 and 8 generate lowercase hex digits. Negative numbers generate uppercase hex digits. Only the least-significant 4*|n| bits are used. The default is to generate 8 lowercase hex digits.</translate> <source lang="lua"> (string) = bit.tohex(x,n) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>number to convert to hex string</translate> <br/> '''n''': (number) <translate>number of hex digits to convert</translate> '''optional'''<br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>hex string</translate><br/> {{Bit}} odz6y0z4hvtg1a9gl9qsvm881tpum31 Bitwise Operators 0 49 10312 8909 2018-09-03T08:58:43Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Bitwise Operators --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2017.10<br/> === <translate>Description</translate> === <translate><br /> Bitwise operators to manipulate numbers.<br /><br /> a<b> | </b>b &emsp; Bitwise 'a OR b'.<br /> a<b> & </b>b &emsp; Bitwise 'a AND b'.<br /> a<b> ~ </b>b &emsp; Bitwise 'a XOR b'.<br /> a<b> &lt;&lt; </b>b &emsp; Bitwise shift 'a' by 'b' left.<br /> a<b> &gt;&gt; </b>b &emsp; Bitwise shift 'a' by 'b' right.<br /> <b> ~ </b>a &emsp; Bitwise 'NOT a'.<br /></translate> === <translate>Examples</translate> === '''Set joypad switches'''<br/> <source lang="lua"> if k==KeyCode.UP then joypad=joypad|0b001000 elseif k==KeyCode.DOWN then joypad=joypad|0b000100 elseif k==KeyCode.LEFT then joypad=joypad|0b000010 elseif k==KeyCode.RIGHT then joypad=joypad|0b000001 end</source> '''Clear joypad switches'''<br/> <source lang="lua"> if k==KeyCode.UP then joypad=joypad&0b0111 elseif k==KeyCode.DOWN then joypad=joypadRGUDLR&0b1011 elseif k==KeyCode.LEFT then joypad=joypadRGUDLR&0b1101 elseif k==KeyCode.RIGHT then joypad=joypadRGUDLR&0b1110 end</source> '''Move in a direction based on joystick switches (using above examples)'''<br/> <source lang="lua"> local deltaX={0,-1,1,0,0,-1,1,0,0,-1,1,0,0,-1,1,0} local deltaY={0,0,0,0,1,1,1,1,-1,-1,-1,-1,0,0,0,0} x=x+deltaX[joypad+1] y=y+deltaY[joypad+1]</source> '''Debounce bits, eg joypad switches'''<br/> <source lang="lua"> joypad=(joypad~joypadOld)&joypad joypadOld=joypad</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} n4kkupx8ib6nbnmi5md18kwss383977 Bump 0 31 14992 9667 2019-12-10T16:24:09Z MoKaLux 19 added links to cbump template wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:bump --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2017.8<br/> === <translate>Description</translate> === <translate>This is a native (and much faster) implementation of excellent bump.lua collision library. See full original documentations here: https://github.com/kikito/bump.lua Just require 'cbump' instead of 'bump' to use this native version. </translate> You may also have a look at this section [[CBump]], which is '''a full cbump 2D Platformer template'''. {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} 2sqjeldyqas9zu1nhaphc1viv43ghnq Camera 0 66 14535 11650 2019-12-04T07:47:22Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:camera --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2017.8<br/> === <translate>Description</translate> === <translate>Renders live camera stream into a Texture</translate> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">require "camera" -- Probe camera size (use a dummy 512x512 surface) Camera.texture=Texture.new(nil,512,512) cw,ch=Camera.start(Camera.texture) Camera.stop() -- Restart camera with a full sized texture Camera.texture=Texture.new(nil,cw,ch,true) cw,ch=Camera.start(Camera.texture) application:setLogicalDimensions(ch,cw) local b=Bitmap.new(Camera.texture) stage:addChild(b)</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/camera.availableDevices|camera.availableDevices]] ''<translate>Return a list of available devices.</translate>''<br/><!-- GIDEROSMTD:camera.availableDevices() Return a list of available devices. --> [[Special:MyLanguage/camera.start|camera.start]] ''<translate>Start streaming camera pictures to a Texture</translate>''<br/><!-- GIDEROSMTD:camera.start(texture,device) Start streaming camera pictures to a Texture --> [[Special:MyLanguage/camera.stop|camera.stop]] ''<translate>Stop camera streaming.</translate>''<br/><!-- GIDEROSMTD:camera.stop() Stop camera streaming. --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} {{Camera}} 5m9h7yu4naf3a29w82izjk0ixzd0p60 Camera.availableDevices 0 266 14536 9683 2019-12-04T07:47:52Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/camera|camera]]<br/> === <translate>Description</translate> === <translate>Returns a list of tables describing each available camera in the system. Each list entry has the following fields: *name* - Internal name of the device *description* - Description of the device *position* - Position of the device, can be 'front','back' or 'unknown'</translate> <source lang="lua"> (table) = camera.availableDevices() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>List of available cameras</translate><br/> {{Camera}} oew7jqb0lbwdpb4sjv0dfr8013xrtbh Camera.start 0 830 14537 10700 2019-12-04T07:48:14Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/camera|camera]]<br/> === <translate>Description</translate> === <translate>Start live streaming of camera images to the specified Texture.</translate> <source lang="lua"> (number), (number) = camera.start(texture,device) </source> === <translate>Parameters</translate> === '''texture''': (Texture) <translate>The texture to render camera stream into</translate> <br/> '''device''': (string) <translate>The camera to use or nil to use the default one</translate> '''optional'''<br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>Nominal width of camera images</translate><br/> '''<translate>Returns</translate>''' (number) <translate>Nominal height of camera images</translate><br/> {{Camera}} o9ehpq0mk8i9gg7x7dqvhb89sz5clia Camera.stop 0 780 14538 10289 2019-12-04T07:48:34Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2017.8<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/camera|camera]]<br/> === <translate>Description</translate> === <translate>Stops live camera streaming and releases resources.</translate> <source lang="lua"> camera.stop() </source> {{Camera}} cac45o9mcgymip324slky1yi17oxywa Controller 0 76 14540 11641 2019-12-04T08:15:42Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Controller --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/EventDispatcher|EventDispatcher]]<br/> === <translate>Description</translate> === <translate>Controller interface allows you to use most popular controllers on all supported operating systems under the same interface. Internally Controller Interface also matches all buttons and controller behavior under the same scheme so you won't have to worry about that anymore. For more information check out [http://docs.giderosmobile.com/interface/controller](Controller Interface Guide)</translate> === <translate>Examples</translate> === '''Using Controller example'''<br/> <source lang="lua">require "controller" controller:addEventListener(Event.KEY_DOWN, function(e) print("Button Down ", e.playerId, e.keyCode, findKeyCode(e.keyCode)) end) controller:addEventListener(Event.KEY_UP, function(e) print("Button Up ", e.playerId, e.keyCode, findKeyCode(e.keyCode)) end) controller:addEventListener(Event.RIGHT_JOYSTICK, function(e) print("Player: ", e.playerId) print("RIGHT_JOYSTICK:", "x:"..e.x, "y:"..e.y, "angle:"..e.angle, "strength:"..e.strength) end) controller:addEventListener(Event.LEFT_JOYSTICK, function(e) print("Player: ", e.playerId) print("LEFT_JOYSTICK:", "x:"..e.x, "y:"..e.y, "angle:"..e.angle, "strength:"..e.strength) end) controller:addEventListener(Event.RIGHT_TRIGGER, function(e) print("Player: ", e.playerId) print("RIGHT_TRIGGER:", "strength:"..e.strength) end) controller:addEventListener(Event.LEFT_TRIGGER, function(e) print("Player: ", e.playerId) print("LEFT_TRIGGER:", "strength:"..e.strength) end) controller:addEventListener(Event.CONNECTED, function(e) print("Player: ", e.playerId, "connected") print("Are there any controllers?", controller:isAnyAvailable()) print("Controller count", controller:getPlayerCount()) print("Name of controller "..e.playerId, controller:getControllerName(e.playerId)) print("players", #controller:getPlayers()) end) controller:addEventListener(Event.DISCONNECTED, function(e) print("Player: ", e.playerId, "disconnected") end)</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Controller:getControllerName|Controller:getControllerName]] ''<translate>gets the name of controller</translate>''<br/><!-- GIDEROSMTD:Controller:getControllerName(id) gets the name of controller --> [[Special:MyLanguage/Controller:getPlayerCount|Controller:getPlayerCount]] ''<translate>returns amount of connected controllers</translate>''<br/><!-- GIDEROSMTD:Controller:getPlayerCount() returns amount of connected controllers --> [[Special:MyLanguage/Controller:getPlayers|Controller:getPlayers]] ''<translate>returns table with controller IDs</translate>''<br/><!-- GIDEROSMTD:Controller:getPlayers() returns table with controller IDs --> [[Special:MyLanguage/Controller:isAnyAvailable|Controller:isAnyAvailable]] ''<translate>return true if any controller is connected</translate>''<br/><!-- GIDEROSMTD:Controller:isAnyAvailable() return true if any controller is connected --> [[Special:MyLanguage/Controller:vibrate|Controller:vibrate]] ''<translate>vibrate the controller for provided amount of miliseconds</translate>''<br/><!-- GIDEROSMTD:Controller:vibrate(ms) vibrate the controller for provided amount of miliseconds --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === [[Special:MyLanguage/Event.CONNECTED|Event.CONNECTED]]<br/><!-- GIDEROSEVT:Event.CONNECTED connected--> [[Special:MyLanguage/Event.DISCONNECTED|Event.DISCONNECTED]]<br/><!-- GIDEROSEVT:Event.DISCONNECTED disconnected--> [[Special:MyLanguage/Event.KEY_DOWN|Event.KEY_DOWN]]<br/><!-- GIDEROSEVT:Event.KEY_DOWN keyDown--> [[Special:MyLanguage/Event.KEY_UP|Event.KEY_UP]]<br/><!-- GIDEROSEVT:Event.KEY_UP keyUp--> [[Special:MyLanguage/Event.LEFT_JOYSTICK|Event.LEFT_JOYSTICK]]<br/><!-- GIDEROSEVT:Event.LEFT_JOYSTICK leftJoystick--> [[Special:MyLanguage/Event.LEFT_TRIGGER|Event.LEFT_TRIGGER]]<br/><!-- GIDEROSEVT:Event.LEFT_TRIGGER leftTrigger--> [[Special:MyLanguage/Event.RIGHT_JOYSTICK|Event.RIGHT_JOYSTICK]]<br/><!-- GIDEROSEVT:Event.RIGHT_JOYSTICK rightJoystick--> [[Special:MyLanguage/Event.RIGHT_TRIGGER|Event.RIGHT_TRIGGER]]<br/><!-- GIDEROSEVT:Event.RIGHT_TRIGGER rightTrigger--> === <translate>Constants</translate> === |} {{Controller}} gcwf5zat1u974mq0vrackvlw1hlcv77 Controller:getControllerName 0 983 14541 10431 2019-12-04T08:16:33Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Controller|Controller]]<br/> === <translate>Description</translate> === <translate>Get the name of controller</translate> <source lang="lua"> (string) = Controller:getControllerName(id) </source> === <translate>Parameters</translate> === '''id''': (number) <translate>controller id</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>controller name</translate><br/> {{Controller}} 6ivyi4xrd5e52znffnyeua9cdark78g Controller:getPlayerCount 0 1132 14542 10592 2019-12-04T08:16:55Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Controller|Controller]]<br/> === <translate>Description</translate> === <translate>Returns amount of connected controllers</translate> <source lang="lua"> (number) = Controller:getPlayerCount() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>amount of connected controllers</translate><br/> {{Controller}} hu4r969w3vhqa6tfe141a48av8kfvf2 Controller:getPlayers 0 684 14543 10619 2019-12-04T08:17:07Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Controller|Controller]]<br/> === <translate>Description</translate> === <translate>Returns table with controller IDs</translate> <source lang="lua"> (table) = Controller:getPlayers() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>indexed table with controller ids as values</translate><br/> {{Controller}} 9cd86n478xvsxy5ck6nrsusoorsldlj Controller:isAnyAvailable 0 536 14544 10027 2019-12-04T08:17:23Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Controller|Controller]]<br/> === <translate>Description</translate> === <translate>Returns true if any of controller is connected to device</translate> <source lang="lua"> (bool) = Controller:isAnyAvailable() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>if any controller is connected</translate><br/> {{Controller}} 6esviaozhza0wtrik77shoo2b9kaew7 Controller:vibrate 0 371 14545 9805 2019-12-04T08:17:59Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2014.01<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Controller|Controller]]<br/> === <translate>Description</translate> === <translate>Vibrate the controller for provided amount of miliseconds. Works only if it is supported by the platform and controller, don't rely on it to work, and only use as addition to the game play</translate> <source lang="lua"> Controller:vibrate(ms) </source> === <translate>Parameters</translate> === '''ms''': (number) <translate>time in miliseconds</translate> <br/> {{Controller}} 3wezr00qr9z9t0jx6ck0ir1w8movdzp FBInstant 0 2809 14938 14794 2019-12-09T21:16:55Z MoKaLux 19 changed desciption as per sinistersoft recommandation wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:FBInstant --> '''<translate>Supported platforms</translate>:''' [[File:Platform html5.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> === <translate>Description</translate> === Facebook Instant Games Initialisation and Core. It is very important that only the following API calls are made before startGameAsync has resolved: *'''FBInstant.getSDKVersion()'''<br/> *'''FBInstant.initializeAsync()'''<br/> *'''FBInstant.getPlatform()'''<br/> *'''FBInstant.setLoadingProgress()'''<br/> *'''FBInstant.getSupportedAPIs()'''<br/> *'''FBInstant.quit()'''<br/> *'''FBInstant.onPause()'''<br/> *'''FBInstant.player.getID()'''<br/> To help do this you could create a variable called FBInstantAPI and set it to true once startGameAsync has been resolved - then only call other API commands if FBInstant is true and then if FBInstantAPI is true. === <translate>Examples</translate> === '''Initialisation and removal of the Facebook loading progress indicator.''' <source lang="lua"> pcall(function() FBInstant=require "FBInstant" end) if FBInstant then FBInstant.startGameAsync(function() print("Loading screen removed") FBInstantAPI=true end) else print("FBInstant not loaded") end </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/FBInstant.canCreateShortcutAsync|FBInstant.canCreateShortcutAsync]] ''<translate>Returns whether or not the user is eligible to have shortcut creation requested.</translate>''<br/><!-- GIDEROSMTD:FBInstant.canCreateShortcutAsync(callback) Returns whether or not the user is eligible to have shortcut creation requested. --> [[Special:MyLanguage/FBInstant.checkCanPlayerMatchAsync|FBInstant.checkCanPlayerMatchAsync]] ''<translate>Checks if the current player is eligible for the matchPlayerAsync API.</translate>''<br/><!-- GIDEROSMTD:FBInstant.checkCanPlayerMatchAsync(callback) Checks if the current player is eligible for the matchPlayerAsync API. --> [[Special:MyLanguage/FBInstant.createShortcutAsync|FBInstant.createShortcutAsync]] ''<translate>Prompts the user to create a shortcut to the game.</translate>''<br/><!-- GIDEROSMTD:FBInstant.createShortcutAsync(callback) Prompts the user to create a shortcut to the game. --> [[Special:MyLanguage/FBInstant.getEntryPointAsync|FBInstant.getEntryPointAsync]] ''<translate>Returns the entry point that the game was launched from.</translate>''<br/><!-- GIDEROSMTD:FBInstant.getEntryPointAsync(callback) Returns the entry point that the game was launched from. --> [[Special:MyLanguage/FBInstant.getEntryPointData|FBInstant.getEntryPointData]] ''<translate>Returns any data object associated with the entry point that the game was launched from.</translate>''<br/><!-- GIDEROSMTD:FBInstant.getEntryPointData() Returns any data object associated with the entry point that the game was launched from. --> [[Special:MyLanguage/FBInstant.getInterstitialAdAsync|FBInstant.getInterstitialAdAsync]] ''<translate>Attempt to create an instance of interstitial ad.</translate>''<br/><!-- GIDEROSMTD:FBInstant.getInterstitialAdAsync(placementID,callback) Attempt to create an instance of interstitial ad. --> [[Special:MyLanguage/FBInstant.getLeaderboardAsync|FBInstant.getLeaderboardAsync]] ''<translate>Fetch a specific leaderboard belonging to this Instant Game.</translate>''<br/><!-- GIDEROSMTD:FBInstant.getLeaderboardAsync(name,callback) Fetch a specific leaderboard belonging to this Instant Game. --> [[Special:MyLanguage/FBInstant.getLocale|FBInstant.getLocale]] ''<translate>The current locale.</translate>''<br/><!-- GIDEROSMTD:FBInstant.getLocale() The current locale. --> [[Special:MyLanguage/FBInstant.getPlatform|FBInstant.getPlatform]] ''<translate>The platform on which the game is currently running.</translate>''<br/><!-- GIDEROSMTD:FBInstant.getPlatform() The platform on which the game is currently running. --> [[Special:MyLanguage/FBInstant.getRewardedVideoAsync|FBInstant.getRewardedVideoAsync]] ''<translate>Attempt to create an instance of rewarded video.</translate>''<br/><!-- GIDEROSMTD:FBInstant.getRewardedVideoAsync(placementID,callback) Attempt to create an instance of rewarded video. --> [[Special:MyLanguage/FBInstant.getSDKVersion|FBInstant.getSDKVersion]] ''<translate>The string representation of this SDK version.</translate>''<br/><!-- GIDEROSMTD:FBInstant.getSDKVersion() The string representation of this SDK version. --> [[Special:MyLanguage/FBInstant.getSupportedAPIs|FBInstant.getSupportedAPIs]] ''<translate>Provides a list of API functions that are supported by the client.</translate>''<br/><!-- GIDEROSMTD:FBInstant.getSupportedAPIs() Provides a list of API functions that are supported by the client. --> [[Special:MyLanguage/FBInstant.logEvent|FBInstant.logEvent]] ''<translate>Log an app event with FB Analytics.</translate>''<br/><!-- GIDEROSMTD:FBInstant.logEvent(eventName,valueToSum,parameters) Log an app event with FB Analytics. --> [[Special:MyLanguage/FBInstant.matchPlayerAsync|FBInstant.matchPlayerAsync]] ''<translate>Attempts to match the current player with other users looking for people to play with.</translate>''<br/><!-- GIDEROSMTD:FBInstant.matchPlayerAsync(matchTag,switchContextWhenMatched,callback) Attempts to match the current player with other users looking for people to play with. --> [[Special:MyLanguage/FBInstant.onPause|FBInstant.onPause]] ''<translate>Set a callback to be fired when a pause event is triggered.</translate>''<br/><!-- GIDEROSMTD:FBInstant.onPause(callback) Set a callback to be fired when a pause event is triggered. --> [[Special:MyLanguage/FBInstant.quit|FBInstant.quit]] ''<translate>Quits the game.</translate>''<br/><!-- GIDEROSMTD:FBInstant.quit() Quits the game. --> [[Special:MyLanguage/FBInstant.setLoadingProgress|FBInstant.setLoadingProgress]] ''<translate>Report the game's initial loading progress.</translate>''<br/><!-- GIDEROSMTD:FBInstant.setLoadingProgress(percentage) Report the game's initial loading progress. --> [[Special:MyLanguage/FBInstant.setSessionData|FBInstant.setSessionData]] ''<translate>Sets the data associated with the individual gameplay session for the current context.</translate>''<br/><!-- GIDEROSMTD:FBInstant.setSessionData(sessionData) Sets the data associated with the individual gameplay session for the current context. --> [[Special:MyLanguage/FBInstant.shareAsync|FBInstant.shareAsync]] ''<translate>This invokes a dialog to let the user share specified content.</translate>''<br/><!-- GIDEROSMTD:FBInstant.shareAsync(payload,callback) This invokes a dialog to let the user share specified content. --> [[Special:MyLanguage/FBInstant.startGameAsync|FBInstant.startGameAsync]] ''<translate>This indicates that the game has finished initial loading and is ready to start.</translate>''<br/><!-- GIDEROSMTD:FBInstant.startGameAsync(callback) This indicates that the game has finished initial loading and is ready to start. --> [[Special:MyLanguage/FBInstant.switchGameAsync|FBInstant.switchGameAsync]] ''<translate>Request that the client switch to a different Instant Game.</translate>''<br/><!-- GIDEROSMTD:FBInstant.switchGameAsync(appID,data,callback) Request that the client switch to a different Instant Game. --> [[Special:MyLanguage/FBInstant.updateAsync|FBInstant.updateAsync]] ''<translate>Informs Facebook of an update that occurred in the game.</translate>''<br/><!-- GIDEROSMTD:FBInstant.updateAsync(payload,callback) Informs Facebook of an update that occurred in the game. --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} 2i9n3dpiclqe3lzcln9ernfyufpb1gr FBInstant.canCreateShortcutAsync 0 974 10798 8432 2018-09-03T08:59:59Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3.1<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> Returns whether or not the user is eligible to have shortcut creation requested.<br /> <br /></translate> <source lang="lua"> FBInstant.canCreateShortcutAsync(callback) </source> === <translate>Parameters</translate> === '''callback''': (function) <translate>A function that will be called with two arguments: Will return true if the game can request the player create a shortcut to the game, and false otherwise and an error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.canCreateShortcutAsync(function(result,error) if result then print("Can creater shortcut") else print("Can't create shortcut") end end) <br/></source> 5h9qs3ausf7gbnbrighltorfdy4d8bf FBInstant.checkCanPlayerMatchAsync 0 1040 10492 8484 2018-09-03T08:59:24Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> Checks if the current player is eligible for the matchPlayerAsync API.<br /> <br /></translate> <source lang="lua"> FBInstant.checkCanPlayerMatchAsync(callback) </source> === <translate>Parameters</translate> === '''callback''': (function) <translate>A function that will be called with two arguments: True if the player is eligible to match with other players and false otherwise. An error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.checkCanPlayerMatchAsync( function(result,error) if result then FBInstant.matchPlayerAsync("level1", function(result,error) print(FBInstant.context.getID()) -- eg 12345 end) end end) <br/></source> 2i7slnqsu33lytqkwgprq0fvjtgvu4u FBInstant.context 0 72 14919 11658 2019-12-09T12:36:37Z MoKaLux 19 MoKaLux moved page [[Context]] to [[FBInstant.context]]: antix wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Context --> '''<translate>Supported platforms</translate>:''' [[File:Platform html5.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> === <translate>Description</translate> === <translate><br /> Contains functions and properties related to the current game context.<br /></translate> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/FBInstant.context.chooseAsync|FBInstant.context.chooseAsync]] ''<translate>Opens a context selection dialog for the player.</translate>''<br/><!-- GIDEROSMTD:FBInstant.context.chooseAsync(options,callback) Opens a context selection dialog for the player. --> [[Special:MyLanguage/FBInstant.context.createAsync|FBInstant.context.createAsync]] ''<translate>Attempts to create or switch into a context between a specified player and the current player.</translate>''<br/><!-- GIDEROSMTD:FBInstant.context.createAsync(id,callback) Attempts to create or switch into a context between a specified player and the current player. --> [[Special:MyLanguage/FBInstant.context.getID|FBInstant.context.getID]] ''<translate>A unique identifier for the current game context.</translate>''<br/><!-- GIDEROSMTD:FBInstant.context.getID() A unique identifier for the current game context. --> [[Special:MyLanguage/FBInstant.context.getPlayersAsync|FBInstant.context.getPlayersAsync]] ''<translate>Gets an table of #contextplayer objects containing information about active players.</translate>''<br/><!-- GIDEROSMTD:FBInstant.context.getPlayersAsync(callback) Gets an table of #contextplayer objects containing information about active players. --> [[Special:MyLanguage/FBInstant.context.getType|FBInstant.context.getType]] ''<translate>The type of the current game context.</translate>''<br/><!-- GIDEROSMTD:FBInstant.context.getType() The type of the current game context. --> [[Special:MyLanguage/FBInstant.context.isSizeBetween|FBInstant.context.isSizeBetween]] ''<translate>Determines whether the number of participants in the current game context is between a given minimum and maximum.</translate>''<br/><!-- GIDEROSMTD:FBInstant.context.isSizeBetween(minSize,maxSize) Determines whether the number of participants in the current game context is between a given minimum and maximum. --> [[Special:MyLanguage/FBInstant.context.switchAsync|FBInstant.context.switchAsync]] ''<translate>Request a switch into a specific context.</translate>''<br/><!-- GIDEROSMTD:FBInstant.context.switchAsync(id,callback) Request a switch into a specific context. --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} lu1b003gacbdobhlgl2uqjesmc8y22h FBInstant.context.chooseAsync 0 981 10438 8436 2018-09-03T08:59:12Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Context|Context]]<br/> === <translate>Description</translate> === <translate><br /> Opens a context selection dialog for the player. If the player selects an available context, the client will attempt to switch into that context, and resolve if successful. Otherwise, if the player exits the menu or the client fails to switch into the new context, this function will reject.<br /> <br /></translate> <source lang="lua"> FBInstant.context.chooseAsync(options,callback) </source> === <translate>Parameters</translate> === '''options''': (table) <translate>A table specifying conditions on the contexts that should be offered.</translate> '''optional'''<br/> '''callback''': (function) <translate>A function that will be called with two arguments: true when the game has switched into the context chosen by the user. Otherwise, the promise will reject (if the user cancels out of the dialog, for example) and an error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> print(FBInstant.context.getID()) -- eg returns 1122334455 FBInstant.context.chooseAsync(nil, function(result,error) if result then print(FBInstant.context.getID()) -- eg returns 1234567890 end end) <br/></source> '''Example 2'''<br/> <source lang="lua"> print(FBInstant.context.getID()) -- eg returns 1122334455 -- A filter that may be applied to a Context Choose operation: -- 'NEW_CONTEXT_ONLY' - Prefer to only surface contexts the game has not been played in before. -- 'INCLUDE_EXISTING_CHALLENGES' - Include the "Existing Challenges" section, which surfaces actively played-in contexts that the player is a part of. -- 'NEW_PLAYERS_ONLY' - In sections containing individuals, prefer people who have not played the game. FBInstant.context.chooseAsync({filters={"NEW_CONTENT_ONLY"},minSize=3,maxSize=5}, function(result,error) if result then print(FBInstant.context.getID()) -- eg returns 1234567890 end end) <br/></source> j0t7dq99oovqlqzr3rxbv37b52z98cd FBInstant.context.createAsync 0 696 10244 8283 2018-09-03T08:58:28Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Context|Context]]<br/> === <translate>Description</translate> === <translate><br /> Attempts to create or switch into a context between a specified player and the current player. The returned promise will reject if the player listed is not a Connected Player of the current player or if the player does not provide permission to enter the new context. Otherwise, the promise will resolve when the game has switched into the new context.<br /> <br /></translate> <source lang="lua"> FBInstant.context.createAsync(id,callback) </source> === <translate>Parameters</translate> === '''id''': (string) <translate>ID of the player.</translate> <br/> '''callback''': (function) <translate>A function that will be called with two arguments: true when the game has switched into the new context or nil if the operation failed, and an error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> print(FBInstant.context.getID()) -- eg returns 1122334455 FBInstant.context.createAsync("12345678", function(result,error) if result then print(FBInstant.context.getID()) -- eg returns 5544332211 end end) <br/></source> e6536zxltdjyi19raearh3sj511av14 FBInstant.context.getID 0 1121 10580 8227 2018-09-03T08:59:37Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Context|Context]]<br/> === <translate>Description</translate> === <translate><br /> A unique identifier for the current game context. This represents a specific context that the game is being played in (for example, a particular messenger conversation or facebook post). The identifier will be null if game is being played in a solo context. The result is not guaranteed to be correct until FBInstant.startGameAsync has resolved.<br /> <br /></translate> <source lang="lua"> (string) = FBInstant.context.getID() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>A unique identifier for the current game context.</translate><br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> fbContextId=FBInstant.context.getID() if fbContextId~="null" then print("context",fbContextId) FBInstant.getLeaderboardAsync("Highest Level Achievers."..fbContextId,function (e,error) print("group leaderboard event",e) print("group leaderboard error",error) end) else print("You may have tried to access a context high score in solo mode!") end <br/></source> lj01nhprwr1xt418kfkrdf070m5ph5l FBInstant.context.getPlayersAsync 0 387 9838 7482 2018-09-03T08:57:44Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Context|Context]]<br/> === <translate>Description</translate> === <translate><br /> Gets an table of #contextplayer tables containing information about active players (people who played the game in the last 90 days) that are associated with the current context. This may include the current player.<br /> <br /></translate> <source lang="lua"> FBInstant.context.getPlayersAsync(callback) </source> === <translate>Parameters</translate> === '''callback''': (function) <translate>A function that will be called with two arguments: a set of key-value pairs or nil is the operation failed, and an error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example 1'''<br/> <source lang="lua"> FBInstant.context.getPlayersAsync(function(result,error) if result then print("Active players:",#result) for loop=1,#result do local player=result[loop] for key,value in pairs(player) do print(key,value) end end end end) <br/></source> '''Example 2'''<br/> <source lang="lua"> FBInstant.context.getPlayersAsync(function(result,error) if result then print("Active players:",#result) for loop=1,#result do local player=result[loop] print("id,name,photo",player.getID(),player.getName(),player.getPhoto()) end end end) <br/></source> 62bo8uoqhtn2qehmtjf3o7v87w36dgr FBInstant.context.getType 0 653 10191 7825 2018-09-03T08:58:21Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Context|Context]]<br/> === <translate>Description</translate> === <translate><br /> The type of the current game context. POST - A facebook post. THREAD - A messenger thread. GROUP - A facebook group. SOLO - Default context, where the player is the only participant.<br /> <br /></translate> <source lang="lua"> (string) = FBInstant.context.getType() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>Type of the current game context.</translate><br/> 060bv2o229rrni1pyg89whq0kshpmpg FBInstant.context.isSizeBetween 0 457 9923 7564 2018-09-03T08:57:52Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Context|Context]]<br/> === <translate>Description</translate> === <translate><br /> This function determines whether the number of participants in the current game context is between a given minimum and maximum, inclusive. If one of the bounds is null only the other bound will be checked against. It will always return the original result for the first call made in a context in a given game play session. Subsequent calls, regardless of arguments, will return the answer to the original query until a context change occurs and the query result is reset.<br /> <br /></translate> <source lang="lua"> (table) = FBInstant.context.isSizeBetween(minSize,maxSize) </source> === <translate>Parameters</translate> === '''minSize''': (number) <translate>The minimum bound of the context size query.</translate> <br/> '''maxSize''': (number) <translate>The maximum bound of the context size query.</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>Table containing answers to the query.</translate><br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> result=FBInstant.context.isSizeBetween(3,5) if result then print("Answer",result.answer) print("MinSize",result.minSize) print("MaxSize",result.maxSize) <br/></source> cjohoft1wd4m2odpg1skomcbh98quj7 FBInstant.context.switchAsync 0 581 10096 7730 2018-09-03T08:58:10Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Context|Context]]<br/> === <translate>Description</translate> === <translate><br /> Request a switch into a specific context. If the player does not have permission to enter that context, or if the player does not provide permission for the game to enter that context, this will reject. Otherwise, the promise will resolve when the game has switched into the specified context.<br /> <br /></translate> <source lang="lua"> FBInstant.context.switchAsync(id,callback) </source> === <translate>Parameters</translate> === '''id''': (string) <translate>ID of the desired context.</translate> <br/> '''callback''': (function) <translate>A function that will be called with two arguments: true when the game has switched into the specified context or nil if the operation failed, and an error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> print(FBInstant.context.getID()) -- eg returns 1122334455 FBInstant.context.switchAsync("1234567890", function(result,error) if result then print(FBInstant.context.getID()) -- eg returns 1234567890 end end) <br/></source> lym4x3asa8ptqv235yddrwunbfqyyzw FBInstant.createShortcutAsync 0 336 9767 7416 2018-09-03T08:57:36Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3.1<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> Prompts the user to create a shortcut to the game if they are eligible to Can only be called once per session.<br /> <br /></translate> <source lang="lua"> FBInstant.createShortcutAsync(callback) </source> === <translate>Parameters</translate> === '''callback''': (function) <translate>A function that will be called with two arguments: Will return false if createShortcutAsync was already called this session or the user is ineligible for shortcut creation and an error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.createShortcutAsync(function(result,error) if result then print("Created shortcut") else print("Can't create shortcut") end end) <br/></source> rav1gq9xjfi7uh3kqshxvlpfngt3jub FBInstant.getEntryPointAsync 0 688 10239 8281 2018-09-03T08:58:26Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> Returns the entry point that the game was launched from.<br /> <br /></translate> <source lang="lua"> FBInstant.getEntryPointAsync(callback) </source> === <translate>Parameters</translate> === '''callback''': (function) <translate>A function that will be called with two arguments: The name of the entry point from which the user started the game or nil if the operation failed, and an error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.getEntryPointAsync( function(result,error) if result then print("Entry point:",result) end end) <br/></source> agno1r9ldyz4tb72k17xw6omjg741e5 FBInstant.getEntryPointData 0 958 10413 8052 2018-09-03T08:59:07Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> Returns any data object associated with the entry point that the game was launched from. The contents of the object are developer-defined, and can occur from entry points on different platforms. This will return null for older mobile clients, as well as when there is no data associated with the particular entry point.<br /> <br /></translate> <source lang="lua"> (table) = FBInstant.getEntryPointData() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>Data associated with the current entry point.</translate><br/> cjgrqouzwy6vi43f1bsoh5cg3zcn07a FBInstant.getInterstitialAdAsync 0 526 10030 7665 2018-09-03T08:58:04Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> Attempt to create an instance of interstitial ad. This instance can then be preloaded and presented.<br /> <br /></translate> <source lang="lua"> FBInstant.getInterstitialAdAsync(placementID,callback) </source> === <translate>Parameters</translate> === '''placementID''': (string) <translate>The placement ID that's been setup in your Audience Network settings.</translate> <br/> '''callback''': (function) <translate>A function that will be called with two arguments: Resolves with a #adinstance, or rejects with a #apierror if it couldn't be created. An error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.getInterstitialAdAsync("my_placement_ad", function(result,error) print("getInterstitialAdAsync result:",result) end) <br/></source> '''Example 2'''<br/> <source lang="lua"> FBInstant.getInterstitialAdAsync("my_placement_ad", function(result,error) print("id:",result.getPlacementID()) -- the Audience Network placement ID of this ad instance. result:loadAsync( function () -- Preload the ad. The returned promise resolves when the preload completes, and rejects if it failed. print("Advert loaded!") end) end) <br/></source> awgmxx3amg534bsyjt6lrnk1eiummeo FBInstant.getLeaderboardAsync 0 631 13040 10185 2019-01-12T21:23:18Z Anthony 1 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> Fetch a specific leaderboard belonging to this Instant Game.<br /> <br /></translate> <source lang="lua"> FBInstant.getLeaderboardAsync(name,callback) </source> === <translate>Parameters</translate> === '''name''': (string) <translate>The name of the leaderboard. Each leaderboard for an Instant Game must have its own distinct name.</translate> <br/> '''callback''': (function) <translate>A function that will be called with two arguments: Result with the matching leaderboard, rejecting if one is not found. An error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.getLeaderboardAsync("my_aweome_leaderboard", function(result,error) print("getLeaderboardAsync result:",result) end) <br/></source> '''Example 2'''<br/> <source lang="lua"> FBInstant.getLeaderboardAsync("my_aweome_leaderboard", function(result,error) print("name",result:getName()) -- should display 'my__awesome_leaderboard' print("context id",result:getContextID()) -- eg 12345678 or null if not tied to a context result:getEntryCountAsync( function (result,error) -- Fetches the total number of player entries in the leaderboard. if result then print("Count",result) end end) --Update the player's score. If the player has an existing score, the old score will only be replaced if the new score is better than it. -- NOTE: If the leaderboard is associated with a specific context, the game must be in that context to set a score for the player. result:setScoreAsync(level,FBInstant.player.getName(),function(self,result,entry) if result then print("score ok",entry) for key,val in pairs(entry.entry) do print(key,val) end end end) -- Retrieves the leaderboard's entry for the current player, or null if the player has not set one yet. result:getPlayerEntryAsync( function (self,result,entry) if entry and entry.entry then -- important you check this as it may not exist... for key,val in pairs(entry.entry) do print(key,val) if key=="player" then for key2,val2 in pairs(val) do print(" ",key2,val2) end end end end end) -- Retrieve a set of leaderboard entries, ordered by score ranking in the leaderboard. -- parameter: count number The number of entries to attempt to fetch from the leaderboard. Defaults to 10 if not specified. Up to a maximum of 100 entries may be fetched per query. -- parameter: offset number The offset from the top of the leaderboard that entries will be fetched from. result:getEntriesAsync(10,0,function(self,result,entries) print(self,result,entries) for loop=1,#entries do local e=entries[loop].entry print("at entry",loop) for key,val in pairs(e) do print(key,val) if key=="player" then for key2,val2 in pairs(val) do print(" ",key2,val2) end end end end end) -- Most useful of all: -- Retrieve a set of connected player leaderboard entries, ordered by score ranking in the leaderboard. -- parameter: count number The number of entries to attempt to fetch from the leaderboard. Defaults to 10 if not specified. Up to a maximum of 100 entries may be fetched per query. -- parameter: offset number The offset from the top of the leaderboard that entries will be fetched from. result:getConnectedPlayerEntriesAsync(10,0,function(self,result,entries) print(self,result,entries) for loop=1,#entries do local e=entries[loop].entry print("at entry",loop) for key,val in pairs(e) do print(key,val) if key=="player" then for key2,val2 in pairs(val) do print(" ",key2,val2) end end end end end) end) <br/></source> '''Example 3 - global leaderboard'''<br/> <source lang="lua"> FBInstant.getLeaderboardAsync("my_aweome_leaderboard",function (e,error) print("global leaderboard event",e) if e then for key,value in pairs(e) do print(key,value) end else print("global leaderboard error",error) end end) <br/></source> '''Example 4 - group leaderboard'''<br/> <source lang="lua"> fbContextId=FBInstant.context.getID() if fbContextId~="null" then print("context",fbContextId) FBInstant.getLeaderboardAsync("Highest Level Achievers."..fbContextId,function (e,error) print("group leaderboard event",e) print("group leaderboard error",error) end) else print("You may have tried to access a context high score in solo mode!") end <br/></source> 4ft07r0np3rj2zivmste4mmbipvtu00 FBInstant.getLocale 0 1143 10605 8251 2018-09-03T08:59:39Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> The current locale. See https://www.facebook.com/translations/FacebookLocales.xml for a complete list of supported locale values. Use this to determine what language the current game should be localized with.<br /> <br /> The locale string returned is a five-character Facebook locale code of the form xx_XX. <br /></translate> <source lang="lua"> (string) = FBInstant.getLocale() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>The current locale.</translate><br/> kegl50ycfllgmgeq2wkhbyeno4rovf9 FBInstant.getPlatform 0 842 10702 7993 2018-09-03T08:59:49Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> The platform on which the game is currently running.<br /> <br /> Can be "IOS", "ANDROID", "WEB" or "MOBILE_WEB". <br /></translate> <source lang="lua"> (string) = FBInstant.getPlatform() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>The current platform.</translate><br/> 4gn1ilz8ffhj7lyjcmhui9l3c5don65 FBInstant.getRewardedVideoAsync 0 270 9693 7333 2018-09-03T08:57:28Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> Attempt to create an instance of rewarded video. This instance can then be preloaded and presented.<br /> <br /></translate> <source lang="lua"> FBInstant.getRewardedVideoAsync(placementID,callback) </source> === <translate>Parameters</translate> === '''placementID''': (string) <translate>The placement ID that's been setup in your Audience Network settings.</translate> <br/> '''callback''': (function) <translate>A function that will be called with two arguments: Resolves with a #adinstance, or rejects with a #apierror if it couldn't be created. An error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.getRewardedVideoAsync("my_placement_ad", function(result,error) print("getRewardedVideoAsync result:",result) end) <br/></source> '''Example 2'''<br/> <source lang="lua"> FBInstant.getRewardedVideoAsync("my_placement_ad", function(result,error) advert = result -- make a global of the result advert:loadAsync( function () -- Preload the reward advert. print("Advert loaded!") advert:showAsync( function () -- show the reward advert. print("Reward advert watched!") end) end) end) <br/></source> fb63m9bc93vv1ull3bol4z429i7qnhe FBInstant.getSDKVersion 0 786 10674 7927 2018-09-03T08:59:47Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> The platform on which the game is currently running.<br /> <br /></translate> <source lang="lua"> (string) = FBInstant.getSDKVersion() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>The SDK version.</translate><br/> 8zuuh3l6px48g9x58gdsnztxfo76e6t FBInstant.getSupportedAPIs 0 760 10667 8314 2018-09-03T08:59:46Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> Provides a table of API functions that are supported by the client.<br /> <br /></translate> <source lang="lua"> (table) = FBInstant.getSupportedAPIs() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>Table of API functions that the client explicitly supports.</translate><br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.getSupportedAPIs( function(result,error) if result then print("Number of functions:",#result) for loop=1,#result do print(result[loop]) end end end) <br/></source> 1dvfkykze14ezajl050s9w0tjaew3o5 FBInstant.logEvent 0 466 9941 7586 2018-09-03T08:57:54Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> Log an app event with FB Analytics. See https://developers.facebook.com/docs/javascript/reference/v2.8#app_events for more details about FB Analytics.<br /></translate> <source lang="lua"> FBInstant.logEvent(eventName,valueToSum,parameters) </source> === <translate>Parameters</translate> === '''eventName''': (string) <translate>Name of the event. Must be 2 to 40 characters, and can only contain '_', '-', ' ', and alphanumeric characters.</translate> <br/> '''valueToSum''': (numbere) <translate>An optional numeric value that FB Analytics can calculate a sum with.</translate> '''optional'''<br/> '''parameters''': (table) <translate>An optional table that can contain up to 25 key-value pairs to be logged with the event. Keys must be 2 to 40 characters, and can only contain '_', '-', ' ', and alphanumeric characters. Values must be less than 100 characters in length.</translate> '''optional'''<br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.logEvent("my_custom_event",42,{custom_property="custom_value"}) <br/></source> af04yu9i12lx29bfx299emppxu90w7i FBInstant.matchPlayerAsync 0 242 9650 7303 2018-09-03T08:57:24Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3.1<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> Attempts to match the current player with other users looking for people to play with. If successful, a new Messenger group thread will be created containing the matched players and the player will be context switched to that thread. The default minimum and maximum number of players in one matched thread are 2 and 20 respectively, depending on how many players are trying to get matched around the same time. The values can be changed in fbapp-config.json. See the [Bundle Config documentation]https://developers.facebook.com/docs/games/instant-games/bundle-config for documentation about fbapp-config.json.<br /> <br /></translate> <source lang="lua"> FBInstant.matchPlayerAsync(matchTag,switchContextWhenMatched,callback) </source> === <translate>Parameters</translate> === '''matchTag''': (string) <translate>Optional extra information about the player used to group them with similar players. Players will only be grouped with other players with exactly the same tag. The tag must only include letters, numbers, and underscores and be 100 characters or less in length.</translate> '''optional'''<br/> '''switchContextWhenMatched''': (boolean) <translate>Optional extra parameter that specifies whether the player should be immediately switched to the new context when a match is found. By default this will be false which will mean the player needs explicitly press play after being matched to switch to the new context.</translate> '''optional'''<br/> '''callback''': (function) <translate>A function that will be called with two arguments: True when the player has been added to a group thread and switched into the thread's context. An error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.matchPlayerAsync("level1", function(result,error) print(FBInstant.context.getID()) -- eg 12345 end) <br/></source> '''Example 2'''<br/> <source lang="lua"> FBInstant.matchPlayerAsync(nil, function(result,error) print(FBInstant.context.getID()) -- eg 34567 end) <br/></source> gfqsx9jqa5uvbfsoercpu34y1n7vv4v FBInstant.onPause 0 1145 10608 8255 2018-09-03T08:59:40Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> Set a callback to be fired when a pause event is triggered.<br /> <br /></translate> <source lang="lua"> FBInstant.onPause(callback) </source> === <translate>Parameters</translate> === '''callback''': (function) <translate>A function to call when a pause event occurs.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.onPause( function() print("Pause event was triggered.") end) <br/></source> mgd5p0glzdqbljp4wbhrukn1vag1u1f FBInstant.payments 0 23 14921 11645 2019-12-09T12:38:48Z MoKaLux 19 MoKaLux moved page [[Payments]] to [[FBInstant.payments]]: antix wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Payments --> '''<translate>Supported platforms</translate>:''' [[File:Platform html5.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> === <translate>Description</translate> === <translate><br /> Contains functions and properties related to payments and purchases of game products.<br /></translate> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/FBInstant.payments.consumePurchaseAsync|FBInstant.payments.consumePurchaseAsync]] ''<translate>Consumes a specific purchase belonging to the current player.</translate>''<br/><!-- GIDEROSMTD:FBInstant.payments.consumePurchaseAsync(purchaseToken,callback) Consumes a specific purchase belonging to the current player. --> [[Special:MyLanguage/FBInstant.payments.getCatalogAsync|FBInstant.payments.getCatalogAsync]] ''<translate>Fetches the game's product catalog.</translate>''<br/><!-- GIDEROSMTD:FBInstant.payments.getCatalogAsync(callback) Fetches the game's product catalog. --> [[Special:MyLanguage/FBInstant.payments.getPurchasesAsync|FBInstant.payments.getPurchasesAsync]] ''<translate>Fetches all of the player's unconsumed purchases.</translate>''<br/><!-- GIDEROSMTD:FBInstant.payments.getPurchasesAsync(callback) Fetches all of the player's unconsumed purchases. --> [[Special:MyLanguage/FBInstant.payments.onReady|FBInstant.payments.onReady]] ''<translate>Sets a callback to be triggered when Payments operations are available.</translate>''<br/><!-- GIDEROSMTD:FBInstant.payments.onReady(callback) Sets a callback to be triggered when Payments operations are available. --> [[Special:MyLanguage/FBInstant.payments.purchaseAsync|FBInstant.payments.purchaseAsync]] ''<translate>Begins the purchase flow for a specific product.</translate>''<br/><!-- GIDEROSMTD:FBInstant.payments.purchaseAsync(purchaseConfig,callback) Begins the purchase flow for a specific product. --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} ry7knlpi3k5rl4e8z9uith9mtddrn15 FBInstant.payments.consumePurchaseAsync 0 359 9806 7445 2018-09-03T08:57:40Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Payments|Payments]]<br/> === <translate>Description</translate> === <translate><br /> Consumes a specific purchase belonging to the current player. Before provisioning a product's effects to the player, the game should request the consumption of the purchased product. Once the purchase is successfully consumed, the game should immediately provide the player with the effects of their purchase.<br /> <br /></translate> <source lang="lua"> FBInstant.payments.consumePurchaseAsync(purchaseToken,callback) </source> === <translate>Parameters</translate> === '''purchaseToken''': (string) <translate>The purchase token of the purchase that should be consumed.</translate> <br/> '''callback''': (function) <translate>A function that will be called with two arguments: True when the purchase has been consumed successfully otherwise the operation failed, and an error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.payments.consumePurchaseAsync("54321", function(result,error) if result then print("Consumed!") end end) <br/></source> 5vdrfsw8ee02cw9dyvmi1uzy6odb1qa FBInstant.payments.getCatalogAsync 0 308 9740 7392 2018-09-03T08:57:33Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Payments|Payments]]<br/> === <translate>Description</translate> === <translate><br /> Fetches the game's product catalog.<br /> <br /></translate> <source lang="lua"> FBInstant.payments.getCatalogAsync(callback) </source> === <translate>Parameters</translate> === '''callback''': (function) <translate>A function that will be called with two arguments: a set of key-value pairs that are the products that are registered to the game or nil if the operation failed, and an error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example 1'''<br/> <source lang="lua"> FBInstant.payments.getCatalogAsync(function(result,error) if result then for key,value in pairs(result) do print(key,value) end end end) <br/></source> '''Example 2'''<br/> <source lang="lua"> FBInstant.payments.getCatalogAsync(function(result,error) if result then for loop=1,#result do local p=result[loop] print("title,id,description,umage,price,currency",p.title,p.productID,p.description,p.imageURI,p.price,p.priceCurrencyCode) end end end) <br/></source> fy7xkynr8kkvv89hewth77rg4pvlx0l FBInstant.payments.getPurchasesAsync 0 947 10410 8415 2018-09-03T08:59:05Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Payments|Payments]]<br/> === <translate>Description</translate> === <translate><br /> Fetches all of the player's unconsumed purchases. As a best practice, the game should fetch the current player's purchases as soon as the client indicates that it is ready to perform payments-related operations. The game can then process and consume any purchases that are waiting to be consumed.<br /> <br /></translate> <source lang="lua"> FBInstant.payments.getPurchasesAsync(callback) </source> === <translate>Parameters</translate> === '''callback''': (function) <translate>A function that will be called with two arguments: a set of key-value pairs that purchases that the player has made for the game or nil if the operation failed, and an error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.payments.getPurchasesAsync(function(result,error) if result then print("Unconsumed purchases:",#result) for loop=1,#result do local item=result[loop] for key,value in pairs(item) do print(key,value) end end end end) <br/></source> 9i14meedtdq2br0v9kpxys616ymgnqi FBInstant.payments.onReady 0 954 10784 8422 2018-09-03T08:59:57Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Payments|Payments]]<br/> === <translate>Description</translate> === <translate><br /> Sets a callback to be triggered when Payments operations are available.<br /> <br /></translate> <source lang="lua"> FBInstant.payments.onReady(callback) </source> === <translate>Parameters</translate> === '''callback''': (function) <translate>A functionto be executed when Payments are available</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.payments.onReady(function() print("Payments Ready!") end) <br/></source> bp7z8m2p94kx7ekn7jy4zio17s6lbbl FBInstant.payments.purchaseAsync 0 587 10109 7743 2018-09-03T08:58:12Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Payments|Payments]]<br/> === <translate>Description</translate> === <translate><br /> Begins the purchase flow for a specific product.<br /> <br /></translate> <source lang="lua"> FBInstant.payments.purchaseAsync(purchaseConfig,callback) </source> === <translate>Parameters</translate> === '''purchaseConfig''': (table) <translate>The purchase's configuration details.</translate> <br/> '''callback''': (function) <translate>A function that will be called with two arguments: True when the product is successfully purchased by the player. Otherwise, it rejects if the operation failed, and an error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example 1'''<br/> <source lang="lua"> FBInstant.payments.purchaseAsync({productID="12345", developerPayload="foobar"}, function(result,error) if result then print("Purchased!") for key,value in pairs(result) do print(key,value) end end end) <br/></source> '''Example 2'''<br/> <source lang="lua"> FBInstant.payments.purchaseAsync({productID="12345", developerPayload="foobar"}, function(result,error) if result then print("Purchased!") print("developer string",result.developerPayload) print("payment id",result.paymentID) print("product id",result.productID) print("purchaseTime",result.purchaseTime) print("puchaseToken",result.purchaseToken) print("signedRequest",result.signedRequest) end end) <br/></source> lk3izo5d7qjbtbost41qped2io6h1af FBInstant.player 0 93 14923 11615 2019-12-09T12:39:58Z MoKaLux 19 MoKaLux moved page [[Player]] to [[FBInstant.player]]: antix wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Player --> '''<translate>Supported platforms</translate>:''' [[File:Platform html5.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> === <translate>Description</translate> === <translate><br /> Contains functions and properties related to the current player.<br /></translate> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/FBInstant.player.canSubscribeBotAsync|FBInstant.player.canSubscribeBotAsync]] ''<translate>Whether a player can subscribe to the game bot or not.</translate>''<br/><!-- GIDEROSMTD:FBInstant.player.canSubscribeBotAsync(callback) Whether a player can subscribe to the game bot or not. --> [[Special:MyLanguage/FBInstant.player.flushDataAsync|FBInstant.player.flushDataAsync]] ''<translate>Immediately flushes any changes to the player data to the designated cloud storage.</translate>''<br/><!-- GIDEROSMTD:FBInstant.player.flushDataAsync(callback) Immediately flushes any changes to the player data to the designated cloud storage. --> [[Special:MyLanguage/FBInstant.player.getConnectedPlayersAsync|FBInstant.player.getConnectedPlayersAsync]] ''<translate>Fetches a table of ConnectedPlayer tables.</translate>''<br/><!-- GIDEROSMTD:FBInstant.player.getConnectedPlayersAsync(callback) Fetches a table of ConnectedPlayer tables. --> [[Special:MyLanguage/FBInstant.player.getDataAsync|FBInstant.player.getDataAsync]] ''<translate>Retrieve data from the designated cloud storage of the current player.</translate>''<br/><!-- GIDEROSMTD:FBInstant.player.getDataAsync(keys,callback) Retrieve data from the designated cloud storage of the current player. --> [[Special:MyLanguage/FBInstant.player.getID|FBInstant.player.getID]] ''<translate>A unique identifier for the player.</translate>''<br/><!-- GIDEROSMTD:FBInstant.player.getID() A unique identifier for the player. --> [[Special:MyLanguage/FBInstant.player.getName|FBInstant.player.getName]] ''<translate>The player's localized display name.</translate>''<br/><!-- GIDEROSMTD:FBInstant.player.getName() The player's localized display name. --> [[Special:MyLanguage/FBInstant.player.getPhoto|FBInstant.player.getPhoto]] ''<translate>A url to the player's public profile photo.</translate>''<br/><!-- GIDEROSMTD:FBInstant.player.getPhoto() A url to the player's public profile photo. --> [[Special:MyLanguage/FBInstant.player.getSignedPlayerInfoAsync|FBInstant.player.getSignedPlayerInfoAsync]] ''<translate>Fetch the player's unique identifier along with a signature.</translate>''<br/><!-- GIDEROSMTD:FBInstant.player.getSignedPlayerInfoAsync(requestPayload,callback) Fetch the player's unique identifier along with a signature. --> [[Special:MyLanguage/FBInstant.player.getStatsAsync|FBInstant.player.getStatsAsync]] ''<translate>Retrieve stats from the designated cloud storage of the current player.</translate>''<br/><!-- GIDEROSMTD:FBInstant.player.getStatsAsync(keys,callback) Retrieve stats from the designated cloud storage of the current player. --> [[Special:MyLanguage/FBInstant.player.incrementStatsAsync|FBInstant.player.incrementStatsAsync]] ''<translate>Increment stats saved in the designated cloud storage of the current player.</translate>''<br/><!-- GIDEROSMTD:FBInstant.player.incrementStatsAsync(keys-value-pairs,callback) Increment stats saved in the designated cloud storage of the current player. --> [[Special:MyLanguage/FBInstant.player.setDataAsync|FBInstant.player.setDataAsync]] ''<translate>Set data to be saved to the designated cloud storage of the current player.</translate>''<br/><!-- GIDEROSMTD:FBInstant.player.setDataAsync(keys-value-pairs,callback) Set data to be saved to the designated cloud storage of the current player. --> [[Special:MyLanguage/FBInstant.player.setStatsAsync|FBInstant.player.setStatsAsync]] ''<translate>Set stats to be saved to the designated cloud storage of the current player.</translate>''<br/><!-- GIDEROSMTD:FBInstant.player.setStatsAsync(keys-value-pairs,callback) Set stats to be saved to the designated cloud storage of the current player. --> [[Special:MyLanguage/FBInstant.player.subscribeBotAsync|FBInstant.player.subscribeBotAsync]] ''<translate>Request that the player subscribe the bot associated to the game.</translate>''<br/><!-- GIDEROSMTD:FBInstant.player.subscribeBotAsync(callback) Request that the player subscribe the bot associated to the game. --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} f7latn3xaat8k7z838fyeu26666xwj4 FBInstant.player.canSubscribeBotAsync 0 858 10716 8365 2018-09-03T08:59:51Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3.1<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Player|Player]]<br/> === <translate>Description</translate> === <translate><br /> Whether a player can subscribe to the game bot or not. Developer can only call subscribeBotAsync() after checking canSubscribeBotAsync(), and the player will only be able to see this bot subscription dialog once for a specific game.<br /></translate> <source lang="lua"> FBInstant.player.canSubscribeBotAsync(callback) </source> === <translate>Parameters</translate> === '''callback''': (function) <translate>A function that will be called with two arguments: a boolean or nil is the operation failed, and an error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.player.canSubscribeBotAsync(function(result,error) if result then print("Can subscribe") else print("Can't subscribe") end end) <br/></source> regginytza8dlhfdpx6ymxnnqxmqpl7 FBInstant.player.flushDataAsync 0 313 9745 7386 2018-09-03T08:57:34Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Player|Player]]<br/> === <translate>Description</translate> === <translate><br /> Immediately flushes any changes to the player data to the designated cloud storage. This function is expensive, and should primarily be used for critical changes where persistence needs to be immediate and known by the game. Non-critical changes should rely on the platform to persist them in the background. NOTE: Calls to player.setDataAsync will be rejected while this function's result is pending.<br /> <br /></translate> <source lang="lua"> FBInstant.player.flushDataAsync(callback) </source> === <translate>Parameters</translate> === '''callback''': (function) <translate>A function that will be called with two arguments: true when changes have been persisted successfully or nil if the operation failed, and an error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.player.setDataAsync({achievements={"medal1","medal2","medal3"},currentLife=300}, function(result,error) if result then FBInstant.player.flushDataAsync(function (result,error) if result then print("Data persisted to FB!") end end) end end) <br/></source> 36jueekfseato825myg15deld0wffui FBInstant.player.getConnectedPlayersAsync 0 287 9713 7359 2018-09-03T08:57:30Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Player|Player]]<br/> === <translate>Description</translate> === <translate><br /> Fetches a table of ConnectedPlayer tables containing information about players that are connected to the current player.<br /> <br /></translate> <source lang="lua"> FBInstant.player.getConnectedPlayersAsync(callback) </source> === <translate>Parameters</translate> === '''callback''': (function) <translate>A function that will be called with two arguments: a set of key-value pairs or nil is the operation failed, and an error code if the function failed. NOTE: This promise will not resolve until FBInstant.startGameAsync() has resolved.</translate> <br/> === <translate>Examples</translate> === '''Example 1'''<br/> <source lang="lua"> FBInstant.player.getConnectedPlayersAsync(function(result,error) if result then print("Connected players:",#result) for loop=1,#result do local player=result[loop] for key,value in pairs(player) do print(key,value) end end end end) <br/></source> '''Example 2'''<br/> <source lang="lua"> FBInstant.player.getConnectedPlayersAsync(function(result,error) if result then print("Connected players:",#result) for loop=1,#result do local player=result[loop] print("id, name, photo:",player.getID(),player.getName(),player.getPhoto()) end end end) <br/></source> i3wf15ga0ask0m5wqpuddvlaa9ykaqa FBInstant.player.getDataAsync 0 1021 10823 8469 2018-09-03T09:00:04Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Player|Player]]<br/> === <translate>Description</translate> === <translate><br /> Retrieve data from the designated cloud storage of the current player.<br /> <br /></translate> <source lang="lua"> FBInstant.player.getDataAsync(keys,callback) </source> === <translate>Parameters</translate> === '''keys''': (table) <translate>An array of unique keys to retrieve data for.</translate> <br/> '''callback''': (function) <translate>A function that will be called with two arguments: a set of key-value pairs or nil is the operation failed, and an error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.player.getDataAsync({"achievements","currentLife"}, function(result,error) if result then for key,value in pairs(result) do print(key,value) end end end) <br/></source> dt1s9pvy8i2ssu9riupon0f2vp02zx2 FBInstant.player.getID 0 1126 10585 8231 2018-09-03T08:59:37Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Player|Player]]<br/> === <translate>Description</translate> === <translate><br /> A unique identifier for the player. A Facebook user's player ID will remain constant, and is scoped to a specific game. This means that different games will have different player IDs for the same user.<br /></translate> <source lang="lua"> (string) = FBInstant.player.getID() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>A unique identifier for the player.</translate><br/> nt4c5dpr3w0963xnibl1wko09gxyg0a FBInstant.player.getName 0 855 10350 7977 2018-09-03T08:58:52Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Player|Player]]<br/> === <translate>Description</translate> === <translate><br /> The player's localized display name.<br /> <br /></translate> <source lang="lua"> (string) = FBInstant.player.getName() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>The player's localized display name.</translate><br/> egxirl3v1fpcpvj521gaw70pmj7eb84 FBInstant.player.getPhoto 0 314 9735 7383 2018-09-03T08:57:33Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Player|Player]]<br/> === <translate>Description</translate> === <translate><br /> A url to the player's public profile photo. The photo will always be a square, and with dimensions of at least 200x200. When rendering it in the game, the exact dimensions should never be assumed to be constant. It's recommended to always scale the image to a desired size before rendering. The value will always be null until FBInstant.startGameAsync() resolves.<br /><br /> WARNING: Due to CORS, using these photos in the game canvas can cause it to be tainted, which will prevent the canvas data from being extracted. To prevent this, set the cross-origin attribute of the images you use to 'anonymous'.<br /> <br /></translate> <source lang="lua"> (string) = FBInstant.player.getPhoto() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>Url to the player's public profile photo.</translate><br/> 32himvsfya88f6zfc9dt9hpsxt4dk6t FBInstant.player.getSignedPlayerInfoAsync 0 837 10337 8497 2018-09-03T08:58:49Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Player|Player]]<br/> === <translate>Description</translate> === <translate><br /> Fetch the player's unique identifier along with a signature that verifies that the identifier indeed comes from Facebook without being tampered with.<br /></translate> <source lang="lua"> FBInstant.player.getSignedPlayerInfoAsync(requestPayload,callback) </source> === <translate>Parameters</translate> === '''requestPayload''': (string) <translate>A developer-specified payload to include in the signed response.</translate> <br/> '''callback''': (function) <translate>A function that will be called with two arguments: a SignedPlayerInfo object or nil is the operation failed, and an error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.player.getSignedPlayerInfoAsync("my_metadata", function(result,error) SendToMyServer( result.getPlayerID(), -- same value as FBInstant.player.getID() result.getSignature(), "GAIN_COINS", 100) end) <br/></source> mh0xgbxft72ugqlodgxyd9fwpqbcw2t FBInstant.player.getStatsAsync 0 309 9736 7387 2018-09-03T08:57:33Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Player|Player]]<br/> === <translate>Description</translate> === <translate><br /> Retrieve stats from the designated cloud storage of the current player.<br /> <br /></translate> <source lang="lua"> FBInstant.player.getStatsAsync(keys,callback) </source> === <translate>Parameters</translate> === '''keys''': (table) <translate>An optional table of unique keys to retrieve stats for. If the function is called with it nil, it will fetch all stats.</translate> <br/> '''callback''': (function) <translate>A function that will be called with two arguments: a set of key-value pairs or nil is the operation failed, and an error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.player.getDataAsync({"level","zombiesSlain"}, function(result,error) if result then print("stats are loaded") for key,value in pairs(result) do print(key,value) end end end) <br/></source> melmqamph8txyobkrbvt5091npbwlgd FBInstant.player.incrementStatsAsync 0 192 9588 7238 2018-09-03T08:57:18Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Player|Player]]<br/> === <translate>Description</translate> === <translate><br /> Increment stats saved in the designated cloud storage of the current player.<br /> <br /></translate> <source lang="lua"> FBInstant.player.incrementStatsAsync(keys-value-pairs,callback) </source> === <translate>Parameters</translate> === '''keys-value-pairs''': (table) <translate>A table containing a set of key-value pairs indicating how much to increment each stat in cloud storage. The object must contain only numerical values - any non-numerical values will cause the entire modification to be rejected.</translate> <br/> '''callback''': (function) <translate>A function that will be called with two arguments: a table which contains the updated key-value pairs for each key specified in the input dictionary or nil if the operation failed, and an error code if the function failed. NOTE: The table does not necessarily mean that the changes have already been persisted. Rather, it means that the increments were valid and have been scheduled to be performed. It also guarantees that all values that were incremented are now available in player.getStatsAsync.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.player.incrementStatsAsync({level=1,zombiesSlain=17,rank=-1}, function(result,error) if result then print("increments have been made! New values:") for key,value in pairs(result) do print(key,value) end end end) <br/></source> f6y37qbf5z72d190ungbnutuw6p6zsk FBInstant.player.setDataAsync 0 411 9862 7509 2018-09-03T08:57:46Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Player|Player]]<br/> === <translate>Description</translate> === <translate><br /> Set data to be saved to the designated cloud storage of the current player. The game can store up to 1MB of data for each unique player.<br /> <br /></translate> <source lang="lua"> FBInstant.player.setDataAsync(keys-value-pairs,callback) </source> === <translate>Parameters</translate> === '''keys-value-pairs''': (table) <translate>A table containing a set of key-value pairs that should be persisted to cloud storage. The object must contain only serializable values - any non-serializable values will cause the entire modification to be rejected.</translate> <br/> '''callback''': (function) <translate>A function that will be called with two arguments: true or nil if the operation failed, and an error code if the function failed. NOTE: True does not necessarily mean that the input has already been persisted. Rather, it means that the data was valid and has been scheduled to be saved. It also guarantees that all values that were set are now available in player.getDataAsync</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.player.setDataAsync({achievements={"medal1","medal2","medal3"},currentLife=300}, function(result,error) if result then print("data is set") end end) <br/></source> qe64emi2n8m1f6zu7e7hfi6w35wd8nt FBInstant.player.setStatsAsync 0 333 9766 7414 2018-09-03T08:57:36Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Player|Player]]<br/> === <translate>Description</translate> === <translate><br /> Set stats to be saved to the designated cloud storage of the current player.<br /> <br /></translate> <source lang="lua"> FBInstant.player.setStatsAsync(keys-value-pairs,callback) </source> === <translate>Parameters</translate> === '''keys-value-pairs''': (table) <translate>A table containing a set of key-value pairs that should be persisted to cloud storage as stats, which can be surfaced or used in a variety of ways to benefit player engagement. The object must contain only numerical values - any non-numerical values will cause the entire modification to be rejected.</translate> <br/> '''callback''': (function) <translate>A function that will be called with two arguments: true or nil if the operation failed, and an error code if the function failed. NOTE: True does not necessarily mean that the input has already been persisted. Rather, it means that the data was valid and has been scheduled to be saved. It also guarantees that all values that were set are now available in player.getDataAsync</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.player.setStatsAsync({level=5,zombiesSlain=27}, function(result,error) if result then print("data is set") end end) <br/></source> mjxquphvuofd0oxac9h7zig76ndq509 FBInstant.player.subscribeBotAsync 0 1100 10554 8198 2018-09-03T08:59:35Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3.1<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Player|Player]]<br/> === <translate>Description</translate> === <translate><br /> Request that the player subscribe the bot associated to the game. The API will reject if the subscription fails - else, the player will subscribe the game bot.<br /></translate> <source lang="lua"> FBInstant.player.subscribeBotAsync(callback) </source> === <translate>Parameters</translate> === '''callback''': (function) <translate>A function that will be called with two arguments: a boolean or nil is the operation failed, and an error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.player.subscribeBotAsync(function(result,error) if result then print("Did subscribe") else print("Failed subscribe") end end) <br/></source> 4x8uiwfmzdt61l5cqqui9h79ayvtgrz FBInstant.quit 0 804 10684 7941 2018-09-03T08:59:47Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> Quits the game.<br /> <br /></translate> <source lang="lua"> FBInstant.quit() </source> 8k4r00ytt6qc5r7tk5ei1wgevi1rc1t FBInstant.setLoadingProgress 0 843 10338 7972 2018-09-03T08:58:50Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> Report the game's initial loading progress.<br /></translate> <source lang="lua"> FBInstant.setLoadingProgress(percentage) </source> === <translate>Parameters</translate> === '''percentage''': (number) <translate>A number between 0 and 100.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.getSupportedAPIs( function(result,error) local progressCount=0 function progress() progressCount+=1 local steps=9 -- set to the number of times progress() called local percent=70+((30/steps)*progressCount) -- on export set the % to 70 print("Progress",progressCount,percent.."%") if FBInstant then FBInstant.setLoadingProgress(percent) end end progress() -- do this multiple times as you load images, process data, etc -- eventually call FBInstant.startGameAsync(function) just before starting the game proper. end) <br/></source> 48o2legqqrityy1ywss8919i26b7snj FBInstant.setSessionData 0 841 10341 8357 2018-09-03T08:58:51Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> Sets the data associated with the individual gameplay session for the current context. This function should be called whenever the game would like to update the current session data. This session data may be used to populate a variety of payloads, such as game play webhooks.<br /></translate> <source lang="lua"> FBInstant.setSessionData(sessionData) </source> === <translate>Parameters</translate> === '''sessionData''': (table) <translate>An arbitrary data table, which must be less than or equal to 1000 characters when stringified.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.setSessionData({coinsEarned=10,eventsSeen={"start","middle"}}) <br/></source> o7c6w75vjdr6nssmv8qtc0nqlpc14ah FBInstant.shareAsync 0 706 10629 8289 2018-09-03T08:59:43Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> This invokes a dialog to let the user share specified content, either as a message in Messenger or as a post on the user's timeline. A blob of data can be attached to the share which every game session launched from the share will be able to access from FBInstant.getEntryPointData(). This data must be less than or equal to 1000 characters when stringified. The user may choose to cancel the share action and close the dialog, and the returned promise will resolve when the dialog is closed regardless if the user actually shared the content or not.<br /> <br /></translate> <source lang="lua"> FBInstant.shareAsync(payload,callback) </source> === <translate>Parameters</translate> === '''payload''': (table) <translate>Specify what to share.</translate> <br/> '''callback''': (function) <translate>A function that will be called with two arguments: True when the share is completed or nil if the operation failed, and an error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> -- intent can be "INVITE", "REQUEST", "CHALLENGE" or "SHARE" FBInstant.shareAsync({intent="REQUEST",image=base64Picture,text="X is asking for your help!",data={myReplyData="..."}}, function(result,error) if result then -- continue with the game. end end) <br/></source> f3e3azq7sqli2hzrz9tuln18xz341w9 FBInstant.startGameAsync 0 174 9566 7216 2018-09-03T08:57:15Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> This indicates that the game has finished initial loading and is ready to start. Context information will be up-to-date when the returned promise resolves.<br /> <br /></translate> <source lang="lua"> FBInstant.startGameAsync(callback) </source> === <translate>Parameters</translate> === '''callback''': (function) <translate>A function that will be called with two arguments: True when the game should start or nil if the operation failed, and an error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.startGameAsync( function(result,error) if result then -- don't call context api until here! end end) <br/></source> acjkgezlj26wsw7ze5jna6lo6mffyd3 FBInstant.switchGameAsync 0 661 10210 7837 2018-09-03T08:58:23Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> Request that the client switch to a different Instant Game. The API will reject if the switch fails - else, the client will load the new game.<br /> <br /></translate> <source lang="lua"> FBInstant.switchGameAsync(appID,data,callback) </source> === <translate>Parameters</translate> === '''appID''': (string) <translate>The Application ID of the Instant Game to switch to. The application must be an Instant Game, and must belong to the same business as the current game. To associate different games with the same business, you can use Business Manager: https://developers.facebook.com/docs/apps/business-manager#update-business.</translate> <br/> '''data''': (string) <translate>An optional data payload. This will be set as the entrypoint data for the game being switched to. Must be less than or equal to 1000 characters when stringified.</translate> '''optional'''<br/> '''callback''': (function) <translate>A function that will be called with one argument: An error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> FBInstant.switchGameAsync("12345678",nil, function(error) print("Handle game change failure") end) <br/></source> 5ury8kayowmceoco39ijy05nq60xqde FBInstant.updateAsync 0 543 10049 7685 2018-09-03T08:58:06Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/* Initialisation and Core|* Initialisation and Core]]<br/> === <translate>Description</translate> === <translate><br /> Informs Facebook of an update that occurred in the game. This will temporarily yield control to Facebook and Facebook will decide what to do based on what the update is. The returned promise will resolve/reject when Facebook returns control to the game.<br /> <br /></translate> <source lang="lua"> FBInstant.updateAsync(payload,callback) </source> === <translate>Parameters</translate> === '''payload''': (table) <translate>A payload that describes the update.</translate> <br/> '''callback''': (function) <translate>A function that will be called with two arguments: True when Facebook gives control back to the game or nil if the operation failed, and an error code if the function failed.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua"> -- This will post a custom update. If the game is played in a messenger -- chat thread, this will post a message into the thread with the specified -- image and text message. And when people launch the game from this -- message, those game sessions will be able to access the specified blob -- of data through FBInstant.getEntryPointData(). FBInstant.supdateAsync({action="CUSTOM", cta="Join The Fight", image=base64Picture, test={default="X just invased Y\'s village!", localizations={ ar_AR="X \u0641\u0642\u0637 \u063A\u0632\u062A \u0642\u0631\u064A\u0629 Y!", en_US="X just invaded Y\'s village!", el_LA="\u00A1X acaba de invadir el pueblo de Y!"} }, template="VILLAGE_INVASION", data={myReplayData="..."+, strategy="IMMEDIATE", notification="NO_PUSH"}, function(result,error) if result then -- closes the game after the update is posted. FBInstant.quit() end end) <br/></source> 204jrudmg2x1bpo8c2tltcs7ixxhjvu Flurry 0 67 14601 11664 2019-12-06T12:02:43Z MoKaLux 19 template wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:flurry --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> === <translate>Description</translate> === <translate><br /> This table stores all the functions related to Flurry analytics library.<br /> <br /> Flurry is available only for iOS as an external plugin. To use flurry:<br /> <br /> 1. Create an account on [http://www.flurry.com](http://www.flurry.com) and follow the instructions about creating a new application.<br /> 2. Download Flurry header and libraries and add them to your Xcode project.<br /> 3. Add {Gideros Installation Directory}/All Plugins/Flurry/source/iOS/flurry.mm file to your Xcode project.<br /> <br /> To load the Flurry library, call ''require &quot;flurry&quot;''.<br /> <br /></translate> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/flurry.endTimedEvent|flurry.endTimedEvent]] ''<translate>ends Flurry timed event</translate>''<br/><!-- GIDEROSMTD:flurry.endTimedEvent(eventName,parameters) ends Flurry timed event --> [[Special:MyLanguage/flurry.isAvailable|flurry.isAvailable]] ''<translate>returns true if Flurry is available</translate>''<br/><!-- GIDEROSMTD:flurry.isAvailable() returns true if Flurry is available --> [[Special:MyLanguage/flurry.logEvent|flurry.logEvent]] ''<translate>logs Flurry event</translate>''<br/><!-- GIDEROSMTD:flurry.logEvent(eventName,parameters,timed) logs Flurry event --> [[Special:MyLanguage/flurry.startSession|flurry.startSession]] ''<translate>starts the Flurry session with your API key</translate>''<br/><!-- GIDEROSMTD:flurry.startSession(apiKey) starts the Flurry session with your API key --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} {{Flurry}} 0cjm3ozq8eork4r1dp1oh09dpqfgqh4 Flurry.endTimedEvent 0 800 14602 10313 2019-12-06T12:03:26Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/flurry|flurry]]<br/> === <translate>Description</translate> === <translate><br /> Use this function to end timed event before app exists, otherwise timed events automatically end when app exists. When ending the timed event, <br /> a new event parameters table can be used to update event parameters. If you don&#039;t specify a new event parameters table, event parameters are kept the same.<br /> <br /></translate> <source lang="lua"> flurry.endTimedEvent(eventName,parameters) </source> === <translate>Parameters</translate> === '''eventName''': (string) <translate>The event name of end timed event.</translate> <br/> '''parameters''': (table, optional) <translate>If specified, event paramaters updated for this event.</translate> <br/> {{Flurry}} thz5udblo1y4o8z6pjxbzd51lwm21w2 Flurry.isAvailable 0 432 14603 9898 2019-12-06T12:03:42Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/flurry|flurry]]<br/> === <translate>Description</translate> === <translate><br /> Returns ''true'' if Flurry is available for this platform. Currently, Flurry is available only for iOS.<br /> <br /></translate> <source lang="lua"> (bool) = flurry.isAvailable() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>''true'' if Flurry is available for this platform, ''false'' otherwise.</translate><br/> {{Flurry}} 95mhncc501vdluagj5jeshlliqfiokj Flurry.logEvent 0 487 14604 9968 2019-12-06T12:04:04Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/flurry|flurry]]<br/> === <translate>Description</translate> === <translate>Use this function to count the number of times certain events happen during a session of your application and to pass dynamic parameters <br /> to be recorded with that event. Event parameters is optional and can be passed in as a table value. Your application is currently limited to counting <br /> occurrences for 100 different event ids (maximum length 255 characters). Maximum of 10 event parameters per event is supported.<br /> <br /> To start a timed event, pass ''timed'' parameter as ''true''.<br /> <br /></translate> <source lang="lua"> flurry.logEvent(eventName,parameters,timed) </source> === <translate>Parameters</translate> === '''eventName''': (string) <translate>The event name to be logged at Flurry service.</translate> <br/> '''parameters''': (table, optional) <translate>Optional paramaters to be recorted with this event.</translate> <br/> '''timed''': (boolean, optional) <translate>Specifies this is a timed event.</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">flurry.logEvent(&quot;myEvent1&quot;) flurry.logEvent(&quot;myEvent2&quot;, {key=&quot;value&quot;}) flurry.logEvent(&quot;myEvent3&quot;, {key=&quot;value&quot;}, true)</source> {{Flurry}} e7pnf7twnyp4crwrkpp4g2r3aa4bhop Flurry.startSession 0 222 14605 9636 2019-12-06T12:04:41Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/flurry|flurry]]<br/> === <translate>Description</translate> === <translate><br /> Starts the Flurry session with your API key. To create an account on Flurry and to obtain the API key specific to your application,<br /> please visit [http://www.flurry.com](http://www.flurry.com) and follow the instructions there.<br /> <br /> You need to call this function once after your application starts. For example, ''init.lua'' is suitable to call this function.<br /> <br /></translate> <source lang="lua"> flurry.startSession(apiKey) </source> === <translate>Parameters</translate> === '''apiKey''': (string) <translate>The Flurry API key.</translate> <br/> {{Flurry}} 7abbz3ljzyokd8whpziaag8lb9rnf1a Gaming 0 130 14607 11691 2019-12-06T12:17:44Z MoKaLux 19 added template wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Gaming --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> === <translate>Description</translate> === <translate><br /> The [[Special:MyLanguage/Gaming|Gaming]] class is defined in the module &quot;gaming&quot;. Therefore, you need to call<br /> ''require(&quot;gaming&quot;)'' before using it. Loading the Gaming module <br /> also creates a global class [[Special:MyLanguage/Gaming|Gaming]]. <br /> <p><strong>Currently supports:</strong></p> <ul> <li>Gaming.new("googleplay") -- Android</li> <li>Gaming.new("gamekit") -- iOS</li> </ul></translate> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Gaming.new|Gaming.new]] <br/><!-- GIDEROSMTD:Gaming.new(backend) --> [[Special:MyLanguage/Gaming:autoMatch|Gaming:autoMatch]] <br/><!-- GIDEROSMTD:Gaming:autoMatch() --> [[Special:MyLanguage/Gaming:deleteState|Gaming:deleteState]] <br/><!-- GIDEROSMTD:Gaming:deleteState(key) --> [[Special:MyLanguage/Gaming:getAllPlayers|Gaming:getAllPlayers]] <br/><!-- GIDEROSMTD:Gaming:getAllPlayers() --> [[Special:MyLanguage/Gaming:getPlayerId|Gaming:getPlayerId]] <br/><!-- GIDEROSMTD:Gaming:getPlayerId() --> [[Special:MyLanguage/Gaming:getPlayerInfo|Gaming:getPlayerInfo]] <br/><!-- GIDEROSMTD:Gaming:getPlayerInfo() --> [[Special:MyLanguage/Gaming:getPlayerName|Gaming:getPlayerName]] <br/><!-- GIDEROSMTD:Gaming:getPlayerName() --> [[Special:MyLanguage/Gaming:getPlayerPicture|Gaming:getPlayerPicture]] <br/><!-- GIDEROSMTD:Gaming:getPlayerPicture() --> [[Special:MyLanguage/Gaming:getPlayerScore|Gaming:getPlayerScore]] <br/><!-- GIDEROSMTD:Gaming:getPlayerScore() --> [[Special:MyLanguage/Gaming:incrementAchievement|Gaming:incrementAchievement]] <br/><!-- GIDEROSMTD:Gaming:incrementAchievement(achievementId,numSteps,immediate) --> [[Special:MyLanguage/Gaming:invitePlayers|Gaming:invitePlayers]] <br/><!-- GIDEROSMTD:Gaming:invitePlayers() --> [[Special:MyLanguage/Gaming:isLoggedIn|Gaming:isLoggedIn]] <br/><!-- GIDEROSMTD:Gaming:isLoggedIn() --> [[Special:MyLanguage/Gaming:joinRoom|Gaming:joinRoom]] <br/><!-- GIDEROSMTD:Gaming:joinRoom() --> [[Special:MyLanguage/Gaming:loadAchievements|Gaming:loadAchievements]] <br/><!-- GIDEROSMTD:Gaming:loadAchievements() --> [[Special:MyLanguage/Gaming:loadPlayerCenteredScores|Gaming:loadPlayerCenteredScores]] <br/><!-- GIDEROSMTD:Gaming:loadPlayerCenteredScores(leaderboardId,timeSpan,collection,maxEntries) --> [[Special:MyLanguage/Gaming:loadScores|Gaming:loadScores]] <br/><!-- GIDEROSMTD:Gaming:loadScores(leaderboardId,timeSpan,collection,maxEntries) --> [[Special:MyLanguage/Gaming:loadState|Gaming:loadState]] <br/><!-- GIDEROSMTD:Gaming:loadState(key) --> [[Special:MyLanguage/Gaming:login|Gaming:login]] <br/><!-- GIDEROSMTD:Gaming:login() --> [[Special:MyLanguage/Gaming:logout|Gaming:logout]] <br/><!-- GIDEROSMTD:Gaming:logout() --> [[Special:MyLanguage/Gaming:reportAchievement|Gaming:reportAchievement]] <br/><!-- GIDEROSMTD:Gaming:reportAchievement(achievementId,numSteps,immediate) --> [[Special:MyLanguage/Gaming:reportScore|Gaming:reportScore]] <br/><!-- GIDEROSMTD:Gaming:reportScore(leaderboardId,score,immediate) --> [[Special:MyLanguage/Gaming:resolveState|Gaming:resolveState]] <br/><!-- GIDEROSMTD:Gaming:resolveState(key,version,data) --> [[Special:MyLanguage/Gaming:revealAchievement|Gaming:revealAchievement]] <br/><!-- GIDEROSMTD:Gaming:revealAchievement(achievementId,immediate) --> [[Special:MyLanguage/Gaming:sendTo|Gaming:sendTo]] <br/><!-- GIDEROSMTD:Gaming:sendTo() --> [[Special:MyLanguage/Gaming:sendToAll|Gaming:sendToAll]] <br/><!-- GIDEROSMTD:Gaming:sendToAll() --> [[Special:MyLanguage/Gaming:showAchievements|Gaming:showAchievements]] <br/><!-- GIDEROSMTD:Gaming:showAchievements() --> [[Special:MyLanguage/Gaming:showInvitations|Gaming:showInvitations]] <br/><!-- GIDEROSMTD:Gaming:showInvitations() --> [[Special:MyLanguage/Gaming:showLeaderboard|Gaming:showLeaderboard]] <br/><!-- GIDEROSMTD:Gaming:showLeaderboard(leaderboardId) --> [[Special:MyLanguage/Gaming:showWaitingRoom|Gaming:showWaitingRoom]] <br/><!-- GIDEROSMTD:Gaming:showWaitingRoom() --> [[Special:MyLanguage/Gaming:updateState|Gaming:updateState]] <br/><!-- GIDEROSMTD:Gaming:updateState(key,data,immediate) --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === [[Special:MyLanguage/Event.CONNECTED_TO_ROOM|Event.CONNECTED_TO_ROOM]]<br/><!-- GIDEROSEVT:Event.CONNECTED_TO_ROOM conntectedToRoom--> [[Special:MyLanguage/Event.DATA_RECEIVED|Event.DATA_RECEIVED]]<br/><!-- GIDEROSEVT:Event.DATA_RECEIVED dataReceived--> [[Special:MyLanguage/Event.DISCONNECTED_FROM_ROOM|Event.DISCONNECTED_FROM_ROOM]]<br/><!-- GIDEROSEVT:Event.DISCONNECTED_FROM_ROOM disconntectedFromRoom--> [[Special:MyLanguage/Event.GAME_STARTED|Event.GAME_STARTED]]<br/><!-- GIDEROSEVT:Event.GAME_STARTED gameStarted--> [[Special:MyLanguage/Event.INVITATION_RECEIVED|Event.INVITATION_RECEIVED]]<br/><!-- GIDEROSEVT:Event.INVITATION_RECEIVED invitationReceived--> [[Special:MyLanguage/Event.JOINED_ROOM|Event.JOINED_ROOM]]<br/><!-- GIDEROSEVT:Event.JOINED_ROOM joinedRoom--> [[Special:MyLanguage/Event.LEFT_ROOM|Event.LEFT_ROOM]]<br/><!-- GIDEROSEVT:Event.LEFT_ROOM leftRoom--> [[Special:MyLanguage/Event.LOAD_ACHIEVEMENTS_COMPLETE|Event.LOAD_ACHIEVEMENTS_COMPLETE]]<br/><!-- GIDEROSEVT:Event.LOAD_ACHIEVEMENTS_COMPLETE loadAchievementsComplete--> [[Special:MyLanguage/Event.LOAD_ACHIEVEMENTS_ERROR|Event.LOAD_ACHIEVEMENTS_ERROR]]<br/><!-- GIDEROSEVT:Event.LOAD_ACHIEVEMENTS_ERROR loadAchievementsError--> [[Special:MyLanguage/Event.LOAD_SCORES_COMPLETE|Event.LOAD_SCORES_COMPLETE]]<br/><!-- GIDEROSEVT:Event.LOAD_SCORES_COMPLETE loadScoresComplete--> [[Special:MyLanguage/Event.LOAD_SCORES_ERROR|Event.LOAD_SCORES_ERROR]]<br/><!-- GIDEROSEVT:Event.LOAD_SCORES_ERROR loadScoresComplete--> [[Special:MyLanguage/Event.LOGIN_COMPLETE|Event.LOGIN_COMPLETE]]<br/><!-- GIDEROSEVT:Event.LOGIN_COMPLETE loginComplete--> [[Special:MyLanguage/Event.LOGIN_ERROR|Event.LOGIN_ERROR]]<br/><!-- GIDEROSEVT:Event.LOGIN_ERROR loginError--> [[Special:MyLanguage/Event.PEER_CONNECTED|Event.PEER_CONNECTED]]<br/><!-- GIDEROSEVT:Event.PEER_CONNECTED peerConnected--> [[Special:MyLanguage/Event.PEER_DECLINED|Event.PEER_DECLINED]]<br/><!-- GIDEROSEVT:Event.PEER_DECLINED peerDeclined--> [[Special:MyLanguage/Event.PEER_DISCONNECTED|Event.PEER_DISCONNECTED]]<br/><!-- GIDEROSEVT:Event.PEER_DISCONNECTED peerDisconnected--> [[Special:MyLanguage/Event.PEER_INVITED|Event.PEER_INVITED]]<br/><!-- GIDEROSEVT:Event.PEER_INVITED peerInvited--> [[Special:MyLanguage/Event.PEER_JOINED|Event.PEER_JOINED]]<br/><!-- GIDEROSEVT:Event.PEER_JOINED peerJoined--> [[Special:MyLanguage/Event.PEER_LEFT|Event.PEER_LEFT]]<br/><!-- GIDEROSEVT:Event.PEER_LEFT peerLeft--> [[Special:MyLanguage/Event.PLAYER_INFORMATION_COMPLETE|Event.PLAYER_INFORMATION_COMPLETE]]<br/><!-- GIDEROSEVT:Event.PLAYER_INFORMATION_COMPLETE playerInformationComplete--> [[Special:MyLanguage/Event.PLAYER_INFORMATION_ERROR|Event.PLAYER_INFORMATION_ERROR]]<br/><!-- GIDEROSEVT:Event.PLAYER_INFORMATION_ERROR playerInformationError--> [[Special:MyLanguage/Event.PLAYER_SCORE_COMPLETE|Event.PLAYER_SCORE_COMPLETE]]<br/><!-- GIDEROSEVT:Event.PLAYER_SCORE_COMPLETE playerScoreComplete--> [[Special:MyLanguage/Event.PLAYER_SCORE_ERROR|Event.PLAYER_SCORE_ERROR]]<br/><!-- GIDEROSEVT:Event.PLAYER_SCORE_ERROR playerScoreError--> [[Special:MyLanguage/Event.REPORT_ACHIEVEMENT_COMPLETE|Event.REPORT_ACHIEVEMENT_COMPLETE]]<br/><!-- GIDEROSEVT:Event.REPORT_ACHIEVEMENT_COMPLETE reportAchievementComplete--> [[Special:MyLanguage/Event.REPORT_ACHIEVEMENT_ERROR|Event.REPORT_ACHIEVEMENT_ERROR]]<br/><!-- GIDEROSEVT:Event.REPORT_ACHIEVEMENT_ERROR reportAchievementError--> [[Special:MyLanguage/Event.REPORT_SCORE_COMPLETE|Event.REPORT_SCORE_COMPLETE]]<br/><!-- GIDEROSEVT:Event.REPORT_SCORE_COMPLETE reportScoreComplete--> [[Special:MyLanguage/Event.REPORT_SCORE_ERROR|Event.REPORT_SCORE_ERROR]]<br/><!-- GIDEROSEVT:Event.REPORT_SCORE_ERROR reportScoreError--> [[Special:MyLanguage/Event.ROOM_AUTO_MATCHING|Event.ROOM_AUTO_MATCHING]]<br/><!-- GIDEROSEVT:Event.ROOM_AUTO_MATCHING roomAutoMatching--> [[Special:MyLanguage/Event.ROOM_CONNECTED|Event.ROOM_CONNECTED]]<br/><!-- GIDEROSEVT:Event.ROOM_CONNECTED roomConnected--> [[Special:MyLanguage/Event.ROOM_CONNECTING|Event.ROOM_CONNECTING]]<br/><!-- GIDEROSEVT:Event.ROOM_CONNECTING roomConnecting--> [[Special:MyLanguage/Event.ROOM_CREATED|Event.ROOM_CREATED]]<br/><!-- GIDEROSEVT:Event.ROOM_CREATED roomCreated--> [[Special:MyLanguage/Event.STATE_CONFLICT|Event.STATE_CONFLICT]]<br/><!-- GIDEROSEVT:Event.STATE_CONFLICT stateConflict--> [[Special:MyLanguage/Event.STATE_DELETED|Event.STATE_DELETED]]<br/><!-- GIDEROSEVT:Event.STATE_DELETED stateDeleted--> [[Special:MyLanguage/Event.STATE_ERROR|Event.STATE_ERROR]]<br/><!-- GIDEROSEVT:Event.STATE_ERROR stateError--> [[Special:MyLanguage/Event.STATE_LOADED|Event.STATE_LOADED]]<br/><!-- GIDEROSEVT:Event.STATE_LOADED stateLoaded--> === <translate>Constants</translate> === [[Special:MyLanguage/Gaming.ALL_PLAYERS|Gaming.ALL_PLAYERS]]<br/><!-- GIDEROSCST:Gaming.ALL_PLAYERS 1--> [[Special:MyLanguage/Gaming.ALL_TIME|Gaming.ALL_TIME]]<br/><!-- GIDEROSCST:Gaming.ALL_TIME 2--> [[Special:MyLanguage/Gaming.FRIENDS|Gaming.FRIENDS]]<br/><!-- GIDEROSCST:Gaming.FRIENDS 0--> [[Special:MyLanguage/Gaming.HIDDEN|Gaming.HIDDEN]]<br/><!-- GIDEROSCST:Gaming.HIDDEN 2--> [[Special:MyLanguage/Gaming.REVEALED|Gaming.REVEALED]]<br/><!-- GIDEROSCST:Gaming.REVEALED 1--> [[Special:MyLanguage/Gaming.TODAY|Gaming.TODAY]]<br/><!-- GIDEROSCST:Gaming.TODAY 0--> [[Special:MyLanguage/Gaming.UNLOCKED|Gaming.UNLOCKED]]<br/><!-- GIDEROSCST:Gaming.UNLOCKED 0--> [[Special:MyLanguage/Gaming.WEEK|Gaming.WEEK]]<br/><!-- GIDEROSCST:Gaming.WEEK 1--> |} {{Gaming}} tazt9ie6x7svps4j9ghtzqqk7ujm7bq Gaming.ALL PLAYERS 0 1246 14638 10034 2019-12-06T12:25:18Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' 1<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Players scope for leaderboards functions.</translate> {{Gaming}} qs9hppe8lqcivge4up30eswqyq65fjy Gaming.ALL TIME 0 1381 14639 10132 2019-12-06T12:25:31Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' 2<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Time scope for leaderboards functions.</translate> {{Gaming}} sfa8va4ohi2sbzlejn70xwtneq1i9ao Gaming.FRIENDS 0 1253 14640 10157 2019-12-06T12:25:43Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' 0<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Players scope for leaderboards functions.</translate> {{Gaming}} 6jwtathe36uy6py4jsih14em90k937b Gaming.HIDDEN 0 1222 14641 9759 2019-12-06T12:25:57Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' 2<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Achievement state.</translate> {{Gaming}} aj5rng8olq5q48bgjkjza6inavy5cp8 Gaming.REVEALED 0 1354 14642 9900 2019-12-06T12:26:09Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' 1<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Achievement state.</translate> {{Gaming}} 10wyd412qcimd66sorli18ri41hxs5c Gaming.TODAY 0 1349 14643 9836 2019-12-06T12:27:00Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' 0<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Time scope for leaderboards functions.</translate> {{Gaming}} 6xh6jrxirerkeeewtpru6xbmxbev59a Gaming.UNLOCKED 0 1373 14644 10666 2019-12-06T12:27:16Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' 0<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Achievement state.</translate> {{Gaming}} 79feek4c1rc13hi9fe2wm73m5mtwhap Gaming.WEEK 0 1329 14645 10838 2019-12-06T12:27:30Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Value</translate>:''' 1<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Time scope for leaderboards functions.</translate> {{Gaming}} 5quj7f6e2p3zi99mr5ajcxrznp0xj77 Gaming.new 0 995 14608 10799 2019-12-06T12:18:09Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Currently supports 'googleplay' for Android and 'gamekit' for iOS.</translate> <source lang="lua"> (Gaming) = Gaming.new(backend) </source> === <translate>Parameters</translate> === '''backend''': (string) <translate>The name of the backend to create.</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (Gaming) <translate>The newly created backend.</translate><br/> {{Gaming}} 4bsig0os25d0v84aa9ne5lp9vnin3ho Gaming:autoMatch 0 161 14609 9532 2019-12-06T12:18:22Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate><br /></translate> <source lang="lua"> Gaming:autoMatch() </source> {{Gaming}} 38ywj2nty2pjexakme6th4awljl17ov Gaming:deleteState 0 541 14610 10046 2019-12-06T12:18:32Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Delete a data element in cloud storage. Either [[Special:MyLanguage/Event.STATE_ERROR|Event.STATE_ERROR]] or [[Special:MyLanguage/Event.STATE_DELETED|Event.STATE_DELETED]] will be triggered.</translate> <source lang="lua"> Gaming:deleteState(key) </source> === <translate>Parameters</translate> === '''key''': (number) <translate>Key to delete</translate> <br/> {{Gaming}} gvrmsr8qzc9hlycdk1czzeamkwctcjw Gaming:getAllPlayers 0 1136 14611 10594 2019-12-06T12:18:44Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate><br /></translate> <source lang="lua"> Gaming:getAllPlayers() </source> {{Gaming}} ghjfoyxee8u4vb2vn9liy8cqqdh1ak0 Gaming:getPlayerId 0 1097 14612 10546 2019-12-06T12:18:57Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate><br /></translate> <source lang="lua"> Gaming:getPlayerId() </source> {{Gaming}} qd82z0sevruq1pm5c203sy9cbcx9wqr Gaming:getPlayerInfo 0 860 14613 10714 2019-12-06T12:19:11Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Fetch player info. Either [[Special:MyLanguage/Event.PLAYER_INFORMATION_COMPLETE|Event.PLAYER_INFORMATION_COMPLETE]] or [[Special:MyLanguage/Event.PLAYER_INFORMATION_ERROR|Event.PLAYER_INFORMATION_ERROR]] will be triggered.</translate> <source lang="lua"> Gaming:getPlayerInfo() </source> {{Gaming}} lnof43hcj5orak7mukrxnkkozrf6mk4 Gaming:getPlayerName 0 1084 14614 10859 2019-12-06T12:19:24Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate><br /></translate> <source lang="lua"> Gaming:getPlayerName() </source> {{Gaming}} 1bwck9kfarsgllxicws2x8rkpfehx7e Gaming:getPlayerPicture 0 458 14615 9918 2019-12-06T12:19:37Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate><br /></translate> <source lang="lua"> Gaming:getPlayerPicture() </source> {{Gaming}} heq2qg45byoky1f0ckjeqi25z7ocgb5 Gaming:getPlayerScore 0 809 14616 10315 2019-12-06T12:19:49Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate><br /></translate> <source lang="lua"> Gaming:getPlayerScore() </source> {{Gaming}} mkwuwe86694or03hbnmyt3mevjotlc2 Gaming:incrementAchievement 0 481 14617 9964 2019-12-06T12:20:04Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Increment achievement progress Either. ''Event.REPORT_ACHIEVEMENTS_COMPLETE'' or ''Event.REPORT_ACHIEVEMENTS_ERROR'' will be triggered.</translate> <source lang="lua"> Gaming:incrementAchievement(achievementId,numSteps,immediate) </source> === <translate>Parameters</translate> === '''achievementId''': (string) <translate>Achievement Id</translate> <br/> '''numSteps''': (number) <translate>Number of steps to add</translate> '''optional'''<br/> '''immediate''': (boolean) <translate>Push the update immediately</translate> <br/> {{Gaming}} aeb15be28pindmvpr1sbn24d9h0qxps Gaming:invitePlayers 0 1119 14618 10577 2019-12-06T12:20:46Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate><br /></translate> <source lang="lua"> Gaming:invitePlayers() </source> {{Gaming}} 0ao5fujm4puipkxu33u82djiamawej0 Gaming:isLoggedIn 0 389 14619 9831 2019-12-06T12:21:04Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.9<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Returns true if we are logged in.</translate> <source lang="lua"> (bool) = Gaming:isLoggedIn() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>''true'' if Gaming is logged in, ''false'' otherwise.</translate><br/> {{Gaming}} 9xcjx4te0gv6lztn3tsrrq48jtrug1h Gaming:joinRoom 0 872 14620 10357 2019-12-06T12:21:17Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate><br /></translate> <source lang="lua"> Gaming:joinRoom() </source> {{Gaming}} 1eyz2swg2s1ibxblhzam14sbqf30cny Gaming:loadAchievements 0 751 14621 10655 2019-12-06T12:21:30Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Fetch achievements. Either [[Special:MyLanguage/Event.LOAD_ACHIEVEMENTS_COMPLETE|Event.LOAD_ACHIEVEMENTS_COMPLETE]]or [[Special:MyLanguage/Event.LOAD_ACHIEVEMENTS_ERROR|Event.LOAD_ACHIEVEMENTS_ERROR]] will be triggered.</translate> <source lang="lua"> Gaming:loadAchievements() </source> {{Gaming}} lkkvbz7790tdinc5e2zjbm2shyaumas Gaming:loadPlayerCenteredScores 0 375 14622 9817 2019-12-06T12:21:45Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Fetch player leaderboard entries. Either [[Special:MyLanguage/Event.PLAYER_SCORE_COMPLETE|Event.PLAYER_SCORE_COMPLETE]] or [[Special:MyLanguage/Event.PLAYER_SCORE_ERROR|Event.PLAYER_SCORE_ERROR]] will be triggered.</translate> <source lang="lua"> Gaming:loadPlayerCenteredScores(leaderboardId,timeSpan,collection,maxEntries) </source> === <translate>Parameters</translate> === '''leaderboardId''': (string) <translate>Leaderboard Id</translate> <br/> '''timeSpan''': (number) <translate>Time range: [[Special:MyLanguage/Gaming.TODAY|Gaming.TODAY]], [[Special:MyLanguage/Gaming.WEEK|Gaming.WEEK]] or [[Special:MyLanguage/Gaming.ALL_TIME|Gaming.ALL_TIME]]</translate> '''optional'''<br/> '''collection''': (number) <translate>Player range: [[Special:MyLanguage/Gaming.FRIENDS|Gaming.FRIENDS]] or [[Special:MyLanguage/Gaming.ALL_PLAYERS|Gaming.ALL_PLAYERS]]</translate> '''optional'''<br/> '''maxEntries''': (number) <translate>Maximum number of entries to return</translate> '''optional'''<br/> {{Gaming}} 0ijo7sqn9rlln60lgqcqx3bjfux55lk Gaming:loadScores 0 159 14623 9543 2019-12-06T12:22:01Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Fetch leaderboard entries. Either [[Special:MyLanguage/Event.LOAD_SCORES_COMPLETE|Event.LOAD_SCORES_COMPLETE]] or [[Special:MyLanguage/Event.LOAD_SCORES_ERROR|Event.LOAD_SCORES_ERROR]] will be triggered.</translate> <source lang="lua"> Gaming:loadScores(leaderboardId,timeSpan,collection,maxEntries) </source> === <translate>Parameters</translate> === '''leaderboardId''': (string) <translate>Leaderboard Id</translate> <br/> '''timeSpan''': (number) <translate>Time range: [[Special:MyLanguage/Gaming.TODAY|Gaming.TODAY]], [[Special:MyLanguage/Gaming.WEEK|Gaming.WEEK]] or [[Special:MyLanguage/Gaming.ALL_TIME|Gaming.ALL_TIME]]</translate> '''optional'''<br/> '''collection''': (number) <translate>Player range: [[Special:MyLanguage/Gaming.FRIENDS|Gaming.FRIENDS]] or [[Special:MyLanguage/Gaming.ALL_PLAYERS|Gaming.ALL_PLAYERS]]</translate> '''optional'''<br/> '''maxEntries''': (number) <translate>Maximum number of entries to return</translate> '''optional'''<br/> {{Gaming}} sqpesyz3w5b6xoh7j78sck7dgcwrc60 Gaming:loadState 0 380 14624 9824 2019-12-06T12:22:13Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Load a data element from cloud storage. Either 'Event.STATE_LOADED'', ''Event.STATE_ERROR'' or ''Event.STATE_CONFLICT` will be triggered.</translate> <source lang="lua"> Gaming:loadState(key) </source> === <translate>Parameters</translate> === '''key''': (number) <translate>Key to load</translate> <br/> {{Gaming}} s4n0kw0khqk05pefspuvega2cnyjpbq Gaming:login 0 221 14625 9624 2019-12-06T12:22:26Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Log into the gaming backend, if not already logged in. IF login is issued, events [[Special:MyLanguage/Event.LOGIN_COMPLETE|Event.LOGIN_COMPLETE]] or [[Special:MyLanguage/Event.LOGIN_ERROR|Event.LOGIN_ERROR]]will be triggered.</translate> <source lang="lua"> Gaming:login() </source> {{Gaming}} 0kogkequ1ud45ow94jyxzab2c11kjah Gaming:logout 0 249 14626 9656 2019-12-06T12:22:39Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Logs out from gaming services</translate> <source lang="lua"> Gaming:logout() </source> {{Gaming}} l0cn74uu2v87ykdasnkazjdn2og8ls3 Gaming:reportAchievement 0 648 14627 10188 2019-12-06T12:22:51Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Update achievement progress. Either ''Event.REPORT_ACHIEVEMENTS_COMPLETE'' or ''Event.REPORT_ACHIEVEMENTS_ERROR'' will be triggered.</translate> <source lang="lua"> Gaming:reportAchievement(achievementId,numSteps,immediate) </source> === <translate>Parameters</translate> === '''achievementId''': (string) <translate>Achievement Id</translate> <br/> '''numSteps''': (number) <translate>Number of steps</translate> '''optional'''<br/> '''immediate''': (boolean) <translate>Push the update immediately</translate> <br/> {{Gaming}} l75dyirko64znv1a0pej7f0euywvn42 Gaming:reportScore 0 1015 14628 10455 2019-12-06T12:23:04Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Upload a score to a leaderboard.</translate> <source lang="lua"> Gaming:reportScore(leaderboardId,score,immediate) </source> === <translate>Parameters</translate> === '''leaderboardId''': (string) <translate>Leaderboard Id</translate> <br/> '''score''': (number) <translate>Score</translate> <br/> '''immediate''': (boolean) <translate>Push the update immediately</translate> <br/> {{Gaming}} l52hbv34fgpfjkmvwj4c4j5099wfny3 Gaming:resolveState 0 970 14629 10423 2019-12-06T12:23:16Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Resolve a conflict state in cloud storage. Either [[Special:MyLanguage/Event.STATE_ERROR|Event.STATE_ERROR]] or [[Special:MyLanguage/Event.STATE_CONFLICT|Event.STATE_CONFLICT]] will be triggered.</translate> <source lang="lua"> Gaming:resolveState(key,version,data) </source> === <translate>Parameters</translate> === '''key''': (number) <translate>Key to resolve</translate> <br/> '''version''': (string) <translate>Conflict context</translate> <br/> '''data''': (string) <translate>New data</translate> <br/> {{Gaming}} d7lq9rzzueva0oxs30jcveuxsbxeoni Gaming:revealAchievement 0 870 14630 10355 2019-12-06T12:23:29Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Reveal a hidden achievement</translate> <source lang="lua"> Gaming:revealAchievement(achievementId,immediate) </source> === <translate>Parameters</translate> === '''achievementId''': (string) <translate>Achievement Id</translate> <br/> '''immediate''': (boolean) <translate>Push the update immediately</translate> <br/> {{Gaming}} fnvov48uhu9rp2u9amjlft7z2hlatdd Gaming:sendTo 0 511 14631 9997 2019-12-06T12:23:42Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate><br /></translate> <source lang="lua"> Gaming:sendTo() </source> {{Gaming}} emqecpumur0a0cuk0tx80tclgaknrwh Gaming:sendToAll 0 1101 14632 10547 2019-12-06T12:23:53Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate><br /></translate> <source lang="lua"> Gaming:sendToAll() </source> {{Gaming}} cogzgu2uokir8rcsh4zgh1wqbqn0pro Gaming:showAchievements 0 707 14633 10631 2019-12-06T12:24:07Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Show achievements.</translate> <source lang="lua"> Gaming:showAchievements() </source> {{Gaming}} otb80rlr3z0504ymack1ocv8zz7waog Gaming:showInvitations 0 1080 14634 10858 2019-12-06T12:24:20Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate><br /></translate> <source lang="lua"> Gaming:showInvitations() </source> {{Gaming}} n70s839kl2l5khc87t8uk6fhsx8ngkg Gaming:showLeaderboard 0 454 14635 9930 2019-12-06T12:24:32Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Show the specified leaderboard</translate> <source lang="lua"> Gaming:showLeaderboard(leaderboardId) </source> === <translate>Parameters</translate> === '''leaderboardId''': (string) <translate>Leaderboard to show, or nil for all leaderboards</translate> '''optional'''<br/> {{Gaming}} ldjetkey15vbvrq9xr8vvjney7blz8g Gaming:showWaitingRoom 0 623 14636 10155 2019-12-06T12:24:47Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate><br /></translate> <source lang="lua"> Gaming:showWaitingRoom() </source> {{Gaming}} ouqd8kd1onzix3wcx8fdzivr7cjkxen Gaming:updateState 0 228 14637 9632 2019-12-06T12:24:59Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Gaming|Gaming]]<br/> === <translate>Description</translate> === <translate>Update a data element in cloud storage. Either [[Special:MyLanguage/Event.STATE_ERROR|Event.STATE_ERROR]] or [[Special:MyLanguage/Event.STATE_CONFLICT|Event.STATE_CONFLICT]] will be triggered.</translate> <source lang="lua"> Gaming:updateState(key,data,immediate) </source> === <translate>Parameters</translate> === '''key''': (number) <translate>Key to update</translate> <br/> '''data''': (string) <translate>New data</translate> <br/> '''immediate''': (boolean) <translate>Push the update immediately</translate> <br/> {{Gaming}} idag75wu2qjot3e9uiz0mscecq5hjzg Iab 0 2611 13556 13555 2019-11-30T04:28:41Z Apollo14 8 wikitext text/x-wiki '''Interface usage is quite simple:''' * IAB.new(iabframework) ''-- initialize specified IAB framework'' Available frameworks: 'amazon', 'google', 'ios' * IAB:setUp(value1, value2, ..., valueN) ''-- provide all the keys/devids/appids/etc needed for the framework, which you will get in same order on Native part in Map object'' * IAB:setProducts({internalId1 = "storeId1", internalId2 = "storeId2", ..., internalIdn = "storeIdn"}) ''-- provide list of products you will be using (key is your internal products id, value is store specific product id)'' * IAB:setConsumables({"internalId1", "internalId2", ..., "internalIdn"}) ''-- which of your products are consumables, that people can buy many times (provide internal product ids)'' * IAB:isAvailable() ''--check if IAB is available, raises event:'' ** Event.AVAILABLE ''--iab is available'' * IAB:requestProducts() ''--request information for products provided in setProducts method'' ** Event.PRODUCTS_COMPLETE *** event.productId *** event.title *** event.description *** event.price ** Event.PRODUCTS_ERROR *** event.error * IAB:purchase(prodId) ''--purchase product by providing your internal product id, raises two events:'' ** Event.PURCHASE_COMPLETE *** event.productId *** event.receiptId ** Event.PURCHASE_ERROR *** event.error * iab:restore() ''--raise purchase events for each previously purchases entitled (not consumed) items, raises two events:'' ** Event.RESTORE_COMPLETE ** Event.RESTORE_ERROR *** event.error <source lang="lua"> </source> ===== '''Code example:''' ===== <source lang="lua"> if not tv then pcall(function() require "iab" end) end if IAB then if android then if kindle then iab=IAB.new("amazon") iab:setProducts({credit50="credit_50",credit100="credit_100",credit500="credit_500",credit1000="credit_1000"}) else iab=IAB.new("google") iab:setUp(googleLicence) iab:setProducts({credit50="credit50",credit100="credit100",credit500="credit500",credit1000="credit1000"}) end elseif ios then iab=IAB.new("ios") iab:setProducts({credit50="credit50",credit100="credit100",credit500="credit500",credit1000="credit1000"}) end if iab then iab:setConsumables({"credit50","credit100","credit500","credit1000"}) iab:addEventListener(Event.AVAILABLE,function(e) print("iab is available") iabCheck=false iab:requestProducts() end) --usually here we would set a flag that it is possible to make purchases --basically you can allow doing all the iap stuff after this event is called --[[ REQUESTING PRODUCTS ]]-- --if this event is called, we received the list of products and information about them iab:addEventListener(Event.PRODUCTS_COMPLETE,function(e) print("Product list completed") for i = 1, #e.products do local p=e.products[i] --id, title, description and price print(p.productId,p.title,p.description,p.price) if p.productId=="fullgame" then iabCheck=true iabFullGame=false end for loop=1,#creditText do local c=creditText[loop] if p.productId==c[1] then c[2]=p.price c[3]=true end end end iab:restore() end) --else we could not retrieve information about products now iab:addEventListener(Event.PRODUCTS_ERROR,function(e) print(e:getType(),e.error) end) iab:addEventListener(Event.PURCHASE_COMPLETE,function(e) --purchases successfully completed --here you need to check if receiptId was not already saved previously --as in if purchase was not already made --then you can unlock the item here --and store receiptId presistently to know --that you have already provided this item to user print("Purchase completed") if remainingCredits<0 then remainingCredits=0 end if e.productId=="credit50" then remainingCredits+=50 saveSettings() elseif e.productId=="credit100" then remainingCredits+=100 saveSettings() elseif e.productId=="credit500" then remainingCredits+=500 saveSettings() elseif e.productId=="credit1000" then remainingCredits+=1000 saveSettings() elseif e.productId=="fullgame" then iabCheck=true iabFullGame=true end print(e:getType(),e.productId,e.receiptId) end) iab:addEventListener(Event.PURCHASE_ERROR,function(e) --it was not possible to complete the purchase, --inform user --if e.error=="Unable to buy item (response: 7:Item Already Owned)" then iab:isAvailable() --end -- print(e:getType(),e.error) end) iab:addEventListener(Event.RESTORE_COMPLETE,function(e) --restore successfully completed --here you need to check if receiptId was not already saved previously --as in if purchase was not already made --then you can unlock the item here --and store receiptId presistently to know --that you have already provided this item to user if iabCheck then fullgame=iabFullGame saveSettings() end print("restore complete") --iab:purchase("credit500") end) iab:addEventListener(Event.RESTORE_ERROR,function(e) --it was not possible to complete the restore, --inform user -- print(e:getType(),e.error) end) iab:isAvailable() -- iab:purchase("credit100") else print("iab provider not available") end else print("iab not available") end --To make a purchase I would: --if iab then iab:purchase("credit50") end </source> q2fm5a32p8u8zejn1ggoobam132vi0h Json 0 113 14680 13156 2019-12-06T12:45:55Z MoKaLux 19 added template wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:json --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2013.09<br/> === <translate>Description</translate> === <translate>Provides Lua table serialization and deserialization to and from string in json format</translate> === <translate>Examples</translate> === '''Get user's geo:'''<br/> <source lang="lua"> require('json') local loader = UrlLoader.new("http://ip-api.com/json") loader:addEventListener(Event.COMPLETE, function(event) local receivedTable=json.decode(event.data) print(receivedTable.countryCode) print(receivedTable.timezone) end) </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/json.decode|json.decode]] ''<translate>Returns Lua table from provided json encoded string</translate>''<br/><!-- GIDEROSMTD:json.decode(jsondata) Returns Lua table from provided json encoded string --> [[Special:MyLanguage/json.encode|json.encode]] ''<translate>Returns encoded json string from provided Lua table</translate>''<br/><!-- GIDEROSMTD:json.encode(data) Returns encoded json string from provided Lua table --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} {{Json}} 7ak9bwfwmjlab6usnszxlvui7wywcu6 Json.decode 0 683 14681 10232 2019-12-06T12:46:10Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/json|json]]<br/> === <translate>Description</translate> === <translate>Returns Lua table from provided json encoded string</translate> <source lang="lua"> json.decode(jsondata) </source> === <translate>Parameters</translate> === '''jsondata''': (string) <translate>Data in json format which to deserialize to Lua table</translate> <br/> {{Json}} 0oyi7wb31ypkld1lnb0o676c7brhzpw Json.encode 0 891 14682 10730 2019-12-06T12:46:24Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.09<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/json|json]]<br/> === <translate>Description</translate> === <translate>Returns encoded json string from provided Lua table</translate> <source lang="lua"> json.encode(data) </source> === <translate>Parameters</translate> === '''data''': (table) <translate>Lua table which to serialize to json</translate> <br/> {{Json}} 7zoocptxjykklr5i1orpeunbzlrcdte Lfs 0 40 14836 9852 2019-12-08T13:59:07Z MoKaLux 19 formatting wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:lfs --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> === <translate>Description</translate> === LFS or LuaFileSystem is a Lua library developed to complement the set of functions related to file systems offered by the standard Lua distribution. LuaFileSystem offers a portable way to access the underlying directory structure and file attributes. For more information and detailed documentation, please visit http://keplerproject.github.io/luafilesystem/manual.html#reference. {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} 97s09s02qo1b8kby17nm9sjtfk66ngx LiquidFun 0 2582 14934 12968 2019-12-09T19:26:36Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:LiquidFun --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> === <translate>Description</translate> === <translate>LiquidFun is a physics engine, it's a 2D rigid-body and fluid simulation C++ engine based on Box2D.</translate> === <translate>Classes</translate> === <div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">[[Special:MyLanguage/b2|b2]]<br /> [[Special:MyLanguage/b2.Body|b2.Body]]<br /> [[Special:MyLanguage/b2.ChainShape|b2.ChainShape]]<br /> [[Special:MyLanguage/b2.CircleShape|b2.CircleShape]]<br /> [[Special:MyLanguage/b2.Contact|b2.Contact]]<br /> [[Special:MyLanguage/b2.DebugDraw|b2.DebugDraw]]<br /> [[Special:MyLanguage/b2.DistanceJoint|b2.DistanceJoint]]<br /> [[Special:MyLanguage/b2.EdgeShape|b2.EdgeShape]]<br /> [[Special:MyLanguage/b2.Fixture|b2.Fixture]]<br /> [[Special:MyLanguage/b2.FrictionJoint|b2.FrictionJoint]]<br /> [[Special:MyLanguage/b2.GearJoint|b2.GearJoint]]<br /> [[Special:MyLanguage/b2.Joint|b2.Joint]]<br /> [[Special:MyLanguage/b2.Manifold|b2.Manifold]]<br /> [[Special:MyLanguage/b2.MouseJoint|b2.MouseJoint]]<br /> [[Special:MyLanguage/b2.ParticleSystem|b2.ParticleSystem]]<br /> [[Special:MyLanguage/b2.PolygonShape|b2.PolygonShape]]<br /> [[Special:MyLanguage/b2.PrismaticJoint|b2.PrismaticJoint]]<br /> [[Special:MyLanguage/b2.PulleyJoint|b2.PulleyJoint]]<br /> [[Special:MyLanguage/b2.RevoluteJoint|b2.RevoluteJoint]]<br /> [[Special:MyLanguage/b2.RopeJoint|b2.RopeJoint]]<br /> [[Special:MyLanguage/b2.Shape|b2.Shape]]<br /> [[Special:MyLanguage/b2.WeldJoint|b2.WeldJoint]]<br /> [[Special:MyLanguage/b2.WheelJoint|b2.WheelJoint]]<br /> [[Special:MyLanguage/b2.World|b2.World]]<br /> [[Special:MyLanguage/b2.WorldManifold|b2.WorldManifold]]<br /> </div> f7h1u3f8qi4rkgmbdzdczbwbbl9kpq8 B2 0 26 14686 11674 2019-12-06T13:07:17Z MoKaLux 19 added template wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2 --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> === <translate>Description</translate> === <translate><br /> To load the Box2D library, call ''require &quot;box2d&quot;''. After loading Box2D library, [[Special:MyLanguage/b2|b2]] table stores all <br /> classes and functions related to Box2D physics library. <br /> <br /></translate> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.createDistanceJointDef|b2.createDistanceJointDef]] ''<translate>creates and returns a distance joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createDistanceJointDef(bodyA,bodyB,anchorAx,anchorAy,anchorBx,anchorBy) creates and returns a distance joint definition table --> [[Special:MyLanguage/b2.createFrictionJointDef|b2.createFrictionJointDef]] ''<translate>creates and returns a friction joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createFrictionJointDef(bodyA,bodyB,anchorx,anchory) creates and returns a friction joint definition table --> [[Special:MyLanguage/b2.createGearJointDef|b2.createGearJointDef]] ''<translate>creates and returns a gear joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createGearJointDef(bodyA,bodyB,joint1,joint2,ratio) creates and returns a gear joint definition table --> [[Special:MyLanguage/b2.createMouseJointDef|b2.createMouseJointDef]] ''<translate>creates and returns a mouse joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createMouseJointDef(bodyA,bodyB,targetx,targety,maxForce,frequencyHz,dampingRatio) creates and returns a mouse joint definition table --> [[Special:MyLanguage/b2.createPrismaticJointDef|b2.createPrismaticJointDef]] ''<translate>creates and returns a prismatic joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createPrismaticJointDef(bodyA,bodyB,anchorx,anchory,axisx,axisy) creates and returns a prismatic joint definition table --> [[Special:MyLanguage/b2.createPulleyJointDef|b2.createPulleyJointDef]] ''<translate>creates and returns a pulley joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createPulleyJointDef(bodyA,bodyB,groundAnchorAx,groundAnchorAy,groundAnchorBx,groundAnchorBy,anchorAx,anchorAy,anchorBx,anchorBy,ratio) creates and returns a pulley joint definition table --> [[Special:MyLanguage/b2.createRevoluteJointDef|b2.createRevoluteJointDef]] ''<translate>creates and returns a revolute joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createRevoluteJointDef(bodyA,bodyB,anchorx,anchory) creates and returns a revolute joint definition table --> [[Special:MyLanguage/b2.createRopeJointDef|b2.createRopeJointDef]] <br/><!-- GIDEROSMTD:b2.createRopeJointDef(bodyA,bodyB,anchorAx,anchorAy,anchorBx,anchorBy,maxLength) --> [[Special:MyLanguage/b2.createWeldJointDef|b2.createWeldJointDef]] ''<translate>creates and returns a weld joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createWeldJointDef(bodyA,bodyB,anchorAx,anchorAy,anchorBx,anchorBy) creates and returns a weld joint definition table --> [[Special:MyLanguage/b2.createWheelJointDef|b2.createWheelJointDef]] ''<translate>creates and returns a wheel joint definition table</translate>''<br/><!-- GIDEROSMTD:b2.createWheelJointDef(bodyA,bodyB,anchorx,anchory,axisx,axisy) creates and returns a wheel joint definition table --> [[Special:MyLanguage/b2.getScale|b2.getScale]] ''<translate>returns the global pixels to meters scale</translate>''<br/><!-- GIDEROSMTD:b2.getScale() returns the global pixels to meters scale --> [[Special:MyLanguage/b2.setScale|b2.setScale]] ''<translate>sets the global pixels to meters scale</translate>''<br/><!-- GIDEROSMTD:b2.setScale(scale) sets the global pixels to meters scale --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === [[Special:MyLanguage/b2.DISTANCE_JOINT|b2.DISTANCE_JOINT]]<br/><!-- GIDEROSCST:b2.DISTANCE_JOINT 3--> [[Special:MyLanguage/b2.DYNAMIC_BODY|b2.DYNAMIC_BODY]]<br/><!-- GIDEROSCST:b2.DYNAMIC_BODY 2--> [[Special:MyLanguage/b2.FRICTION_JOINT|b2.FRICTION_JOINT]]<br/><!-- GIDEROSCST:b2.FRICTION_JOINT 9--> [[Special:MyLanguage/b2.GEAR_JOINT|b2.GEAR_JOINT]]<br/><!-- GIDEROSCST:b2.GEAR_JOINT 6--> [[Special:MyLanguage/b2.KINEMATIC_BODY|b2.KINEMATIC_BODY]]<br/><!-- GIDEROSCST:b2.KINEMATIC_BODY 1--> [[Special:MyLanguage/b2.MOUSE_JOINT|b2.MOUSE_JOINT]]<br/><!-- GIDEROSCST:b2.MOUSE_JOINT 5--> [[Special:MyLanguage/b2.PRISMATIC_JOINT|b2.PRISMATIC_JOINT]]<br/><!-- GIDEROSCST:b2.PRISMATIC_JOINT 2--> [[Special:MyLanguage/b2.PULLEY_JOINT|b2.PULLEY_JOINT]]<br/><!-- GIDEROSCST:b2.PULLEY_JOINT 4--> [[Special:MyLanguage/b2.REVOLUTE_JOINT|b2.REVOLUTE_JOINT]]<br/><!-- GIDEROSCST:b2.REVOLUTE_JOINT 1--> [[Special:MyLanguage/b2.ROPE_JOINT|b2.ROPE_JOINT]]<br/><!-- GIDEROSCST:b2.ROPE_JOINT 10--> [[Special:MyLanguage/b2.STATIC_BODY|b2.STATIC_BODY]]<br/><!-- GIDEROSCST:b2.STATIC_BODY 0--> [[Special:MyLanguage/b2.WELD_JOINT|b2.WELD_JOINT]]<br/><!-- GIDEROSCST:b2.WELD_JOINT 8--> [[Special:MyLanguage/b2.WHEEL_JOINT|b2.WHEEL_JOINT]]<br/><!-- GIDEROSCST:b2.WHEEL_JOINT 7--> |} {{B2}} {{LiquidFun}} 300g2h80dv8jwfgxhm7k2drgri5w6gf B2.Body 0 126 12775 11679 2018-10-05T18:19:29Z PaulR 6 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.Body --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> <br/> === <translate>Description</translate> === <translate><br /> A rigid body. These are created via [[Special:MyLanguage/b2.World:createBody|b2.World:createBody]].<br /> <br /></translate> === <translate>Examples</translate> === '''Creating Box2d body and moving Bitmap along the body'''<br/> <source lang="lua">require "box2d" local world = b2.World.new(0, 10, true) --create ball bitmap object from ball graphic local ball = Bitmap.new(Texture.new("ball.png")) --reference center of the ball for positioning ball:setAnchorPoint(0.5,0.5) ball:setPosition(100,100) --get radius local radius = ball:getWidth()/2 --create box2d physical object local body = world:createBody{type = b2.DYNAMIC_BODY} local circle = b2.CircleShape.new(0, 0, radius) local fixture = body:createFixture{shape = circle, density = 1.0, friction = 0.1, restitution = 0.2} ball.body = body --add to scene stage:addChild(ball) stage:addEventListener(Event.ENTER_FRAME, function() -- edit the step values if required. These are good defaults! world:step(1/60, 8, 3) ball:setPosition(ball.body:getPosition()) ball:setRotation(math.rad(ball.body:getAngle())) end)</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.Body:applyAngularImpulse|b2.Body:applyAngularImpulse]] ''<translate>applies an angular impulse</translate>''<br/><!-- GIDEROSMTD:b2.Body:applyAngularImpulse(impulse) applies an angular impulse --> [[Special:MyLanguage/b2.Body:applyForce|b2.Body:applyForce]] ''<translate>applies a force at a world point</translate>''<br/><!-- GIDEROSMTD:b2.Body:applyForce(forcex,forcey,pointx,pointy) applies a force at a world point --> [[Special:MyLanguage/b2.Body:applyLinearImpulse|b2.Body:applyLinearImpulse]] ''<translate>applies an impulse at a point</translate>''<br/><!-- GIDEROSMTD:b2.Body:applyLinearImpulse(impulsex,impulsey,pointx,pointy) applies an impulse at a point --> [[Special:MyLanguage/b2.Body:applyTorque|b2.Body:applyTorque]] ''<translate>applies a torque</translate>''<br/><!-- GIDEROSMTD:b2.Body:applyTorque(torque) applies a torque --> [[Special:MyLanguage/b2.Body:createFixture|b2.Body:createFixture]] ''<translate>creates a fixture and attach it to this body</translate>''<br/><!-- GIDEROSMTD:b2.Body:createFixture(fixtureDef) creates a fixture and attach it to this body --> [[Special:MyLanguage/b2.Body:destroyFixture|b2.Body:destroyFixture]] ''<translate>destroys a fixture</translate>''<br/><!-- GIDEROSMTD:b2.Body:destroyFixture(fixture) destroys a fixture --> [[Special:MyLanguage/b2.Body:getAngle|b2.Body:getAngle]] ''<translate>returns the current world rotation angle in radians</translate>''<br/><!-- GIDEROSMTD:b2.Body:getAngle() returns the current world rotation angle in radians --> [[Special:MyLanguage/b2.Body:getAngularDamping|b2.Body:getAngularDamping]] ''<translate>returns the angular damping of the body</translate>''<br/><!-- GIDEROSMTD:b2.Body:getAngularDamping() returns the angular damping of the body --> [[Special:MyLanguage/b2.Body:getAngularVelocity|b2.Body:getAngularVelocity]] ''<translate>returns the angular velocity</translate>''<br/><!-- GIDEROSMTD:b2.Body:getAngularVelocity() returns the angular velocity --> [[Special:MyLanguage/b2.Body:getGravityScale|b2.Body:getGravityScale]] ''<translate>returns the gravity scale of the body</translate>''<br/><!-- GIDEROSMTD:b2.Body:getGravityScale() returns the gravity scale of the body --> [[Special:MyLanguage/b2.Body:getInertia|b2.Body:getInertia]] ''<translate>returns the rotational inertia of the body about the local origin in kg-m^2</translate>''<br/><!-- GIDEROSMTD:b2.Body:getInertia() returns the rotational inertia of the body about the local origin in kg-m^2 --> [[Special:MyLanguage/b2.Body:getLinearDamping|b2.Body:getLinearDamping]] ''<translate>returns the linear damping of the body</translate>''<br/><!-- GIDEROSMTD:b2.Body:getLinearDamping() returns the linear damping of the body --> [[Special:MyLanguage/b2.Body:getLinearVelocity|b2.Body:getLinearVelocity]] ''<translate>returns the linear velocity of the center of mass</translate>''<br/><!-- GIDEROSMTD:b2.Body:getLinearVelocity() returns the linear velocity of the center of mass --> [[Special:MyLanguage/b2.Body:getLocalCenter|b2.Body:getLocalCenter]] ''<translate>returns the local position of the center of mass</translate>''<br/><!-- GIDEROSMTD:b2.Body:getLocalCenter() returns the local position of the center of mass --> [[Special:MyLanguage/b2.Body:getLocalPoint|b2.Body:getLocalPoint]] <br/><!-- GIDEROSMTD:b2.Body:getLocalPoint(x,y) --> [[Special:MyLanguage/b2.Body:getLocalVector|b2.Body:getLocalVector]] <br/><!-- GIDEROSMTD:b2.Body:getLocalVector(x,y) --> [[Special:MyLanguage/b2.Body:getMass|b2.Body:getMass]] ''<translate>returns the total mass of the body in kilograms (kg)</translate>''<br/><!-- GIDEROSMTD:b2.Body:getMass() returns the total mass of the body in kilograms (kg) --> [[Special:MyLanguage/b2.Body:getPosition|b2.Body:getPosition]] ''<translate>returns the world body origin position</translate>''<br/><!-- GIDEROSMTD:b2.Body:getPosition() returns the world body origin position --> [[Special:MyLanguage/b2.Body:getWorldCenter|b2.Body:getWorldCenter]] ''<translate>returns the world position of the center of mass</translate>''<br/><!-- GIDEROSMTD:b2.Body:getWorldCenter() returns the world position of the center of mass --> [[Special:MyLanguage/b2.Body:getWorldPoint|b2.Body:getWorldPoint]] <br/><!-- GIDEROSMTD:b2.Body:getWorldPoint(x,y) --> [[Special:MyLanguage/b2.Body:getWorldVector|b2.Body:getWorldVector]] <br/><!-- GIDEROSMTD:b2.Body:getWorldVector(x,y) --> [[Special:MyLanguage/b2.Body:isActive|b2.Body:isActive]] ''<translate>returns the active state of the body</translate>''<br/><!-- GIDEROSMTD:b2.Body:isActive() returns the active state of the body --> [[Special:MyLanguage/b2.Body:isAwake|b2.Body:isAwake]] ''<translate>returns the sleeping state of the body</translate>''<br/><!-- GIDEROSMTD:b2.Body:isAwake() returns the sleeping state of the body --> [[Special:MyLanguage/b2.Body:isBullet|b2.Body:isBullet]] <br/><!-- GIDEROSMTD:b2.Body:isBullet() --> [[Special:MyLanguage/b2.Body:isFixedRotation|b2.Body:isFixedRotation]] <br/><!-- GIDEROSMTD:b2.Body:isFixedRotation() --> [[Special:MyLanguage/b2.Body:isSleepingAllowed|b2.Body:isSleepingAllowed]] <br/><!-- GIDEROSMTD:b2.Body:isSleepingAllowed() --> [[Special:MyLanguage/b2.Body:setActive|b2.Body:setActive]] ''<translate>sets the active state of the body</translate>''<br/><!-- GIDEROSMTD:b2.Body:setActive(flag) sets the active state of the body --> [[Special:MyLanguage/b2.Body:setAngle|b2.Body:setAngle]] <br/><!-- GIDEROSMTD:b2.Body:setAngle(angle) --> [[Special:MyLanguage/b2.Body:setAngularDamping|b2.Body:setAngularDamping]] ''<translate>sets the angular damping of the body</translate>''<br/><!-- GIDEROSMTD:b2.Body:setAngularDamping(angularDamping) sets the angular damping of the body --> [[Special:MyLanguage/b2.Body:setAngularVelocity|b2.Body:setAngularVelocity]] ''<translate>sets the angular velocity</translate>''<br/><!-- GIDEROSMTD:b2.Body:setAngularVelocity(omega) sets the angular velocity --> [[Special:MyLanguage/b2.Body:setAwake|b2.Body:setAwake]] ''<translate>sets the sleep state of the body</translate>''<br/><!-- GIDEROSMTD:b2.Body:setAwake(awake) sets the sleep state of the body --> [[Special:MyLanguage/b2.Body:setBullet|b2.Body:setBullet]] <br/><!-- GIDEROSMTD:b2.Body:setBullet(flag) --> [[Special:MyLanguage/b2.Body:setFixedRotation|b2.Body:setFixedRotation]] <br/><!-- GIDEROSMTD:b2.Body:setFixedRotation(flag) --> [[Special:MyLanguage/b2.Body:setGravityScale|b2.Body:setGravityScale]] ''<translate>sets the gravity scale of the body</translate>''<br/><!-- GIDEROSMTD:b2.Body:setGravityScale(scale) sets the gravity scale of the body --> [[Special:MyLanguage/b2.Body:setLinearDamping|b2.Body:setLinearDamping]] ''<translate>sets the linear damping of the body</translate>''<br/><!-- GIDEROSMTD:b2.Body:setLinearDamping(linearDamping) sets the linear damping of the body --> [[Special:MyLanguage/b2.Body:setLinearVelocity|b2.Body:setLinearVelocity]] ''<translate>sets the linear velocity of the center of mass</translate>''<br/><!-- GIDEROSMTD:b2.Body:setLinearVelocity(x,y) sets the linear velocity of the center of mass --> [[Special:MyLanguage/b2.Body:setPosition|b2.Body:setPosition]] ''<translate>sets the world body origin position</translate>''<br/><!-- GIDEROSMTD:b2.Body:setPosition(x,y) sets the world body origin position --> [[Special:MyLanguage/b2.Body:setSleepingAllowed|b2.Body:setSleepingAllowed]] <br/><!-- GIDEROSMTD:b2.Body:setSleepingAllowed(flag) --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} g20hlpm3d6up5s01xot3q304iv5q6kb B2.Body:applyAngularImpulse 0 784 10298 7924 2018-09-03T08:58:39Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Applies an angular impulse.<br /> <br /></translate> <source lang="lua"> b2.Body:applyAngularImpulse(impulse) </source> === <translate>Parameters</translate> === '''impulse''': (number) <translate>the angular impulse in units of kg*m*m/s</translate> <br/> 8v6b3ilcm7cm8nj9ctc0w87l46r0lqa B2.Body:applyForce 0 391 9835 7480 2018-09-03T08:57:43Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Applies a force at a world point. If the force is not<br /> applied at the center of mass, it will generate a torque and<br /> affect the angular velocity. This wakes up the body.<br /> <br /></translate> <source lang="lua"> b2.Body:applyForce(forcex,forcey,pointx,pointy) </source> === <translate>Parameters</translate> === '''forcex''': (number) <translate></translate> <br/> '''forcey''': (number) <translate></translate> <br/> '''pointx''': (number) <translate>the x coordinate of the world position of the point of application</translate> <br/> '''pointy''': (number) <translate>the y coordinate of the world position of the point of application</translate> <br/> khzb593bbfv8gg2ny1y9ilzuud6u1z2 B2.Body:applyLinearImpulse 0 844 10706 7974 2018-09-03T08:59:49Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Applies an impulse at a point. This immediately modifies the velocity. It also<br /> modifies the angular velocity if the point of application is not at the center of<br /> mass. This wakes up the body.<br /> <br /></translate> <source lang="lua"> b2.Body:applyLinearImpulse(impulsex,impulsey,pointx,pointy) </source> === <translate>Parameters</translate> === '''impulsex''': (number) <translate>the x coordinate of the world impulse vector, usually in N-seconds or kg-m/s</translate> <br/> '''impulsey''': (number) <translate>the y coordinate of the world impulse vector, usually in N-seconds or kg-m/s</translate> <br/> '''pointx''': (number) <translate>the x coordinate of the world position of the point of application</translate> <br/> '''pointy''': (number) <translate>the y coordinate of the world position of the point of application</translate> <br/> l4o8i1bubfaxostb2rsav6ki7uj3f93 B2.Body:applyTorque 0 303 9728 7374 2018-09-03T08:57:32Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Applies a torque. This affects the angular velocity without affecting<br /> the linear velocity of the center of mass. This wakes up the body.<br /> <br /></translate> <source lang="lua"> b2.Body:applyTorque(torque) </source> === <translate>Parameters</translate> === '''torque''': (number) <translate>, usually in N-m</translate> <br/> egn77qyzu0n4jq0dqjdi75pb5cqtiys B2.Body:createFixture 0 334 9771 8802 2018-09-03T08:57:37Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Creates a fixture and attach it to this body. If the density is non-zero, this function automatically<br /> updates the mass of the body. Contacts are not created until the next time step. The fixture definition is given<br /> as a ordinary table. The fields of the fixture definition table are:<br /> <br /> <ul><br /> <li>''shape'': (b2.Shape) The shape, this must be set.</li><br /> <li>''friction'': (number) The friction coefficient, usually in the range [0,1].</li><br /> <li>''restitution'': (number) The restitution (elasticity) usually in the range [0,1].</li><br /> <li>''density'': (number) The density, usually in kg/m^2.</li><br /> <li>''isSensor'': (boolean) A sensor shape collects contact information but never generates a collision response.</li><br /> <li>''filter'': (table) Contact filtering data. The definition of contact filtering data is given at [[Special:MyLanguage/b2.Fixture:setFilterData|b2.Fixture:setFilterData]] function.</li><br /> </ul><br /> <br /> The unset fields gets default values.<br /> <br /> <ul><br /> <li>''Warning'': This function is locked during callbacks.</li><br /> </ul><br /> <br /></translate> <source lang="lua"> (b2.Fixture) = b2.Body:createFixture(fixtureDef) </source> === <translate>Parameters</translate> === '''fixtureDef''': (table) <translate></translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (b2.Fixture) <translate>The created fixture instance.</translate><br/> egrd8z1uc29zbhvpjfj5oq4tsei5r2o B2.Body:destroyFixture 0 167 9555 7201 2018-09-03T08:57:14Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Destroy a fixture. This removes the fixture from the broad-phase and destroys all<br /> contacts associated with this fixture. This will automatically adjust the mass of the body if the<br /> body is dynamic and the fixture has positive density. All fixtures attached to a body are implicitly<br /> destroyed when the body is destroyed.<br /> <br /> &lt;ul&gt;<br /> &lt;li&gt;*Warning:** This function is locked during callbacks.&lt;/li&gt;<br /> &lt;/ul&gt;<br /> <br /></translate> <source lang="lua"> b2.Body:destroyFixture(fixture) </source> === <translate>Parameters</translate> === '''fixture''': (b2.Fixture) <translate>the fixture to be removed</translate> <br/> au9ih3u6p7x430qnwfwc6trd8clxtn4 B2.Body:getAngle 0 188 9582 7231 2018-09-03T08:57:17Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Returns the current world rotation angle in radians.<br /> <br /></translate> <source lang="lua"> (number) = b2.Body:getAngle() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>Current body angle in radians</translate><br/> c4028ps71f716f568tmfyxisw99f4yk B2.Body:getAngularDamping 0 486 9972 7609 2018-09-03T08:57:57Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.2.2<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Returns the angular damping of the body. <br /> <br /></translate> <source lang="lua"> (number) = b2.Body:getAngularDamping() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The angular damping of the body</translate><br/> su1ydg094x8cda2rshsb46xi8i7lt0f B2.Body:getAngularVelocity 0 850 10345 8358 2018-09-03T08:58:51Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Returns the angular velocity.<br /> <br /></translate> <source lang="lua"> (number) = b2.Body:getAngularVelocity() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>Angular velocity in radians/second</translate><br/> o7nur5i7qu8jyz1sodus46xzqgfeikh B2.Body:getGravityScale 0 690 10237 7859 2018-09-03T08:58:26Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.2.2.1<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Returns the gravity scale of the body. <br /> <br /></translate> <source lang="lua"> (number) = b2.Body:getGravityScale() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The gravity scale of the body</translate><br/> euwr2q8740gp757hnyj2e9zqh2a6wb7 B2.Body:getInertia 0 630 10165 7807 2018-09-03T08:58:18Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.2.2<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Returns the rotational inertia of the body about the local origin in kg-m^2.<br /> <br /></translate> <source lang="lua"> (number) = b2.Body:getInertia() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The rotational inertia of the body about the local origin in kg-m^2.</translate><br/> kok9gfo2wedixwic6k5qijy6byp85vx B2.Body:getLinearDamping 0 917 10769 8023 2018-09-03T08:59:56Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.2.2<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Returns the linear damping of the body. <br /> <br /></translate> <source lang="lua"> (number) = b2.Body:getLinearDamping() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The linear damping of the body</translate><br/> a5fnrq1tiq14do812gnkwv13mk0n27w B2.Body:getLinearVelocity 0 1124 10582 8226 2018-09-03T08:59:37Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Returns the linear velocity of the center of mass.<br /> <br /></translate> <source lang="lua"> (number), (number) = b2.Body:getLinearVelocity() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x vector of the linear velocity</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y vector of the linear velocity</translate><br/> 5rtif02ccs1dsgp29gcm07x9ltp9i3o B2.Body:getLocalCenter 0 1117 10571 8216 2018-09-03T08:59:36Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.2.2<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Returns the local position of the center of mass. <br /> <br /></translate> <source lang="lua"> (number), (number) = b2.Body:getLocalCenter() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x coordinate of the local position of the center of mass</translate><br/> '''<translate>Returns</translate>''' (number) <translate>x coordinate of the local position of the center of mass</translate><br/> fohvz9mnzkpvarg85ld2e266lbujeqx B2.Body:getLocalPoint 0 490 9974 7613 2018-09-03T08:57:57Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Returns the local coordinates of a point given the world coordinates.<br /> <br /></translate> <source lang="lua"> (number), (number) = b2.Body:getLocalPoint(x,y) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>x coordinate of the world point</translate> <br/> '''y''': (number) <translate>y coordinate of the world point</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x coordinate of the provided point expressed in local coordinates</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y coordinate of the provided point expressed in local coordinates</translate><br/> pqeo69tgjjq0zbs9s4jor710mm6o0lm B2.Body:getLocalVector 0 491 9973 7614 2018-09-03T08:57:57Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Returns the local coordinates of a vector given the world coordinates. <br /> <br /></translate> <source lang="lua"> (number), (number) = b2.Body:getLocalVector(x,y) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>x coordinate of the world vector</translate> <br/> '''y''': (number) <translate>y coordinate of the world vector</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x vector of the provided vector expressed in local coordinates</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y vector of the provided vector expressed in local coordinates</translate><br/> m9nw64twntqzz924xmxw2pm98rb6o83 B2.Body:getMass 0 329 9760 7408 2018-09-03T08:57:36Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.2.2<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Returns the total mass of the body in kilograms (kg).<br /> <br /></translate> <source lang="lua"> (number) = b2.Body:getMass() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The total mass of the body in kilograms (kg)</translate><br/> 1qlowkkm83wa1n7xt2uqnekr6nddmpb B2.Body:getPosition 0 409 9858 7499 2018-09-03T08:57:45Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Returns the world body origin position.<br /> <br /></translate> <source lang="lua"> (number), (number) = b2.Body:getPosition() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x coordinate of the body position</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y coordinate of the body position</translate><br/> oo5f2gnauogxc4559xfztth3h4grsyp B2.Body:getWorldCenter 0 1138 10600 8245 2018-09-03T08:59:39Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.2.2<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Returns the world position of the center of mass.<br /> <br /></translate> <source lang="lua"> (number), (number) = b2.Body:getWorldCenter() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x coordinate of the world position of the center of mass</translate><br/> '''<translate>Returns</translate>''' (number) <translate>x coordinate of the world position of the center of mass</translate><br/> mbd4n650v7fhavu9gl7bbyev39151he B2.Body:getWorldPoint 0 283 9710 7346 2018-09-03T08:57:30Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Returns the world coordinates of a point given the local coordinates.<br /> <br /></translate> <source lang="lua"> (number), (number) = b2.Body:getWorldPoint(x,y) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>x coordinate of the local point</translate> <br/> '''y''': (number) <translate>y coordinate of the local point</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x coordinate of the provided point expressed in world coordinates</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y coordinate of the provided point expressed in world coordinates</translate><br/> oczyxxhs9yvpnfk3rept27e9ok0rtea B2.Body:getWorldVector 0 783 10293 8331 2018-09-03T08:58:38Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Returns the world coordinates of a vector given the local coordinates. <br /> <br /></translate> <source lang="lua"> (number), (number) = b2.Body:getWorldVector(x,y) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>x coordinate of the local vector</translate> <br/> '''y''': (number) <translate>y coordinate of the local vector</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x vector of the provided vector expressed in world coordinates</translate><br/> '''<translate>Returns</translate>''' (number) <translate>x vector of the provided vector expressed in world coordinates</translate><br/> d52ieju5pgx86fx3a11l6w9iikzp45z B2.Body:isActive 0 825 10331 8686 2018-09-03T08:58:48Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Returns the active state of the body.<br /> <br /></translate> <source lang="lua"> (bool) = b2.Body:isActive() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>''true'' if the body is active, ''false'' otherwise</translate><br/> 3rjnxycaz2rqpopkqo1om7n8cx75d4b B2.Body:isAwake 0 597 10115 8613 2018-09-03T08:58:12Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Returns the sleeping state of this body. Returns ''true'' if body is awake (not sleeping), ''false'' otherwise.<br /> <br /></translate> <source lang="lua"> (bool) = b2.Body:isAwake() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>The sleeping state of this body.</translate><br/> 97i3r1l9raoyqoia4yu55x0268j11oi B2.Body:isBullet 0 343 9781 7427 2018-09-03T08:57:38Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /></translate> <source lang="lua"> (bool) = b2.Body:isBullet() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>if body is set to behave bullet</translate><br/> 4myesq9t8b53c0korug2zlmj1v6gioh B2.Body:isFixedRotation 0 674 10222 8270 2018-09-03T08:58:24Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /></translate> <source lang="lua"> (bool) = b2.Body:isFixedRotation() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>if body has fixed rotation set</translate><br/> r3zejvgpsjuupgybloq19xhqk3thfg9 B2.Body:isSleepingAllowed 0 881 10734 8379 2018-09-03T08:59:53Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /></translate> <source lang="lua"> (bool) = b2.Body:isSleepingAllowed() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>if body is allowed to sleep</translate><br/> nz94e7krvnaugxyrimbozcz56pbroom B2.Body:setActive 0 553 10056 7698 2018-09-03T08:58:06Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Sets the active state of the body. An inactive body is not simulated and cannot be collided with or woken up. <br /> If you pass a flag of true, all fixtures will be added to the broad-phase. If you pass a flag of false,<br /> all fixtures will be removed from the broad-phase and all contacts will be destroyed. Fixtures and joints are <br /> otherwise unaffected. You may continue to create/destroy fixtures and joints on inactive bodies. <br /> Fixtures on an inactive body are implicitly inactive and will not participate in collisions, ray-casts, or queries. <br /> Joints connected to an inactive body are implicitly inactive. An inactive body is still owned by a [[b2.World]] object and <br /> remains in the body list.<br /> <br /></translate> <source lang="lua"> b2.Body:setActive(flag) </source> === <translate>Parameters</translate> === '''flag''': (boolean) <translate>active flag</translate> <br/> 220vjwdvy1srmqz8q7io0j6p3yqyt6p B2.Body:setAngle 0 691 10238 7861 2018-09-03T08:58:26Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Sets the current world rotation angle in radians.<br /> <br /></translate> <source lang="lua"> b2.Body:setAngle(angle) </source> === <translate>Parameters</translate> === '''angle''': (number) <translate>world rotation angle in radians</translate> <br/> jl5mwvs070cn34jtx7wnajek0jqa60i B2.Body:setAngularDamping 0 510 9988 7627 2018-09-03T08:57:59Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.2.2<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Sets the angular damping of the body. <br /> <br /></translate> <source lang="lua"> b2.Body:setAngularDamping(angularDamping) </source> === <translate>Parameters</translate> === '''angularDamping''': (number) <translate>new angular damping of the body</translate> <br/> 192hplep2hsiwp3z5ffbezl8ohtbujq B2.Body:setAngularVelocity 0 135 9516 7167 2018-09-03T08:57:09Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Sets the angular velocity.<br /> <br /></translate> <source lang="lua"> b2.Body:setAngularVelocity(omega) </source> === <translate>Parameters</translate> === '''omega''': (number) <translate>the new angular velocity in radians/second</translate> <br/> ew6lm5v1xbkcijrkctz14vysbtae4j0 B2.Body:setAwake 0 793 10300 7947 2018-09-03T08:58:41Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.2.2.1<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Set the sleep state of the body. A sleeping body has very low CPU cost.<br /> <br /></translate> <source lang="lua"> b2.Body:setAwake(awake) </source> === <translate>Parameters</translate> === '''awake''': (boolean) <translate>set to true to wake body, false to put it to sleep</translate> <br/> hqpibdv06currmbe0umfxdywws9l0hh B2.Body:setBullet 0 485 9965 7608 2018-09-03T08:57:56Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /></translate> <source lang="lua"> b2.Body:setBullet(flag) </source> === <translate>Parameters</translate> === '''flag''': (boolean) <translate></translate> <br/> 0w99785ljyyzky1ezir3abcgm2epyzu B2.Body:setFixedRotation 0 468 9932 7572 2018-09-03T08:57:53Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /></translate> <source lang="lua"> b2.Body:setFixedRotation(flag) </source> === <translate>Parameters</translate> === '''flag''': (boolean) <translate></translate> <br/> bibvlwyjrr92vtu5t31wc7on1rpw1i2 B2.Body:setGravityScale 0 612 10146 7771 2018-09-03T08:58:16Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.2.2.1<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Sets the gravity scale of the body. <br /> <br /></translate> <source lang="lua"> b2.Body:setGravityScale(scale) </source> === <translate>Parameters</translate> === '''scale''': (number) <translate>new gravity scale of the body</translate> <br/> oux5i1pc3ah4o6pcc6prfknmgl89et3 B2.Body:setLinearDamping 0 471 9939 7577 2018-09-03T08:57:53Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.2.2<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Sets the linear damping of the body. <br /> <br /></translate> <source lang="lua"> b2.Body:setLinearDamping(linearDamping) </source> === <translate>Parameters</translate> === '''linearDamping''': (number) <translate>new linear damping of the body</translate> <br/> 3kwtyfl6ujsav1hg3anb5rwyni4skfq B2.Body:setLinearVelocity 0 150 9526 7169 2018-09-03T08:57:10Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Sets the linear velocity of the center of mass.<br /> <br /></translate> <source lang="lua"> b2.Body:setLinearVelocity(x,y) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>x coordinate of the linear velocity</translate> <br/> '''y''': (number) <translate>y coordinate of the linear velocity</translate> <br/> enbri9hndx9i23veuqgefe3toiw9puz B2.Body:setPosition 0 1125 10584 8230 2018-09-03T08:59:37Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /> Sets the world body origin position.<br /> <br /></translate> <source lang="lua"> b2.Body:setPosition(x,y) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>x coordinate of the position</translate> <br/> '''y''': (number) <translate>y coordinate of the position</translate> <br/> 3w0bic8t3oznj4fkb11fw0e1gqcf9x0 B2.Body:setSleepingAllowed 0 267 9676 7326 2018-09-03T08:57:26Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Body|b2.Body]]<br/> === <translate>Description</translate> === <translate><br /></translate> <source lang="lua"> b2.Body:setSleepingAllowed(flag) </source> === <translate>Parameters</translate> === '''flag''': (boolean) <translate></translate> <br/> 9o3a5vffjvt85t1dxsub6tjj8wnf2da B2.ChainShape 0 39 12774 12773 2018-10-05T18:18:31Z PaulR 6 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.ChainShape --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2012.2.2<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/b2.Shape|b2.Shape]]<br/> <br/> === <translate>Description</translate> === <translate><br /> A chain shape is a free form sequence of line segments. The chain has two-sided collision, so you can use inside <br /> and outside collision. Therefore, you may use any winding order. Connectivity information is used to create smooth collisions.<br /> <br /> '''Note:''' The chain will not collide properly if there are self-intersections.<br /> <br /></translate> === <translate>Examples</translate> === <br /> '''Create world bounds using ChainShape'''<br/> <source lang="lua">local body = world:createBody{type = b2.STATIC_BODY} body:setPosition(0, 0) local chain = b2.ChainShape.new() chain:createLoop( 0,0, application:getContentWidth(), 0, application:getContentWidth(), application:getContentHeight(), 0, application:getContentHeight() ) local fixture = body:createFixture{shape = chain, density = 1.0, friction = 1, restitution = 0.3}</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.ChainShape.new|b2.ChainShape.new]] <br/><!-- GIDEROSMTD:b2.ChainShape.new() --> [[Special:MyLanguage/b2.ChainShape:createChain|b2.ChainShape:createChain]] ''<translate>creates a chain with isolated end vertices</translate>''<br/><!-- GIDEROSMTD:b2.ChainShape:createChain(vertices) creates a chain with isolated end vertices --> [[Special:MyLanguage/b2.ChainShape:createLoop|b2.ChainShape:createLoop]] ''<translate>creates a loop</translate>''<br/><!-- GIDEROSMTD:b2.ChainShape:createLoop(vertices) creates a loop --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} 0v4nmzmxk5gou08so9itjs2pk3r756n B2.ChainShape.new 0 292 9712 8798 2018-09-03T08:57:30Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.ChainShape|b2.ChainShape]]<br/> === <translate>Description</translate> === <translate><br /> Creates a new [[Special:MyLanguage/b2.ChainShape|b2.ChainShape]] object.<br /> <br /></translate> <source lang="lua"> b2.ChainShape.new() </source> 0lxe3utievf9b4b8jfv7vopf2r6oyvi B2.ChainShape:createChain 0 505 9994 7641 2018-09-03T08:58:00Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.ChainShape|b2.ChainShape]]<br/> === <translate>Description</translate> === <translate><br /> Creates a chain with isolated end vertices.<br /> <br /></translate> <source lang="lua"> b2.ChainShape:createChain(vertices) </source> === <translate>Parameters</translate> === '''vertices''': (any) <translate>A list of numbers that contains the x, y coordinates of the vertices sequentially</translate> <br/> tsp3lzdznx32eubsul44x2tbzqkketj B2.ChainShape:createLoop 0 959 10783 8053 2018-09-03T08:59:57Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.ChainShape|b2.ChainShape]]<br/> === <translate>Description</translate> === <translate><br /> Creates a loop. This automatically adjusts connectivity.<br /> <br /></translate> <source lang="lua"> b2.ChainShape:createLoop(vertices) </source> === <translate>Parameters</translate> === '''vertices''': (any) <translate>A list of numbers that contains the x, y coordinates of the vertices sequentially</translate> <br/> gbs0qnwpy6dejbserv6ypwobg38dmrd B2.CircleShape 0 89 11624 9926 2018-09-13T14:32:01Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.CircleShape --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/b2.Shape|b2.Shape]]<br/> === <translate>Description</translate> === <translate><br /> A circle shape.<br /> <br /></translate> === <translate>Examples</translate> === '''Creating a circle body'''<br/> <source lang="lua">--create ball bitmap object from ball graphic local ball = Bitmap.new(Texture.new("./ball.png")) --reference center of the ball for positioning ball:setAnchorPoint(0.5,0.5) ball:setPosition(x,y) --get radius local radius = ball:getWidth()/2 --create box2d physical object local body = world:createBody{type = b2.DYNAMIC_BODY} body:setPosition(ball:getX(), ball:getY()) body:setAngle(ball:getRotation() * math.pi/180) local circle = b2.CircleShape.new(0, 0, radius) local fixture = body:createFixture{shape = circle, density = 1.0, friction = 0.1, restitution = 0.2}</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.CircleShape.new|b2.CircleShape.new]] <br/><!-- GIDEROSMTD:b2.CircleShape.new(centerx,centery,radius) --> [[Special:MyLanguage/b2.CircleShape:set|b2.CircleShape:set]] ''<translate>sets the center point and radius</translate>''<br/><!-- GIDEROSMTD:b2.CircleShape:set(centerx,centery,radius) sets the center point and radius --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} khau49ysp31l5d9wmmoxcyldekm075d B2.CircleShape.new 0 147 9528 8517 2018-09-03T08:57:10Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.CircleShape|b2.CircleShape]]<br/> === <translate>Description</translate> === <translate><br /> Creates a new [[Special:MyLanguage/b2.CircleShape|b2.CircleShape]] instance and optionally set its center point and radius.<br /> If this function is called with more than 3 parameters, [[Special:MyLanguage/b2.CircleShape|b2.CircleShape]] instance<br /> is created and its center point and radius are set. If this function is called without any <br /> paramaters, only [[Special:MyLanguage/b2.CircleShape|b2.CircleShape]] instance is created and you should set the center<br /> point and radius with [[b2.CircleShape:set]] function.<br /> <br /></translate> <source lang="lua"> (any), (any) = b2.CircleShape.new(centerx,centery,radius) </source> === <translate>Parameters</translate> === '''centerx''': (number, optional) <translate>the x coordinate of the center</translate> <br/> '''centery''': (number, optional) <translate>the y coordinate of the center</translate> <br/> '''radius''': (number, optional) <translate>the radius</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (any) <translate>A new [[Special:MyLanguage/b2.CircleShape|b2.CircleShape]] object.</translate><br/> '''<translate>Returns</translate>''' (any) <translate>A new [[Special:MyLanguage/b2.CircleShape|b2.CircleShape]] object.</translate><br/> cyrbvwmz3t2xrhmpf789wywq1y7uti1 B2.CircleShape:set 0 230 9633 7283 2018-09-03T08:57:22Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.CircleShape|b2.CircleShape]]<br/> === <translate>Description</translate> === <translate><br /> Sets the center point and radius of this instance.<br /> <br /></translate> <source lang="lua"> b2.CircleShape:set(centerx,centery,radius) </source> === <translate>Parameters</translate> === '''centerx''': (number, optional) <translate>the x coordinate of the center</translate> <br/> '''centery''': (number, optional) <translate>the y coordinate of the center</translate> <br/> '''radius''': (number, optional) <translate>the radius</translate> <br/> ra84vsqko6yuy7fg4tlvjb5klxcvvo3 B2.Contact 0 105 11699 10568 2018-09-13T14:33:31Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.Contact --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> === <translate>Description</translate> === <translate><br /> The class manages contact between two shapes. A contact exists for each overlapping AABB in the broad-phase (except if filtered). Therefore a contact object may exist that has no contact points.<br /> <br /></translate> === <translate>Examples</translate> === '''Checking collisions from bottom using b2.Contact'''<br/> <source lang="lua">local isTouchingGround = false world:addEventListener(Event.BEGIN_CONTACT, function(e) local manifold = e.contact:getWorldManifold() if manifold.normal.y > 0.9 then --collision came from bottom isTouchingGround = true end end) world:addEventListener(Event.END_CONTACT, function(e) local manifold = e.contact:getWorldManifold() if manifold.normal.y < 0.1 then --collision ended from bottom isTouchingGround = false end end)</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.Contact:getChildIndexA|b2.Contact:getChildIndexA]] <br/><!-- GIDEROSMTD:b2.Contact:getChildIndexA() --> [[Special:MyLanguage/b2.Contact:getChildIndexB|b2.Contact:getChildIndexB]] <br/><!-- GIDEROSMTD:b2.Contact:getChildIndexB() --> [[Special:MyLanguage/b2.Contact:getFixtureA|b2.Contact:getFixtureA]] <br/><!-- GIDEROSMTD:b2.Contact:getFixtureA() --> [[Special:MyLanguage/b2.Contact:getFixtureB|b2.Contact:getFixtureB]] <br/><!-- GIDEROSMTD:b2.Contact:getFixtureB() --> [[Special:MyLanguage/b2.Contact:getFriction|b2.Contact:getFriction]] <br/><!-- GIDEROSMTD:b2.Contact:getFriction() --> [[Special:MyLanguage/b2.Contact:getManifold|b2.Contact:getManifold]] <br/><!-- GIDEROSMTD:b2.Contact:getManifold() --> [[Special:MyLanguage/b2.Contact:getRestitution|b2.Contact:getRestitution]] <br/><!-- GIDEROSMTD:b2.Contact:getRestitution() --> [[Special:MyLanguage/b2.Contact:getWorldManifold|b2.Contact:getWorldManifold]] <br/><!-- GIDEROSMTD:b2.Contact:getWorldManifold() --> [[Special:MyLanguage/b2.Contact:isTouching|b2.Contact:isTouching]] <br/><!-- GIDEROSMTD:b2.Contact:isTouching() --> [[Special:MyLanguage/b2.Contact:resetFriction|b2.Contact:resetFriction]] <br/><!-- GIDEROSMTD:b2.Contact:resetFriction() --> [[Special:MyLanguage/b2.Contact:resetRestitution|b2.Contact:resetRestitution]] <br/><!-- GIDEROSMTD:b2.Contact:resetRestitution() --> [[Special:MyLanguage/b2.Contact:setEnabled|b2.Contact:setEnabled]] <br/><!-- GIDEROSMTD:b2.Contact:setEnabled(flag) --> [[Special:MyLanguage/b2.Contact:setFriction|b2.Contact:setFriction]] <br/><!-- GIDEROSMTD:b2.Contact:setFriction(friction) --> [[Special:MyLanguage/b2.Contact:setRestitution|b2.Contact:setRestitution]] <br/><!-- GIDEROSMTD:b2.Contact:setRestitution(restitution) --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} jeog1u2k01491icimigsfcdl5lv6tyn B2.Contact:getChildIndexA 0 305 9726 7373 2018-09-03T08:57:32Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Contact|b2.Contact]]<br/> === <translate>Description</translate> === <translate><br /> Returns the child primitive index for fixture A. <br /> <br /></translate> <source lang="lua"> (number) = b2.Contact:getChildIndexA() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>Returns the child primitive index for fixture A.</translate><br/> nc85f7p77g87nnuowf6olzwfek3uxe4 B2.Contact:getChildIndexB 0 302 9727 7372 2018-09-03T08:57:32Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Contact|b2.Contact]]<br/> === <translate>Description</translate> === <translate><br /> Returns the child primitive index for fixture B. <br /> <br /></translate> <source lang="lua"> (number) = b2.Contact:getChildIndexB() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>Returns the child primitive index for fixture B.</translate><br/> ar5xwcpdou6wz0lwwzxy1vp85yh17fp B2.Contact:getFixtureA 0 702 10626 8284 2018-09-03T08:59:42Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Contact|b2.Contact]]<br/> === <translate>Description</translate> === <translate><br /> Returns fixture A in this contact. <br /> <br /></translate> <source lang="lua"> (b2.Fixture) = b2.Contact:getFixtureA() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (b2.Fixture) <translate>Fixture A in this contact.</translate><br/> jkqanox5z0sle08ko3jb9n2ke2fd0d9 B2.Contact:getFixtureB 0 703 10627 8285 2018-09-03T08:59:42Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Contact|b2.Contact]]<br/> === <translate>Description</translate> === <translate><br /> Returns fixture B in this contact. <br /> <br /></translate> <source lang="lua"> (b2.Fixture) = b2.Contact:getFixtureB() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (b2.Fixture) <translate>Fixture B in this contact.</translate><br/> 01mobhm2oa9bvq3gnnpjy2pv7fr027y B2.Contact:getFriction 0 986 10432 8075 2018-09-03T08:59:12Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Contact|b2.Contact]]<br/> === <translate>Description</translate> === <translate><br /> Returns the friction.<br /> <br /></translate> <source lang="lua"> (number) = b2.Contact:getFriction() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The friction.</translate><br/> 45zorenfvzu6pyr356d6ed27id08tng B2.Contact:getManifold 0 233 9634 8791 2018-09-03T08:57:22Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Contact|b2.Contact]]<br/> === <translate>Description</translate> === <translate><br /> Returns the contact manifold as a table. This table contains [[Special:MyLanguage/points|points]], [[Special:MyLanguage/localNormal|localNormal]], [[Special:MyLanguage/localPoint|localPoint]] and [[Special:MyLanguage/type|type]] fields.<br /> <br /></translate> <source lang="lua"> (b2.Manifold) = b2.Contact:getManifold() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (b2.Manifold) <translate>the manifold of contact</translate><br/> 3mnjmpbns3w673rt1hlapnnc7ev1wa0 B2.Contact:getRestitution 0 439 9912 7551 2018-09-03T08:57:51Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Contact|b2.Contact]]<br/> === <translate>Description</translate> === <translate><br /> Returns the restitution.<br /> <br /></translate> <source lang="lua"> (number) = b2.Contact:getRestitution() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The restitution.</translate><br/> t447tf0i2kn4yh6ev0iwo5gluid35ij B2.Contact:getWorldManifold 0 762 10276 8660 2018-09-03T08:58:35Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Contact|b2.Contact]]<br/> === <translate>Description</translate> === <translate><br /> Returns the world manifold as a table. This table contains [[Special:MyLanguage/normal|normal]] and [[Special:MyLanguage/points|points]] fields.<br /> <br /></translate> <source lang="lua"> (b2.WorldManifold) = b2.Contact:getWorldManifold() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (b2.WorldManifold) <translate>Information about contact between 2 bodies relative to the world</translate><br/> 7o8hsx485ad3jjpyf5ye2wexfazs3zj B2.Contact:isTouching 0 1078 10523 8166 2018-09-03T08:59:32Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Contact|b2.Contact]]<br/> === <translate>Description</translate> === <translate><br /> Returns whether the contact is touching or not.<br /> <br /></translate> <source lang="lua"> (bool) = b2.Contact:isTouching() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>Whether the contact is touching or not.</translate><br/> 8iav92uepdywul8b0hmlxqcn1y7a6o2 B2.Contact:resetFriction 0 548 10041 7679 2018-09-03T08:58:05Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Contact|b2.Contact]]<br/> === <translate>Description</translate> === <translate><br /> Resets the friction mixture to the default value. <br /> <br /></translate> <source lang="lua"> b2.Contact:resetFriction() </source> 20sqspidyvn0ybxkxr7j55jg0z6mgrc B2.Contact:resetRestitution 0 638 10160 7795 2018-09-03T08:58:17Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Contact|b2.Contact]]<br/> === <translate>Description</translate> === <translate><br /> Resets the restitution mixture to the default value. <br /> <br /> <br /></translate> <source lang="lua"> b2.Contact:resetRestitution() </source> s88rq75m2ujhw5xyd3y1mjs1uamjepp B2.Contact:setEnabled 0 500 9983 7618 2018-09-03T08:57:59Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Contact|b2.Contact]]<br/> === <translate>Description</translate> === <translate><br /> Enables/disables the contact. This can be used inside the pre-solve contact listener. The contact is only disabled for the current time step (or sub-step in continuous collisions).<br /> <br /></translate> <source lang="lua"> b2.Contact:setEnabled(flag) </source> === <translate>Parameters</translate> === '''flag''': (boolean) <translate></translate> <br/> 8897bacshtdv1o0o1hnfay8h3rr3njh B2.Contact:setFriction 0 181 9570 7219 2018-09-03T08:57:16Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Contact|b2.Contact]]<br/> === <translate>Description</translate> === <translate><br /> Overrides the default friction mixture. You can call this in pre-solve event. This value persists until set or reset. <br /> <br /></translate> <source lang="lua"> b2.Contact:setFriction(friction) </source> === <translate>Parameters</translate> === '''friction''': (number) <translate></translate> <br/> byjcwesie9kadbzg6d0e4bkae7h7pbp B2.Contact:setRestitution 0 680 10228 8273 2018-09-03T08:58:25Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Contact|b2.Contact]]<br/> === <translate>Description</translate> === <translate><br /> Overrides the default restitution mixture. You can call this in pre-solve event. This value persists until set or reset. <br /> <br /></translate> <source lang="lua"> b2.Contact:setRestitution(restitution) </source> === <translate>Parameters</translate> === '''restitution''': (number) <translate></translate> <br/> cnitjj3yqui2zaxxmu1hc9ob4rddo5h B2.DISTANCE JOINT 0 1216 9738 7382 2018-09-03T08:57:33Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 3<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate></translate> m2gu3p2h1t5ex1nvdmclowblrme095f B2.DYNAMIC BODY 0 1342 10562 8209 2018-09-03T08:59:35Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 2<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate></translate> bmrz8lzyva6acj47rkcojurzjz8z84e B2.DebugDraw 0 104 11687 10458 2018-09-13T14:33:28Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.DebugDraw --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> === <translate>Description</translate> === <translate><br /> The [[Special:MyLanguage/b2.DebugDraw|b2.DebugDraw]] class is used to provide debug drawing of physical entities in your application. <br /> <br /></translate> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">local debugDraw = b2.DebugDraw.new() world:setDebugDraw(debugDraw) stage:addChild(debugDraw)</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.DebugDraw.new|b2.DebugDraw.new]] <br/><!-- GIDEROSMTD:b2.DebugDraw.new() --> [[Special:MyLanguage/b2.DebugDraw:appendFlags|b2.DebugDraw:appendFlags]] ''<translate>append flags to the current flags</translate>''<br/><!-- GIDEROSMTD:b2.DebugDraw:appendFlags(flags) append flags to the current flags --> [[Special:MyLanguage/b2.DebugDraw:clearFlags|b2.DebugDraw:clearFlags]] ''<translate>clear flags from the current flags</translate>''<br/><!-- GIDEROSMTD:b2.DebugDraw:clearFlags(flags) clear flags from the current flags --> [[Special:MyLanguage/b2.DebugDraw:getFlags|b2.DebugDraw:getFlags]] ''<translate>returns the debug drawing flags</translate>''<br/><!-- GIDEROSMTD:b2.DebugDraw:getFlags() returns the debug drawing flags --> [[Special:MyLanguage/b2.DebugDraw:setFlags|b2.DebugDraw:setFlags]] ''<translate>sets the debug drawing flags</translate>''<br/><!-- GIDEROSMTD:b2.DebugDraw:setFlags(flags) sets the debug drawing flags --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === [[Special:MyLanguage/b2.DebugDraw.AABB_BIT|b2.DebugDraw.AABB_BIT]]<br/><!-- GIDEROSCST:b2.DebugDraw.AABB_BIT 4--> [[Special:MyLanguage/b2.DebugDraw.CENTER_OF_MASS_BIT|b2.DebugDraw.CENTER_OF_MASS_BIT]]<br/><!-- GIDEROSCST:b2.DebugDraw.CENTER_OF_MASS_BIT 16--> [[Special:MyLanguage/b2.DebugDraw.JOINT_BIT|b2.DebugDraw.JOINT_BIT]]<br/><!-- GIDEROSCST:b2.DebugDraw.JOINT_BIT 2--> [[Special:MyLanguage/b2.DebugDraw.PAIR_BIT|b2.DebugDraw.PAIR_BIT]]<br/><!-- GIDEROSCST:b2.DebugDraw.PAIR_BIT 8--> [[Special:MyLanguage/b2.DebugDraw.SHAPE_BIT|b2.DebugDraw.SHAPE_BIT]]<br/><!-- GIDEROSCST:b2.DebugDraw.SHAPE_BIT 1--> |} lun4wf2utoqg8xjnl7cckjf1la1ae4u B2.DebugDraw.AABB BIT 0 1201 9638 7286 2018-09-03T08:57:22Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 4<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2.DebugDraw|b2.DebugDraw]]<br/> === <translate>Description</translate> === <translate>Draw bounding boxes of bodies</translate> d7efyk3bhemfu4miw776okj4hzhg5x5 B2.DebugDraw.CENTER OF MASS BIT 0 1209 9684 7340 2018-09-03T08:57:27Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 16<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2.DebugDraw|b2.DebugDraw]]<br/> === <translate>Description</translate> === <translate>Draw center of the mass of bodies</translate> 0ai9zdxcpcfe5nqcmjodl9omod3kowo B2.DebugDraw.JOINT BIT 0 1234 9892 7538 2018-09-03T08:57:49Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 2<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2.DebugDraw|b2.DebugDraw]]<br/> === <translate>Description</translate> === <translate>Draw joint information</translate> j1y0we7739d9ezjzbhawmjd5z1mxoe5 B2.DebugDraw.PAIR BIT 0 1353 9883 7529 2018-09-03T08:57:48Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 8<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2.DebugDraw|b2.DebugDraw]]<br/> === <translate>Description</translate> === <translate>Draw pair information</translate> 6xkf1rxjt100e232c18bmg7ndpor8ud B2.DebugDraw.SHAPE BIT 0 1244 10031 7673 2018-09-03T08:58:04Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 1<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2.DebugDraw|b2.DebugDraw]]<br/> === <translate>Description</translate> === <translate>Draw shapes of bodies</translate> 355jwed69x3i9xq877trtxjz3btxkzo B2.DebugDraw.new 0 186 9583 8785 2018-09-03T08:57:17Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.DebugDraw|b2.DebugDraw]]<br/> === <translate>Description</translate> === <translate><br /> Creates a new [[Special:MyLanguage/b2.DebugDraw|b2.DebugDraw]] instance.<br /> <br /></translate> <source lang="lua"> b2.DebugDraw.new() </source> ottla3tv1y1k675f07ip5b7quiaavsr B2.DebugDraw:appendFlags 0 315 9739 7384 2018-09-03T08:57:33Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.DebugDraw|b2.DebugDraw]]<br/> === <translate>Description</translate> === <translate><br /> Append flags to the current flags.<br /> <br /></translate> <source lang="lua"> b2.DebugDraw:appendFlags(flags) </source> === <translate>Parameters</translate> === '''flags''': (number) <translate>debug draw flags</translate> <br/> 3w4sysmv8g3sf67wsanwpo4qbikjkwl B2.DebugDraw:clearFlags 0 1072 10855 8160 2018-09-03T09:00:08Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.DebugDraw|b2.DebugDraw]]<br/> === <translate>Description</translate> === <translate><br /> Clear flags from the current flags.<br /> <br /></translate> <source lang="lua"> b2.DebugDraw:clearFlags(flags) </source> === <translate>Parameters</translate> === '''flags''': (number) <translate>debug draw flags</translate> <br/> 1hr7czmhtme083s77t6qqchu1uazgj9 B2.DebugDraw:getFlags 0 1139 10599 8246 2018-09-03T08:59:39Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.DebugDraw|b2.DebugDraw]]<br/> === <translate>Description</translate> === <translate><br /> Returns the debug drawing flags.<br /> <br /></translate> <source lang="lua"> (number) = b2.DebugDraw:getFlags() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The debug drawing flags</translate><br/> 5w4vu1lhvlozdj8uuabp5khfh5wje2b B2.DebugDraw:setFlags 0 1031 10490 8742 2018-09-03T08:59:24Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.DebugDraw|b2.DebugDraw]]<br/> === <translate>Description</translate> === <translate><br /> Sets the debug drawing flags. These flags are available:<br /> <br /> &lt;ul&gt;<br /> &lt;li&gt;[[Special:MyLanguage/b2.DebugDraw.SHAPE_BIT|b2.DebugDraw.SHAPE_BIT]]&lt;/li&gt;<br /> &lt;li&gt;[[Special:MyLanguage/b2.DebugDraw.JOINT_BIT|b2.DebugDraw.JOINT_BIT]]&lt;/li&gt;<br /> &lt;li&gt;[[Special:MyLanguage/b2.DebugDraw.AABB_BIT|b2.DebugDraw.AABB_BIT]]&lt;/li&gt;<br /> &lt;li&gt;[[Special:MyLanguage/b2.DebugDraw.PAIR_BIT|b2.DebugDraw.PAIR_BIT]]&lt;/li&gt;<br /> &lt;li&gt;[[Special:MyLanguage/b2.DebugDraw.CENTER_OF_MASS_BIT|b2.DebugDraw.CENTER_OF_MASS_BIT]]&lt;/li&gt;<br /> &lt;/ul&gt;<br /> <br /> [[Special:MyLanguage/b2.DebugDraw.SHAPE_BIT|b2.DebugDraw.SHAPE_BIT]] is set by default. <br /> <br /> Because Lua doesn&#039;t support bitwise operations by default, you can use '' '' operator to combine flags.<br /> <br /></translate> <source lang="lua"> b2.DebugDraw:setFlags(flags) </source> === <translate>Parameters</translate> === '''flags''': (number) <translate>debug draw flags</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">local debugDraw = b2.DebugDraw.new() debugDraw:setFlags(b2.DebugDraw.SHAPE_BIT b2.DebugDraw.JOINT_BIT)</source> kpwk2gg7fr40azuw3j9mqwiozfwv2s3 B2.DistanceJoint 0 82 11614 9734 2018-09-13T14:31:54Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.DistanceJoint --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/b2.Joint|b2.Joint]]<br/> === <translate>Description</translate> === <translate><br /> A distance joint constrains two points on two bodies to remain at a fixed distance from each other. You can view this as a massless, rigid rod. <br /> <br /></translate> === <translate>Examples</translate> === '''Distance joint'''<br/> <source lang="lua">local jointDef = b2.createDistanceJointDef(body1, body2, 100, 100, 200, 100) local distanceJoint = world:createJoint(jointDef) --by default length between two bodies is the length they have between them when joint was created --but it is possilbe to change it using distanceJoint:setLength(200) distanceJoint:setDampingRatio(0.5) distanceJoint:setFrequency(4)</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.DistanceJoint:getDampingRatio|b2.DistanceJoint:getDampingRatio]] ''<translate>returns the damping ratio</translate>''<br/><!-- GIDEROSMTD:b2.DistanceJoint:getDampingRatio() returns the damping ratio --> [[Special:MyLanguage/b2.DistanceJoint:getFrequency|b2.DistanceJoint:getFrequency]] ''<translate>returns the mass-spring-damper frequency in Hertz</translate>''<br/><!-- GIDEROSMTD:b2.DistanceJoint:getFrequency() returns the mass-spring-damper frequency in Hertz --> [[Special:MyLanguage/b2.DistanceJoint:getLength|b2.DistanceJoint:getLength]] ''<translate>returns the length of this distance joint in meters</translate>''<br/><!-- GIDEROSMTD:b2.DistanceJoint:getLength() returns the length of this distance joint in meters --> [[Special:MyLanguage/b2.DistanceJoint:setDampingRatio|b2.DistanceJoint:setDampingRatio]] ''<translate>sets the damping ratio (0 = no damping, 1 = critical damping)</translate>''<br/><!-- GIDEROSMTD:b2.DistanceJoint:setDampingRatio(ratio) sets the damping ratio (0 = no damping, 1 = critical damping) --> [[Special:MyLanguage/b2.DistanceJoint:setFrequency|b2.DistanceJoint:setFrequency]] ''<translate>sets the mass-spring-damper frequency in Hertz</translate>''<br/><!-- GIDEROSMTD:b2.DistanceJoint:setFrequency(frequency) sets the mass-spring-damper frequency in Hertz --> [[Special:MyLanguage/b2.DistanceJoint:setLength|b2.DistanceJoint:setLength]] ''<translate>sets the natural joint length in meters</translate>''<br/><!-- GIDEROSMTD:b2.DistanceJoint:setLength(length) sets the natural joint length in meters --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} l7xdoxdarfyu8m2po8ed0srbcptdi2i B2.DistanceJoint:getDampingRatio 0 316 9746 7391 2018-09-03T08:57:34Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.DistanceJoint|b2.DistanceJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the damping ratio of this distance joint.<br /> <br /></translate> <source lang="lua"> (number) = b2.DistanceJoint:getDampingRatio() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The damping ratio of this distance joint</translate><br/> 23u9oiuk1brjoibfmzdjnxdmqihhie1 B2.DistanceJoint:getFrequency 0 965 10420 8425 2018-09-03T08:59:08Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.DistanceJoint|b2.DistanceJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the mass-spring-damper frequency of this distance joint in Hertz.<br /> <br /></translate> <source lang="lua"> (number) = b2.DistanceJoint:getFrequency() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The mass-spring-damper frequency in Hertz.</translate><br/> 5398233n9mu5picw9sw4s1yet79wdik B2.DistanceJoint:getLength 0 1103 10553 8200 2018-09-03T08:59:35Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.DistanceJoint|b2.DistanceJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the length of this distance joint, usually in meters.<br /> <br /></translate> <source lang="lua"> (number) = b2.DistanceJoint:getLength() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The length of this distance joint, usually in meters</translate><br/> 68u2ps63uau6vt8u0rwe4tfwor8yu2c B2.DistanceJoint:setDampingRatio 0 453 9928 7569 2018-09-03T08:57:52Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.DistanceJoint|b2.DistanceJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets the damping ratio of this distance joint. 0 = no damping, 1 = critical damping. <br /> <br /></translate> <source lang="lua"> b2.DistanceJoint:setDampingRatio(ratio) </source> === <translate>Parameters</translate> === '''ratio''': (number) <translate>the damping ratio</translate> <br/> iwv240qjrfzun6mz2nlbddixxx5nqml B2.DistanceJoint:setFrequency 0 378 9821 7463 2018-09-03T08:57:42Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.DistanceJoint|b2.DistanceJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets the mass-spring-damper frequency in Hertz.<br /> <br /></translate> <source lang="lua"> b2.DistanceJoint:setFrequency(frequency) </source> === <translate>Parameters</translate> === '''frequency''': (number) <translate>the mass-spring-damper frequency in Hertz</translate> <br/> baiwoxuzhp8pymvpxebhgjyovhnbx7k B2.DistanceJoint:setLength 0 1029 10833 8106 2018-09-03T09:00:05Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.DistanceJoint|b2.DistanceJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets the natural length. Manipulating the length can lead to non-physical behavior when the frequency is zero. <br /> <br /></translate> <source lang="lua"> b2.DistanceJoint:setLength(length) </source> === <translate>Parameters</translate> === '''length''': (number) <translate>the length of this distance joint, usually in meters.</translate> <br/> 9etu9bcutws1gqbfoh79fep3j3mvlf1 B2.EdgeShape 0 73 11636 10065 2018-09-13T14:32:05Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.EdgeShape --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/b2.Shape|b2.Shape]]<br/> === <translate>Description</translate> === <translate><br /> A line segment (edge) shape. These can be connected in chains or loops to other edge shapes.<br /> <br /></translate> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.EdgeShape.new|b2.EdgeShape.new]] <br/><!-- GIDEROSMTD:b2.EdgeShape.new(v1x,v1y,v2x,v2y) --> [[Special:MyLanguage/b2.EdgeShape:set|b2.EdgeShape:set]] ''<translate>sets the two vertices</translate>''<br/><!-- GIDEROSMTD:b2.EdgeShape:set(v1x,v1y,v2x,v2y) sets the two vertices --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} 9tz9oq1c4bxnpgtko0bhk6d9bwf7jsx B2.EdgeShape.new 0 1027 10468 8739 2018-09-03T08:59:18Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.EdgeShape|b2.EdgeShape]]<br/> === <translate>Description</translate> === <translate><br /> Creates a new [[Special:MyLanguage/b2.EdgeShape|b2.EdgeShape]] instance and optionally sets its 2 vertices. <br /> If this function is called with more than 4 parameters, [[Special:MyLanguage/b2.EdgeShape|b2.EdgeShape]] instance<br /> is created and its 2 vertices are set. If this function is called without any <br /> paramaters, only [[Special:MyLanguage/b2.EdgeShape|b2.EdgeShape]] instance is created and you should set the 2 <br /> vertices with [[b2.EdgeShape:set]] function. <br /> <br /></translate> <source lang="lua"> b2.EdgeShape.new(v1x,v1y,v2x,v2y) </source> === <translate>Parameters</translate> === '''v1x''': (number, optional) <translate>- the x coordinate of 1st point of edge</translate> <br/> '''v1y''': (number, optional) <translate>- the y coordinate of 1st point of edge</translate> <br/> '''v2x''': (number, optional) <translate>- the x coordinate of 2nd point of edge</translate> <br/> '''v2y''': (number, optional) <translate>- the y coordinate of 2nd point of edge</translate> <br/> hx20crtf2vyp69fp10enktu4rtembj4 B2.EdgeShape:set 0 1093 10540 8184 2018-09-03T08:59:33Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.EdgeShape|b2.EdgeShape]]<br/> === <translate>Description</translate> === <translate><br /> Sets the two vertices of this instance.<br /> <br /></translate> <source lang="lua"> b2.EdgeShape:set(v1x,v1y,v2x,v2y) </source> === <translate>Parameters</translate> === '''v1x''': (number) <translate>- the x coordinate of 1st point of edge</translate> <br/> '''v1y''': (number) <translate>- the y coordinate of 1st point of edge</translate> <br/> '''v2x''': (number) <translate>- the x coordinate of 2nd point of edge</translate> <br/> '''v2y''': (number) <translate>- the y coordinate of 2nd point of edge</translate> <br/> 5l9g6fdxtk3rsv7c6xd7a29kwrlkncw B2.FRICTION JOINT 0 1207 9670 7321 2018-09-03T08:57:26Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 9<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate></translate> ojlxqetfi91e2yys3e5ouduqeirbgpp B2.Fixture 0 120 11629 9990 2018-09-13T14:32:03Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.Fixture --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> === <translate>Description</translate> === <translate><br /> A fixture is used to attach a shape to a body for collision detection. A fixture inherits its<br /> transform from its parent. Fixtures hold additional non-geometric data such as friction, collision filters, etc.<br /> Fixtures are created via [[Special:MyLanguage/b2.Body:createFixture|b2.Body:createFixture]].<br /> <br /></translate> === <translate>Examples</translate> === '''Example of fixtures collision filtering'''<br/> <source lang="lua">local BALL_MASK = 1 local CRATE_MASK = 2 local WALL_MASK = 4 -- ball local body = world:createBody{type = b2.DYNAMIC_BODY} local circle = b2.CircleShape.new(0, 0, radius) local fixture = body:createFixture{shape = circle, density = 1.0, friction = 0.1, restitution = 0.2} -- ball will collide with other ball and wall fixture:setFilterData({categoryBits = BALL_MASK, maskBits = BALL_MASK + WALL_MASK, groupIndex = 0}) local body = world:createBody{type = b2.DYNAMIC_BODY} local poly = b2.PolygonShape.new() poly:setAsBox(width, height) local fixture = body:createFixture{shape = poly, density = 1.0, friction = 0.1, restitution = 0.2} -- crate will collide with other crate and wall fixture:setFilterData({categoryBits = CRATE_MASK, maskBits = CRATE_MASK + WALL_MASK, groupIndex = 0}) local body = world:createBody{type = b2.STATIC_BODY} local chain = b2.ChainShape.new() chain:createLoop( 0,0, application:getContentWidth(), 0, application:getContentWidth(), application:getContentHeight(), 0, application:getContentHeight() ) local fixture = body:createFixture{shape = chain, density = 1.0, friction = 1, restitution = 0.3} -- walls will collide with both balls and crates fixture:setFilterData({categoryBits = WALL_MASK, maskBits = CRATE_MASK + BALL_MASK, groupIndex = 0})</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.Fixture:getBody|b2.Fixture:getBody]] ''<translate>returns the parent body of this fixture</translate>''<br/><!-- GIDEROSMTD:b2.Fixture:getBody() returns the parent body of this fixture --> [[Special:MyLanguage/b2.Fixture:getFilterData|b2.Fixture:getFilterData]] ''<translate>returns the contact filtering data</translate>''<br/><!-- GIDEROSMTD:b2.Fixture:getFilterData() returns the contact filtering data --> [[Special:MyLanguage/b2.Fixture:isSensor|b2.Fixture:isSensor]] ''<translate>is this fixture a sensor (non-solid)?</translate>''<br/><!-- GIDEROSMTD:b2.Fixture:isSensor() is this fixture a sensor (non-solid)? --> [[Special:MyLanguage/b2.Fixture:setFilterData|b2.Fixture:setFilterData]] ''<translate>sets the contact filtering data</translate>''<br/><!-- GIDEROSMTD:b2.Fixture:setFilterData(filterData) sets the contact filtering data --> [[Special:MyLanguage/b2.Fixture:setSensor|b2.Fixture:setSensor]] ''<translate>sets if this fixture is a sensor</translate>''<br/><!-- GIDEROSMTD:b2.Fixture:setSensor(sensor) sets if this fixture is a sensor --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} 7y8celrq0p9b9uy7x5ppt65dwpiufda B2.Fixture:getBody 0 969 10421 8724 2018-09-03T08:59:08Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Fixture|b2.Fixture]]<br/> === <translate>Description</translate> === <translate><br /> Returns the parent body of this fixture. This is ''nil'' if the fixture is not attached.<br /> <br /></translate> <source lang="lua"> (b2.Body) = b2.Fixture:getBody() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (b2.Body) <translate>body that created the fixture</translate><br/> cryadivsw9na5gi9dizfuumyluwgln8 B2.Fixture:getFilterData 0 306 9729 7375 2018-09-03T08:57:32Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Fixture|b2.Fixture]]<br/> === <translate>Description</translate> === <translate><br /> Returns the contact filtering data.<br /> <br /></translate> <source lang="lua"> (table) = b2.Fixture:getFilterData() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>contact filtering data table</translate><br/> 22sp1udfgan6pbnaske0g91s0g0c65p B2.Fixture:isSensor 0 790 10677 8669 2018-09-03T08:59:47Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Fixture|b2.Fixture]]<br/> === <translate>Description</translate> === <translate><br /> Is this fixture a sensor (non-solid)?<br /> <br /></translate> <source lang="lua"> (any), (any) = b2.Fixture:isSensor() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (any) <translate>''true'' if the shape is a sensor, ''false'' otherwise.</translate><br/> '''<translate>Returns</translate>''' (any) <translate>''true'' if the shape is a sensor, ''false'' otherwise.</translate><br/> m79u0751aqf7geh8frahtm6fuebwpuc B2.Fixture:setFilterData 0 318 12777 12776 2018-10-05T18:29:48Z PaulR 6 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Fixture|b2.Fixture]]<br/> === <translate>Description</translate> === <translate><br /> Sets the contact filtering data. This will not update contacts until the next time step<br /> when either parent body is active and awake. The filter data definition is given<br /> as a ordinary table. The fields of the filter data table are:<br /> <ul><br /> <li>''categoryBits'': (number) The collision category bits. Normally you would just set one bit.</li><br /> <li>''maskBits'': (number) The collision mask bits. This states the categories that this shape would accept for collision.</li><br /> <li>''groupIndex'': (number) Collision groups allow a certain group of objects to never collide (negative) or always collide (positive). Zero means no collision group. Non-zero group filtering always wins against the mask bits.</li><br /> </ul> <br /></translate> <source lang="lua"> b2.Fixture:setFilterData(filterData) </source> === <translate>Parameters</translate> === '''filterData''': (table) <translate></translate> <br/> === <translate>Examples</translate> === '''Example of fixtures collision filtering'''<br/> <source lang="lua">local BALL_MASK = 1 local CRATE_MASK = 2 local WALL_MASK = 4 -- ball local body = world:createBody{type = b2.DYNAMIC_BODY} local circle = b2.CircleShape.new(0, 0, radius) local fixture = body:createFixture{shape = circle, density = 1.0, friction = 0.1, restitution = 0.2} -- ball will collide with other ball and wall fixture:setFilterData({categoryBits = BALL_MASK, maskBits = BALL_MASK + WALL_MASK, groupIndex = 0}) local body = world:createBody{type = b2.DYNAMIC_BODY} local poly = b2.PolygonShape.new() poly:setAsBox(width, height) local fixture = body:createFixture{shape = poly, density = 1.0, friction = 0.1, restitution = 0.2} -- crate will collide with other crate and wall fixture:setFilterData({categoryBits = CRATE_MASK, maskBits = CRATE_MASK + WALL_MASK, groupIndex = 0}) local body = world:createBody{type = b2.STATIC_BODY} local chain = b2.ChainShape.new() chain:createLoop( 0,0, application:getContentWidth(), 0, application:getContentWidth(), application:getContentHeight(), 0, application:getContentHeight() ) local fixture = body:createFixture{shape = chain, density = 1.0, friction = 1, restitution = 0.3} -- walls will collide with both balls and crates fixture:setFilterData({categoryBits = WALL_MASK, maskBits = CRATE_MASK + BALL_MASK, groupIndex = 0})</source> pek74tglg1her9ginumc9z8vfn4tl0r B2.Fixture:setSensor 0 657 10196 7828 2018-09-03T08:58:21Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Fixture|b2.Fixture]]<br/> === <translate>Description</translate> === <translate><br /> Sets if this fixture is a sensor.<br /> <br /></translate> <source lang="lua"> b2.Fixture:setSensor(sensor) </source> === <translate>Parameters</translate> === '''sensor''': (boolean) <translate></translate> <br/> cm1lbjjd8lscpum6v8pwaqckigylfww B2.FrictionJoint 0 122 11655 10749 2018-09-13T14:32:48Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.FrictionJoint --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/b2.Joint|b2.Joint]]<br/> === <translate>Description</translate> === <translate><br /> Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction. <br /> <br /></translate> === <translate>Examples</translate> === '''Friction joint'''<br/> <source lang="lua">--create empty box2d body for joint local ground = world:createBody({}) ground:setPosition(350, 480) --create friction joint local jointDef = b2.createFrictionJointDef(body, ground, 350, 200) local frictionJoint = world:createJoint(jointDef) --set maximum friction force to slow down the ball frictionJoint:setMaxForce(100)</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.FrictionJoint:getMaxForce|b2.FrictionJoint:getMaxForce]] ''<translate>returns the maximum friction force in N</translate>''<br/><!-- GIDEROSMTD:b2.FrictionJoint:getMaxForce() returns the maximum friction force in N --> [[Special:MyLanguage/b2.FrictionJoint:getMaxTorque|b2.FrictionJoint:getMaxTorque]] ''<translate>returns the maximum friction torque in N*m</translate>''<br/><!-- GIDEROSMTD:b2.FrictionJoint:getMaxTorque() returns the maximum friction torque in N*m --> [[Special:MyLanguage/b2.FrictionJoint:setMaxForce|b2.FrictionJoint:setMaxForce]] ''<translate>sets the maximum friction force in N</translate>''<br/><!-- GIDEROSMTD:b2.FrictionJoint:setMaxForce(force) sets the maximum friction force in N --> [[Special:MyLanguage/b2.FrictionJoint:setMaxTorque|b2.FrictionJoint:setMaxTorque]] ''<translate>sets the maximum friction torque in N*m</translate>''<br/><!-- GIDEROSMTD:b2.FrictionJoint:setMaxTorque(torque) sets the maximum friction torque in N*m --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} 6nisvrnzn8bco933pvi0szb24a0i219 B2.FrictionJoint:getMaxForce 0 276 9691 7337 2018-09-03T08:57:28Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.FrictionJoint|b2.FrictionJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the maximum friction force in N. <br /> <br /></translate> <source lang="lua"> (number) = b2.FrictionJoint:getMaxForce() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The maximum friction force in N</translate><br/> opmgy96nq9o3ovcy71zgca5fcs6lhsk B2.FrictionJoint:getMaxTorque 0 392 9834 7477 2018-09-03T08:57:43Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.FrictionJoint|b2.FrictionJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the maximum friction torque in N*m. <br /> <br /></translate> <source lang="lua"> (number) = b2.FrictionJoint:getMaxTorque() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The maximum friction torque in N*m</translate><br/> nbtze3xkexrrvc226ktkfzb0oek58pz B2.FrictionJoint:setMaxForce 0 1009 10447 8451 2018-09-03T08:59:15Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.FrictionJoint|b2.FrictionJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets the maximum friction force in N. <br /> <br /></translate> <source lang="lua"> b2.FrictionJoint:setMaxForce(force) </source> === <translate>Parameters</translate> === '''force''': (number) <translate>the maximum friction force in N</translate> <br/> b1su3ya1a9bla0mu21p255yql1nr7bb B2.FrictionJoint:setMaxTorque 0 1011 10451 8461 2018-09-03T08:59:15Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.FrictionJoint|b2.FrictionJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets the maximum friction torque in N*m. <br /> <br /></translate> <source lang="lua"> b2.FrictionJoint:setMaxTorque(torque) </source> === <translate>Parameters</translate> === '''torque''': (number) <translate>the maximum friction torque in N*m</translate> <br/> 9wu36oa5vycitunmdc44j9pdve40fs7 B2.GEAR JOINT 0 1211 9704 7353 2018-09-03T08:57:29Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 6<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate></translate> 87qke5nj34dapzj71m1ozcgaz4ryebk B2.GearJoint 0 22 11630 10003 2018-09-13T14:32:03Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.GearJoint --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/b2.Joint|b2.Joint]]<br/> === <translate>Description</translate> === <translate><br /> A gear joint is used to connect two joints together. Either joint can be a revolute or prismatic joint. You specify a gear ratio to bind the motions together: coordinate1 ratio * coordinate2 = constant The ratio can be negative or positive. If one joint is a revolute joint and the other joint is a prismatic joint, then the ratio will have units of length or units of 1/length.<br /> <br /></translate> === <translate>Examples</translate> === '''Gear joint combining revolute and prismatic joints'''<br/> <source lang="lua">--create empty box2d body for joint local ground = world:createBody({}) --create revolute joint --note that ground should be passed as first parameter here local jointDef = b2.createRevoluteJointDef(ground, body1, 300, 300) local revoluteJoint = world:createJoint(jointDef) --set motor revoluteJoint:setMaxMotorTorque(1) revoluteJoint:enableMotor(true) --axisx, axisy values usually between 0 and 1 --note that ground should be passed as first parameter here local jointDef = b2.createPrismaticJointDef(ground, body2, 350, 100, 0.3, 1) local prismaticJoint = world:createJoint(jointDef) --set motor prismaticJoint:setMaxMotorForce(1) prismaticJoint:enableMotor(true) --create gear joint using two already created joints local jointDef = b2.createGearJointDef(body1, body2, revoluteJoint, prismaticJoint, 1) local gearJoint = world:createJoint(jointDef)</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.GearJoint:getRatio|b2.GearJoint:getRatio]] ''<translate>returns the gear ratio</translate>''<br/><!-- GIDEROSMTD:b2.GearJoint:getRatio() returns the gear ratio --> [[Special:MyLanguage/b2.GearJoint:setRatio|b2.GearJoint:setRatio]] ''<translate>sets the gear ratio</translate>''<br/><!-- GIDEROSMTD:b2.GearJoint:setRatio(ratio) sets the gear ratio --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} et37dkamcbl99iohl1atb69x3n8r1eo B2.GearJoint:getRatio 0 171 9558 7202 2018-09-03T08:57:14Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.GearJoint|b2.GearJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the gear ratio. <br /> <br /></translate> <source lang="lua"> (number) = b2.GearJoint:getRatio() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The gear ratio</translate><br/> dy6caevgqp1gex7jkw67kmeo04m2lsm B2.GearJoint:setRatio 0 678 10216 7849 2018-09-03T08:58:23Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.GearJoint|b2.GearJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets the gear ratio. <br /> <br /></translate> <source lang="lua"> b2.GearJoint:setRatio(ratio) </source> === <translate>Parameters</translate> === '''ratio''': (number) <translate>the gear ratio</translate> <br/> j49xifz9a5y2doj6d7nfjv79omvl8pj B2.Joint 0 127 11689 10484 2018-09-13T14:33:29Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.Joint --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> === <translate>Description</translate> === <translate><br /> The [[Special:MyLanguage/b2.Joint|b2.Joint]] class is the base joint class. Joints are used to constraint two bodies together in various fashions. Some joints also feature limits and motors. <br /> <br /></translate> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.Joint:getAnchorA|b2.Joint:getAnchorA]] ''<translate>returns the anchor point on bodyA in world coordinates</translate>''<br/><!-- GIDEROSMTD:b2.Joint:getAnchorA() returns the anchor point on bodyA in world coordinates --> [[Special:MyLanguage/b2.Joint:getAnchorB|b2.Joint:getAnchorB]] ''<translate>returns the anchor point on bodyB in world coordinates</translate>''<br/><!-- GIDEROSMTD:b2.Joint:getAnchorB() returns the anchor point on bodyB in world coordinates --> [[Special:MyLanguage/b2.Joint:getBodyA|b2.Joint:getBodyA]] ''<translate>returns the first body attached to this joint</translate>''<br/><!-- GIDEROSMTD:b2.Joint:getBodyA() returns the first body attached to this joint --> [[Special:MyLanguage/b2.Joint:getBodyB|b2.Joint:getBodyB]] ''<translate>returns the second body attached to this joint</translate>''<br/><!-- GIDEROSMTD:b2.Joint:getBodyB() returns the second body attached to this joint --> [[Special:MyLanguage/b2.Joint:getReactionForce|b2.Joint:getReactionForce]] ''<translate>returns the reaction force on bodyB at the joint anchor</translate>''<br/><!-- GIDEROSMTD:b2.Joint:getReactionForce(inv_dt) returns the reaction force on bodyB at the joint anchor --> [[Special:MyLanguage/b2.Joint:getReactionTorque|b2.Joint:getReactionTorque]] ''<translate>returns the reaction torque on bodyB</translate>''<br/><!-- GIDEROSMTD:b2.Joint:getReactionTorque(inv_dt) returns the reaction torque on bodyB --> [[Special:MyLanguage/b2.Joint:getType|b2.Joint:getType]] ''<translate>returns a value that represents the type</translate>''<br/><!-- GIDEROSMTD:b2.Joint:getType() returns a value that represents the type --> [[Special:MyLanguage/b2.Joint:isActive|b2.Joint:isActive]] ''<translate>is active?</translate>''<br/><!-- GIDEROSMTD:b2.Joint:isActive() is active? --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} 6m52cdyf14glxx2woa9xgohg1hrf6o7 B2.Joint:getAnchorA 0 208 9610 7257 2018-09-03T08:57:20Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Joint|b2.Joint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the anchor point on bodyA in world coordinates.<br /> <br /></translate> <source lang="lua"> (number), (number) = b2.Joint:getAnchorA() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x coordinate of the anchor point</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y coordinate of the anchor point</translate><br/> r2tv4r8jtav8mn0hmcleuur42jmkigw B2.Joint:getAnchorB 0 216 9608 7256 2018-09-03T08:57:19Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Joint|b2.Joint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the anchor point on bodyB in world coordinates.<br /> <br /></translate> <source lang="lua"> (number), (number) = b2.Joint:getAnchorB() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x coordinate of the anchor point</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y coordinate of the anchor point</translate><br/> dmy5nzbn24lz84entvevnfg6cdplvv2 B2.Joint:getBodyA 0 1048 10843 8126 2018-09-03T09:00:06Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Joint|b2.Joint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the first body attached to this joint.<br /> <br /></translate> <source lang="lua"> (b2.Body) = b2.Joint:getBodyA() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (b2.Body) <translate>The first body attached to this joint</translate><br/> l3y9fy3ulpe6k56of46paf5mfxzpv8z B2.Joint:getBodyB 0 1046 10499 8124 2018-09-03T08:59:26Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Joint|b2.Joint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the second body attached to this joint.<br /> <br /></translate> <source lang="lua"> (b2.Body) = b2.Joint:getBodyB() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (b2.Body) <translate>The second body attached to this joint</translate><br/> kxlch77q8cmlg05syg1mfzg9rv9ui1d B2.Joint:getReactionForce 0 709 10634 8291 2018-09-03T08:59:43Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Joint|b2.Joint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the reaction force on bodyB at the joint anchor in Newtons.<br /> <br /></translate> <source lang="lua"> (number), (number) = b2.Joint:getReactionForce(inv_dt) </source> === <translate>Parameters</translate> === '''inv_dt''': (number) <translate></translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x component of the reaction force on bodyB at the joint anchor in Newtons</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y component of the reaction force on bodyB at the joint anchor in Newtons</translate><br/> 4uy2it71y047hqhzjarjo9edt7j7ykl B2.Joint:getReactionTorque 0 869 10367 7984 2018-09-03T08:58:55Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Joint|b2.Joint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the reaction torque on bodyB in N*m. <br /> <br /></translate> <source lang="lua"> (number) = b2.Joint:getReactionTorque(inv_dt) </source> === <translate>Parameters</translate> === '''inv_dt''': (number) <translate></translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The reaction torque on bodyB in N*m</translate><br/> lr0aumseurp0kav6p79oidbwx3jvc9a B2.Joint:getType 0 385 9829 8546 2018-09-03T08:57:43Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Joint|b2.Joint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the type of the concrete joint. The return value can be one of the [[Special:MyLanguage/b2.REVOLUTE_JOINT|b2.REVOLUTE_JOINT]], [[Special:MyLanguage/b2.PRISMATIC_JOINT|b2.PRISMATIC_JOINT]], [[Special:MyLanguage/b2.DISTANCE_JOINT|b2.DISTANCE_JOINT]], [[Special:MyLanguage/b2.PULLEY_JOINT|b2.PULLEY_JOINT]],<br /> ''b2,MOUSE_JOINT'', [[Special:MyLanguage/b2.GEAR_JOINT|b2.GEAR_JOINT]], ''b2.LINE_JOINT'', [[Special:MyLanguage/b2.WELD_JOINT|b2.WELD_JOINT]], [[Special:MyLanguage/b2.FRICTION_JOINT|b2.FRICTION_JOINT]], [[Special:MyLanguage/b2.ROPE_JOINT|b2.ROPE_JOINT]].<br /> <br /></translate> <source lang="lua"> (string) = b2.Joint:getType() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>The type of the joint</translate><br/> 5vag5salcqkpgdl1sagywukeuztpi42 B2.Joint:isActive 0 1070 10852 8752 2018-09-03T09:00:07Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.Joint|b2.Joint]]<br/> === <translate>Description</translate> === <translate><br /> Short-cut function to determine if either body is inactive. <br /> <br /></translate> <source lang="lua"> (bool) = b2.Joint:isActive() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>''true'' if both bodyA and bodyB is active, ''false'' otherwise</translate><br/> mg2dnixr0xmmf0gn1zi5x72rhjfnoep B2.KINEMATIC BODY 0 1347 10596 8234 2018-09-03T08:59:39Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 1<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate></translate> fovf5p0wutbetvmyyi7x8vjbmoyec06 B2.MOUSE JOINT 0 1220 9754 7396 2018-09-03T08:57:35Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 5<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate></translate> pvku94uy20htogn06r3iytwgugu6m44 B2.Manifold 0 114 11627 9969 2018-09-13T14:32:02Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.Manifold --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> === <translate>Description</translate> === <translate>Holds the local information about contact between 2 bodies</translate> === <translate>Examples</translate> === '''Example content of b2.Manifold'''<br/> <source lang="lua">[localNormal] => Table { { [y] => -1 [x] => -0 } [points] => Table { { [1] => Table { { [normalImpulse] => 0 [localPoint] => Table { { [y] => 0 [x] => 0 } [tangentImpulse] => 0 } } [localPoint] => Table { { [y] => 320.00000953674 [x] => 480 }</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === [[Special:MyLanguage/localNormal|localNormal]]<br/><!-- GIDEROSCST:localNormal table--> [[Special:MyLanguage/localPoint|localPoint]]<br/><!-- GIDEROSCST:localPoint table--> [[Special:MyLanguage/points|points]]<br/><!-- GIDEROSCST:points table--> |} 2ddq8gwjydhghejolhsjqjtpz3rlyta B2.MouseJoint 0 25 11656 10395 2018-09-13T14:32:50Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.MouseJoint --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/b2.Joint|b2.Joint]]<br/> === <translate>Description</translate> === <translate><br /> A mouse joint is used to make a point on a body track a specified world point. This a soft constraint with a maximum force. This allows the constraint to stretch and without applying huge forces.<br /> <br /></translate> === <translate>Examples</translate> === '''Mouse joint'''<br/> <source lang="lua">--create empty box2d body for joint local ground = world:createBody({}) --joint with dummy body local mouseJoint = nil -- create a mouse joint on mouse down function self:onMouseDown(event) local jointDef = b2.createMouseJointDef(ground, body, event.x, event.y, 100000) mouseJoint = world:createJoint(jointDef) end -- update the target of mouse joint on mouse move function self:onMouseMove(event) if mouseJoint ~= nil then mouseJoint:setTarget(event.x, event.y) end end -- destroy the mouse joint on mouse up function self:onMouseUp(event) if mouseJoint ~= nil then world:destroyJoint(mouseJoint) mouseJoint = nil end end</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.MouseJoint:getDampingRatio|b2.MouseJoint:getDampingRatio]] ''<translate>returns the damping ratio</translate>''<br/><!-- GIDEROSMTD:b2.MouseJoint:getDampingRatio() returns the damping ratio --> [[Special:MyLanguage/b2.MouseJoint:getFrequency|b2.MouseJoint:getFrequency]] ''<translate>returns the response frequency in Hertz</translate>''<br/><!-- GIDEROSMTD:b2.MouseJoint:getFrequency() returns the response frequency in Hertz --> [[Special:MyLanguage/b2.MouseJoint:getMaxForce|b2.MouseJoint:getMaxForce]] ''<translate>returns the maximum force in N</translate>''<br/><!-- GIDEROSMTD:b2.MouseJoint:getMaxForce() returns the maximum force in N --> [[Special:MyLanguage/b2.MouseJoint:getTarget|b2.MouseJoint:getTarget]] ''<translate>returns the x and y coordinates of the target point</translate>''<br/><!-- GIDEROSMTD:b2.MouseJoint:getTarget() returns the x and y coordinates of the target point --> [[Special:MyLanguage/b2.MouseJoint:setDampingRatio|b2.MouseJoint:setDampingRatio]] ''<translate>sets the damping ratio (0 = no damping, 1 = critical damping)</translate>''<br/><!-- GIDEROSMTD:b2.MouseJoint:setDampingRatio(ratio) sets the damping ratio (0 = no damping, 1 = critical damping) --> [[Special:MyLanguage/b2.MouseJoint:setFrequency|b2.MouseJoint:setFrequency]] ''<translate>sets the response frequency in Hertz</translate>''<br/><!-- GIDEROSMTD:b2.MouseJoint:setFrequency(frequency) sets the response frequency in Hertz --> [[Special:MyLanguage/b2.MouseJoint:setMaxForce|b2.MouseJoint:setMaxForce]] ''<translate>sets the maximum force in N</translate>''<br/><!-- GIDEROSMTD:b2.MouseJoint:setMaxForce(force) sets the maximum force in N --> [[Special:MyLanguage/b2.MouseJoint:setTarget|b2.MouseJoint:setTarget]] ''<translate>updates the target point</translate>''<br/><!-- GIDEROSMTD:b2.MouseJoint:setTarget(x,y) updates the target point --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} 0rl57onn7cfug43jyfi1b7uxpa63wab B2.MouseJoint:getDampingRatio 0 408 9859 7500 2018-09-03T08:57:45Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.MouseJoint|b2.MouseJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the damping ratio. 0 = no damping, 1 = critical damping. <br /> <br /></translate> <source lang="lua"> (number) = b2.MouseJoint:getDampingRatio() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The damping ratio</translate><br/> gp5vpi4m4n7xv2qsh2lsk0rwcnvoutk B2.MouseJoint:getFrequency 0 532 10016 7654 2018-09-03T08:58:02Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.MouseJoint|b2.MouseJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the response speed in Hertz.<br /> <br /></translate> <source lang="lua"> (number) = b2.MouseJoint:getFrequency() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The response speed in Hertz</translate><br/> 94b8mtjwipq4xbh16hamltpkthniuow B2.MouseJoint:getMaxForce 0 418 9877 7523 2018-09-03T08:57:47Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.MouseJoint|b2.MouseJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the maximum force in Newtons.<br /> <br /></translate> <source lang="lua"> (number) = b2.MouseJoint:getMaxForce() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The maximum force in Newtons.</translate><br/> a4uc83d0nn6pcmvw5t10og8lin11ta0 B2.MouseJoint:getTarget 0 533 10032 7670 2018-09-03T08:58:04Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.MouseJoint|b2.MouseJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the x and y coordinates of the target point.<br /> <br /></translate> <source lang="lua"> (number), (number) = b2.MouseJoint:getTarget() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x coordinate of the target point</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y coordinate of the target point</translate><br/> heu5z4yx7v6lyovg0186wl896dqcky8 B2.MouseJoint:setDampingRatio 0 507 9981 7622 2018-09-03T08:57:58Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.MouseJoint|b2.MouseJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets the damping ratio. 0 = no damping, 1 = critical damping. <br /> <br /></translate> <source lang="lua"> b2.MouseJoint:setDampingRatio(ratio) </source> === <translate>Parameters</translate> === '''ratio''': (number) <translate>the damping ratio</translate> <br/> cuwo481djr3gp4l0t9qovyxi6q1vlo8 B2.MouseJoint:setFrequency 0 1116 10570 8215 2018-09-03T08:59:36Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.MouseJoint|b2.MouseJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets the response speed in Hertz.<br /> <br /></translate> <source lang="lua"> b2.MouseJoint:setFrequency(frequency) </source> === <translate>Parameters</translate> === '''frequency''': (number) <translate>the response speed in Hertz</translate> <br/> 7uh7yy2ammek3cny2f0odi2mvdby82j B2.MouseJoint:setMaxForce 0 635 10171 7805 2018-09-03T08:58:19Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.MouseJoint|b2.MouseJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets the maximum force in Newtons.<br /> <br /></translate> <source lang="lua"> b2.MouseJoint:setMaxForce(force) </source> === <translate>Parameters</translate> === '''force''': (number) <translate>the maximum force in Newtons</translate> <br/> bnsnpm8z3l7jmb96igjcpdcuehx1otq B2.MouseJoint:setTarget 0 141 9521 7180 2018-09-03T08:57:10Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.MouseJoint|b2.MouseJoint]]<br/> === <translate>Description</translate> === <translate><br /> Updates the target point.<br /> <br /></translate> <source lang="lua"> b2.MouseJoint:setTarget(x,y) </source> === <translate>Parameters</translate> === '''x''': (number) <translate>x coordinate of the target point</translate> <br/> '''y''': (number) <translate>y coordinate of the target point</translate> <br/> 958ovnokwwvs3kyere3t3narp93eeor B2.PRISMATIC JOINT 0 1352 9857 7503 2018-09-03T08:57:45Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 2<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate></translate> bmrz8lzyva6acj47rkcojurzjz8z84e B2.PULLEY JOINT 0 1291 10754 8395 2018-09-03T08:59:54Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 4<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate></translate> gl7qny4enhwiu4ckwdpun5g7dhhn59f B2.ParticleSystem 0 90 11673 10098 2018-09-13T14:33:19Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.ParticleSystem --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> === <translate>Description</translate> === <translate>Defines particle system in box2d world using Liquid fun</translate> === <translate>Examples</translate> === '''Simple particle system example'''<br/> <source lang="lua">-- create world local world = b2.World.new(0, 9.8) local ps1= world:createParticleSystem({ radius=5}) ps1:setTexture(Texture.new("Bubble.png")) stage:addChild(ps1) ps1:createParticleGroup({shape=shape2, position={x=500,y=250}, color = 0xFF0000, alpha=1, flags=0 }) ps1:createParticleGroup({shape=shape1, position={x=400,y=50}, color = 0x0000FF, alpha=1, flags=0 }) -- step the world and then update the position and rotation of sprites local function onEnterFrame() world:step(1/60, 8, 3) end stage:addEventListener(Event.ENTER_FRAME, onEnterFrame)</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.ParticleSystem:containsParticle|b2.ParticleSystem:containsParticle]] <br/><!-- GIDEROSMTD:b2.ParticleSystem:containsParticle(id) --> [[Special:MyLanguage/b2.ParticleSystem:createParticle|b2.ParticleSystem:createParticle]] ''<translate>create new particle</translate>''<br/><!-- GIDEROSMTD:b2.ParticleSystem:createParticle(particleDef) create new particle --> [[Special:MyLanguage/b2.ParticleSystem:createParticleGroup|b2.ParticleSystem:createParticleGroup]] ''<translate>create group of particles</translate>''<br/><!-- GIDEROSMTD:b2.ParticleSystem:createParticleGroup(particleGoupDef) create group of particles --> [[Special:MyLanguage/b2.ParticleSystem:destroyParticle|b2.ParticleSystem:destroyParticle]] ''<translate>destroy particle by id</translate>''<br/><!-- GIDEROSMTD:b2.ParticleSystem:destroyParticle(id) destroy particle by id --> [[Special:MyLanguage/b2.ParticleSystem:destroyParticles|b2.ParticleSystem:destroyParticles]] <br/><!-- GIDEROSMTD:b2.ParticleSystem:destroyParticles(ids) --> [[Special:MyLanguage/b2.ParticleSystem:getParticleCount|b2.ParticleSystem:getParticleCount]] <br/><!-- GIDEROSMTD:b2.ParticleSystem:getParticleCount() --> [[Special:MyLanguage/b2.ParticleSystem:getParticleGroupList|b2.ParticleSystem:getParticleGroupList]] <br/><!-- GIDEROSMTD:b2.ParticleSystem:getParticleGroupList() --> [[Special:MyLanguage/b2.ParticleSystem:setTexture|b2.ParticleSystem:setTexture]] ''<translate>set texture to particles</translate>''<br/><!-- GIDEROSMTD:b2.ParticleSystem:setTexture(texture,size) set texture to particles --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === [[Special:MyLanguage/b2.ParticleSystem.FLAG_COLOR_MIXING|b2.ParticleSystem.FLAG_COLOR_MIXING]]<br/><!-- GIDEROSCST:b2.ParticleSystem.FLAG_COLOR_MIXING 256--> [[Special:MyLanguage/b2.ParticleSystem.FLAG_ELASTIC|b2.ParticleSystem.FLAG_ELASTIC]]<br/><!-- GIDEROSCST:b2.ParticleSystem.FLAG_ELASTIC 16--> [[Special:MyLanguage/b2.ParticleSystem.FLAG_POWDER|b2.ParticleSystem.FLAG_POWDER]]<br/><!-- GIDEROSCST:b2.ParticleSystem.FLAG_POWDER 64--> [[Special:MyLanguage/b2.ParticleSystem.FLAG_SPRING|b2.ParticleSystem.FLAG_SPRING]]<br/><!-- GIDEROSCST:b2.ParticleSystem.FLAG_SPRING 8--> [[Special:MyLanguage/b2.ParticleSystem.FLAG_TENSILE|b2.ParticleSystem.FLAG_TENSILE]]<br/><!-- GIDEROSCST:b2.ParticleSystem.FLAG_TENSILE 128--> [[Special:MyLanguage/b2.ParticleSystem.FLAG_VISCOUS|b2.ParticleSystem.FLAG_VISCOUS]]<br/><!-- GIDEROSCST:b2.ParticleSystem.FLAG_VISCOUS 32--> [[Special:MyLanguage/b2.ParticleSystem.FLAG_WALL|b2.ParticleSystem.FLAG_WALL]]<br/><!-- GIDEROSCST:b2.ParticleSystem.FLAG_WALL 4--> [[Special:MyLanguage/b2.ParticleSystem.FLAG_WATER|b2.ParticleSystem.FLAG_WATER]]<br/><!-- GIDEROSCST:b2.ParticleSystem.FLAG_WATER 0--> [[Special:MyLanguage/b2.ParticleSystem.FLAG_ZOMBIE|b2.ParticleSystem.FLAG_ZOMBIE]]<br/><!-- GIDEROSCST:b2.ParticleSystem.FLAG_ZOMBIE 2--> |} in94xb9i9pi1ko1j3gy9xi3hy0yjptj B2.ParticleSystem.FLAG COLOR MIXING 0 1249 10088 7723 2018-09-03T08:58:10Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 256<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2.ParticleSystem|b2.ParticleSystem]]<br/> === <translate>Description</translate> === <translate>c</translate> pw6gepgppv6q84ly3nb9bj9e3cuuprp B2.ParticleSystem.FLAG ELASTIC 0 1360 9995 7638 2018-09-03T08:58:00Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 16<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2.ParticleSystem|b2.ParticleSystem]]<br/> === <translate>Description</translate> === <translate>c</translate> f7qu3pua6k77syh7xvph769pi1lb4kg B2.ParticleSystem.FLAG POWDER 0 1198 9607 7258 2018-09-03T08:57:19Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 64<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2.ParticleSystem|b2.ParticleSystem]]<br/> === <translate>Description</translate> === <translate>c</translate> e8k03tzhcpenq650tjemr6sij8xgxmk B2.ParticleSystem.FLAG SPRING 0 1235 9899 7542 2018-09-03T08:57:49Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 8<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2.ParticleSystem|b2.ParticleSystem]]<br/> === <translate>Description</translate> === <translate>c</translate> oeeca6uqp6qm23hda8quvicye7679uq B2.ParticleSystem.FLAG TENSILE 0 1345 10857 8223 2018-09-03T09:00:08Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 128<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2.ParticleSystem|b2.ParticleSystem]]<br/> === <translate>Description</translate> === <translate>c</translate> ejtlgnbm4zrn3rcnmvvtjbrapvjcadu B2.ParticleSystem.FLAG VISCOUS 0 1263 10260 7886 2018-09-03T08:58:32Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 32<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2.ParticleSystem|b2.ParticleSystem]]<br/> === <translate>Description</translate> === <translate>c</translate> eab0ck76wmohm3vnthr356dosuxxmx5 B2.ParticleSystem.FLAG WALL 0 1321 10829 8100 2018-09-03T09:00:04Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 4<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2.ParticleSystem|b2.ParticleSystem]]<br/> === <translate>Description</translate> === <translate>c</translate> d7bivpv1flathiptz9d8iccvsczf2w5 B2.ParticleSystem.FLAG WATER 0 1288 10378 8008 2018-09-03T08:58:58Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Value</translate>:''' 0<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2.ParticleSystem|b2.ParticleSystem]]<br/> === <translate>Description</translate> === <translate>Flag defining particle behavior</translate> pwm9jfz3ifq6mzkgbhxnbns5p41toik B2.ParticleSystem.FLAG ZOMBIE 0 1240 9951 7594 2018-09-03T08:57:55Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 2<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2.ParticleSystem|b2.ParticleSystem]]<br/> === <translate>Description</translate> === <translate>c</translate> 8a47lalusq7easrg5ovagjdf5ccjy34 B2.ParticleSystem:containsParticle 0 835 10334 7967 2018-09-03T08:58:48Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.ParticleSystem|b2.ParticleSystem]]<br/> === <translate>Description</translate> === <translate>Returns true of particle is within the particle system</translate> <source lang="lua"> (boolean) = b2.ParticleSystem:containsParticle(id) </source> === <translate>Parameters</translate> === '''id''': (number) <translate>Particle id</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (boolean) <translate>True if the particle is within the particle system else false.</translate><br/> khogr9383r3jr3xq2y3yiz94bypezev B2.ParticleSystem:createParticle 0 895 10741 8386 2018-09-03T08:59:53Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.ParticleSystem|b2.ParticleSystem]]<br/> === <translate>Description</translate> === <translate>Creates new particle. Accepts table with possible keys: "flags", "position", "velocity", "color", "alpha" and returns particle id</translate> <source lang="lua"> (number) = b2.ParticleSystem:createParticle(particleDef) </source> === <translate>Parameters</translate> === '''particleDef''': (table) <translate>table with particle data</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>particle id</translate><br/> m8eroxjr6e6ta57jlzsm9xhj8u52u2i B2.ParticleSystem:createParticleGroup 0 415 12950 9867 2018-11-19T17:25:15Z PaulR 6 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.ParticleSystem|b2.ParticleSystem]]<br/> === <translate>Description</translate> === <translate>Create group of multiple particles with same properties, that can be defined in table with: "flags" "groupFlags" "position" "angle" "linearVelocity" "angularVelocity" "color" "alpha" "strength" "shape" "lifetime"</translate> <source lang="lua"> b2.ParticleSystem:createParticleGroup(particleGroupDef) </source> === <translate>Parameters</translate> === '''particleGroupDef''': (table) <translate>table with particle group data</translate> <br/> qx29gzqq2c17w8xmo3z9yboe16i07p1 B2.ParticleSystem:destroyParticle 0 977 10792 8061 2018-09-03T08:59:58Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.ParticleSystem|b2.ParticleSystem]]<br/> === <translate>Description</translate> === <translate>Destroy particle by Id</translate> <source lang="lua"> b2.ParticleSystem:destroyParticle(id) </source> === <translate>Parameters</translate> === '''id''': (number) <translate>id of particle to destroy</translate> <br/> 1gpr8grmvfbw0unmjotd9sb6rse4cza B2.ParticleSystem:destroyParticles 0 341 9779 7426 2018-09-03T08:57:37Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.ParticleSystem|b2.ParticleSystem]]<br/> === <translate>Description</translate> === <translate>Destroys particles</translate> <source lang="lua"> b2.ParticleSystem:destroyParticles(ids) </source> === <translate>Parameters</translate> === '''ids''': (table) <translate>List of particle ids to destroy</translate> <br/> tdgmgjnvj49brdx2pet788jn3xafk01 B2.ParticleSystem:getParticleCount 0 1076 10856 8167 2018-09-03T09:00:08Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' in development<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.ParticleSystem|b2.ParticleSystem]]<br/> === <translate>Description</translate> === <translate>Returns the number of particles</translate> <source lang="lua"> (number) = b2.ParticleSystem:getParticleCount() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The number of particles</translate><br/> 66b0a7whsz3519sc4hoacuw8rvy3oa6 B2.ParticleSystem:getParticleGroupList 0 538 10038 7678 2018-09-03T08:58:04Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.ParticleSystem|b2.ParticleSystem]]<br/> === <translate>Description</translate> === <translate>Returns a list of particle groups.</translate> <source lang="lua"> b2.ParticleSystem:getParticleGroupList() </source> 0hblio8hpyc298kxazoyo4gosm4x2uc B2.ParticleSystem:setTexture 0 494 9975 7616 2018-09-03T08:57:58Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.ParticleSystem|b2.ParticleSystem]]<br/> === <translate>Description</translate> === <translate>Sets texture to particles in this system</translate> <source lang="lua"> b2.ParticleSystem:setTexture(texture,size) </source> === <translate>Parameters</translate> === '''texture''': (Texture) <translate>texture to use for particles</translate> <br/> '''size''': (Number) <translate>Size of particle. Default the same size as physics particle size. Use a larger size to let particles visuals overlap each other.</translate> '''optional'''<br/> ooc7y6zmyiau9svo8mjw92bp0ak6go2 B2.PolygonShape 0 21 11692 10835 2018-09-13T14:33:29Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.PolygonShape --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/b2.Shape|b2.Shape]]<br/> === <translate>Description</translate> === <translate><br /> A convex polygon. It is assumed that the interior of the polygon is to the left of each edge.<br /> <br /></translate> === <translate>Examples</translate> === '''Create a square box2d box'''<br/> <source lang="lua">--create box2d physical object local body = world:createBody{type = b2.STATIC_BODY} local poly = b2.PolygonShape.new() poly:setAsBox(100, 100) local fixture = body:createFixture{shape = poly, density = 1.0, friction = 0.1, restitution = 0.2}</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.PolygonShape.new|b2.PolygonShape.new]] <br/><!-- GIDEROSMTD:b2.PolygonShape.new() --> [[Special:MyLanguage/b2.PolygonShape:set|b2.PolygonShape:set]] ''<translate>sets vertices</translate>''<br/><!-- GIDEROSMTD:b2.PolygonShape:set(vertices) sets vertices --> [[Special:MyLanguage/b2.PolygonShape:setAsBox|b2.PolygonShape:setAsBox]] ''<translate>set vertices to represent an oriented box</translate>''<br/><!-- GIDEROSMTD:b2.PolygonShape:setAsBox(hx,hy,centerx,centery,angle) set vertices to represent an oriented box --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} 4n3iba7map8trkkckiis1e9jr1nrayn B2.PolygonShape.new 0 1096 10544 8766 2018-09-03T08:59:34Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.PolygonShape|b2.PolygonShape]]<br/> === <translate>Description</translate> === <translate><br /> Creates a new [[Special:MyLanguage/b2.PolygonShape|b2.PolygonShape]] instance.<br /> <br /></translate> <source lang="lua"> (any), (any) = b2.PolygonShape.new() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (any) <translate>A new [[Special:MyLanguage/b2.PolygonShape|b2.PolygonShape]] object.</translate><br/> '''<translate>Returns</translate>''' (any) <translate>A new [[Special:MyLanguage/b2.PolygonShape|b2.PolygonShape]] object.</translate><br/> ih0a9fc160phcer6xb4o1xd3b4sc7o0 B2.PolygonShape:set 0 1081 10860 8168 2018-09-03T09:00:08Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.PolygonShape|b2.PolygonShape]]<br/> === <translate>Description</translate> === <translate><br /> Copy vertices. This assumes the vertices define a convex polygon. It is assumed that the exterior is the the right of each edge.<br /> <br /></translate> <source lang="lua"> b2.PolygonShape:set(vertices) </source> === <translate>Parameters</translate> === '''vertices''': (any) <translate>A list of numbers that contains the x, y coordinates of the vertices sequentially</translate> <br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">local polygonShape = b2.PolygonShape.new() polygonShape:set(1,4, 2,6, 3,7)</source> ab305bw6jygifk56q47gr0rpydcxv5z B2.PolygonShape:setAsBox 0 613 10122 7758 2018-09-03T08:58:13Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.PolygonShape|b2.PolygonShape]]<br/> === <translate>Description</translate> === <translate><br /> Build vertices to represent an oriented box.<br /> <br /></translate> <source lang="lua"> b2.PolygonShape:setAsBox(hx,hy,centerx,centery,angle) </source> === <translate>Parameters</translate> === '''hx''': (number) <translate>the half-width</translate> <br/> '''hy''': (number) <translate>the half-heigh</translate> <br/> '''centerx''': (number, default = 0) <translate>the x coordinate of the center of the box in local coordinates</translate> <br/> '''centery''': (number, default = 0) <translate>the y coordinate of the center of the box in local coordinates</translate> <br/> '''angle''': (number, default = 0) <translate>the rotation of the box in local coordinates</translate> <br/> 2o8n920zul6x0uvpxw42lt6p56c6rkt B2.PrismaticJoint 0 83 11653 10348 2018-09-13T14:32:44Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.PrismaticJoint --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/b2.Joint|b2.Joint]]<br/> === <translate>Description</translate> === <translate><br /> A prismatic joint. This joint provides one degree of freedom: translation along an axis fixed in body1. Relative rotation is prevented. You can use a joint limit to restrict the range of motion and a joint motor to drive the motion or to model joint friction. <br /> <br /></translate> === <translate>Examples</translate> === '''Prismatic joint'''<br/> <source lang="lua">--create empty box2d body for joint local ground = world:createBody({}) ground:setPosition(465, 480) --axisx, axisy values usually between 0 and 1 --0 0 moves freely --0 1 moves on y axis --1 0 moves on x axis --1 1 moves on diagonal local jointDef = b2.createPrismaticJointDef(body, ground, 350, 100, 0.3, 1) local prismaticJoint = world:createJoint(jointDef)</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.PrismaticJoint:enableLimit|b2.PrismaticJoint:enableLimit]] ''<translate>enables or disables the joint limit</translate>''<br/><!-- GIDEROSMTD:b2.PrismaticJoint:enableLimit(flag) enables or disables the joint limit --> [[Special:MyLanguage/b2.PrismaticJoint:enableMotor|b2.PrismaticJoint:enableMotor]] ''<translate>enables or disables the joint motor</translate>''<br/><!-- GIDEROSMTD:b2.PrismaticJoint:enableMotor(flag) enables or disables the joint motor --> [[Special:MyLanguage/b2.PrismaticJoint:getJointSpeed|b2.PrismaticJoint:getJointSpeed]] ''<translate>returns the current joint translation speed in meters per second</translate>''<br/><!-- GIDEROSMTD:b2.PrismaticJoint:getJointSpeed() returns the current joint translation speed in meters per second --> [[Special:MyLanguage/b2.PrismaticJoint:getJointTranslation|b2.PrismaticJoint:getJointTranslation]] ''<translate>returns the current joint translation in meters</translate>''<br/><!-- GIDEROSMTD:b2.PrismaticJoint:getJointTranslation() returns the current joint translation in meters --> [[Special:MyLanguage/b2.PrismaticJoint:getLimits|b2.PrismaticJoint:getLimits]] ''<translate>returns the lower and upper joint limits in meters</translate>''<br/><!-- GIDEROSMTD:b2.PrismaticJoint:getLimits() returns the lower and upper joint limits in meters --> [[Special:MyLanguage/b2.PrismaticJoint:getMotorSpeed|b2.PrismaticJoint:getMotorSpeed]] ''<translate>returns the motor speed in meters per second</translate>''<br/><!-- GIDEROSMTD:b2.PrismaticJoint:getMotorSpeed() returns the motor speed in meters per second --> [[Special:MyLanguage/b2.PrismaticJoint:isLimitEnabled|b2.PrismaticJoint:isLimitEnabled]] ''<translate>is the joint limit enabled?</translate>''<br/><!-- GIDEROSMTD:b2.PrismaticJoint:isLimitEnabled() is the joint limit enabled? --> [[Special:MyLanguage/b2.PrismaticJoint:isMotorEnabled|b2.PrismaticJoint:isMotorEnabled]] ''<translate>is the joint motor enabled?</translate>''<br/><!-- GIDEROSMTD:b2.PrismaticJoint:isMotorEnabled() is the joint motor enabled? --> [[Special:MyLanguage/b2.PrismaticJoint:setLimits|b2.PrismaticJoint:setLimits]] ''<translate>sets the joint limits in meters</translate>''<br/><!-- GIDEROSMTD:b2.PrismaticJoint:setLimits(lower,upper) sets the joint limits in meters --> [[Special:MyLanguage/b2.PrismaticJoint:setMaxMotorForce|b2.PrismaticJoint:setMaxMotorForce]] ''<translate>sets the maximum motor force in N</translate>''<br/><!-- GIDEROSMTD:b2.PrismaticJoint:setMaxMotorForce(force) sets the maximum motor force in N --> [[Special:MyLanguage/b2.PrismaticJoint:setMotorSpeed|b2.PrismaticJoint:setMotorSpeed]] ''<translate>sets the motor speed in meters per second</translate>''<br/><!-- GIDEROSMTD:b2.PrismaticJoint:setMotorSpeed(speed) sets the motor speed in meters per second --> [[Special:MyLanguage/b2.RevoluteJoint:getMotorForce|b2.RevoluteJoint:getMotorForce]] ''<translate>returns the current motor force given the inverse time step</translate>''<br/><!-- GIDEROSMTD:b2.RevoluteJoint:getMotorForce(inv_dt) returns the current motor force given the inverse time step --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} hvp2w5eta70fxnewaemjk57opi8nthv B2.PrismaticJoint:enableLimit 0 248 9655 7304 2018-09-03T08:57:24Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.PrismaticJoint|b2.PrismaticJoint]]<br/> === <translate>Description</translate> === <translate><br /> Enables or disables the joint limit. <br /> <br /></translate> <source lang="lua"> b2.PrismaticJoint:enableLimit(flag) </source> === <translate>Parameters</translate> === '''flag''': (boolean) <translate>enable flag of joint limit</translate> <br/> 9ypztj1p2mvojlrll4okobuhcz0ghwd B2.PrismaticJoint:enableMotor 0 649 10186 7823 2018-09-03T08:58:20Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.PrismaticJoint|b2.PrismaticJoint]]<br/> === <translate>Description</translate> === <translate><br /> Enables or disables the joint motor. <br /> <br /></translate> <source lang="lua"> b2.PrismaticJoint:enableMotor(flag) </source> === <translate>Parameters</translate> === '''flag''': (boolean) <translate>enable flag of joint motor</translate> <br/> 89qttwxe3cptrykqy73eilr48pnrfzc B2.PrismaticJoint:getJointSpeed 0 546 10035 7676 2018-09-03T08:58:04Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.PrismaticJoint|b2.PrismaticJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the current joint translation speed, usually in meters per second. <br /> <br /></translate> <source lang="lua"> (number) = b2.PrismaticJoint:getJointSpeed() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The current joint translation speed, usually in meters per second</translate><br/> ln268tvh1lwbzo3dkp089ciqa1gtau8 B2.PrismaticJoint:getJointTranslation 0 717 10251 7878 2018-09-03T08:58:29Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.PrismaticJoint|b2.PrismaticJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the current joint translation, usually in meters. <br /> <br /></translate> <source lang="lua"> (number) = b2.PrismaticJoint:getJointTranslation() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The current joint translation, usually in meters</translate><br/> sertpwjlfacsqckg6sk7ekqxaod5o78 B2.PrismaticJoint:getLimits 0 930 10762 8038 2018-09-03T08:59:55Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.PrismaticJoint|b2.PrismaticJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the lower and upper joint limit, usually in meters. <br /> <br /></translate> <source lang="lua"> (number), (number) = b2.PrismaticJoint:getLimits() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>lower joint limit, usually in meters</translate><br/> '''<translate>Returns</translate>''' (number) <translate>upper joint limit, usually in meters</translate><br/> sa152hs7f4xj0kc2tnu5jgunnx4vf9z B2.PrismaticJoint:getMotorSpeed 0 549 10060 7691 2018-09-03T08:58:07Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.PrismaticJoint|b2.PrismaticJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the motor speed in meters per second. <br /> <br /></translate> <source lang="lua"> (number) = b2.PrismaticJoint:getMotorSpeed() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The motor speed in meters per second</translate><br/> 5p912c7u3og9n595jt2tw540zi6wwo1 B2.PrismaticJoint:isLimitEnabled 0 495 9977 8584 2018-09-03T08:57:58Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.PrismaticJoint|b2.PrismaticJoint]]<br/> === <translate>Description</translate> === <translate>Is the joint limit enabled? <br /> <br /></translate> <source lang="lua"> (bool) = b2.PrismaticJoint:isLimitEnabled() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>''true'' if joint limit is enabled, ''false'' otherwise</translate><br/> 2r7zlkz4tpqbrv1q9l3jzs0znxrxl0o B2.PrismaticJoint:isMotorEnabled 0 1083 10524 8758 2018-09-03T08:59:32Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.PrismaticJoint|b2.PrismaticJoint]]<br/> === <translate>Description</translate> === <translate><br /> Is the joint motor enabled? <br /> <br /></translate> <source lang="lua"> (bool) = b2.PrismaticJoint:isMotorEnabled() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>''true'' if joint motor is enabled, ''false'' otherwise</translate><br/> kyuedetjv1514vec7x151dvqcpudaab B2.PrismaticJoint:setLimits 0 1061 10508 8141 2018-09-03T08:59:28Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.PrismaticJoint|b2.PrismaticJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets the joint limits, usually in meters. <br /> <br /></translate> <source lang="lua"> b2.PrismaticJoint:setLimits(lower,upper) </source> === <translate>Parameters</translate> === '''lower''': (number) <translate>lower joint limit in meters</translate> <br/> '''upper''': (number) <translate>upper joint limit in meters</translate> <br/> 7hrn25yonff8hj6sw13zjmz9nva63sy B2.PrismaticJoint:setMaxMotorForce 0 386 9830 7475 2018-09-03T08:57:43Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.PrismaticJoint|b2.PrismaticJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets the maximum motor force, usually in N. <br /> <br /></translate> <source lang="lua"> b2.PrismaticJoint:setMaxMotorForce(force) </source> === <translate>Parameters</translate> === '''force''': (number) <translate>the maximum motor force, usually in N.</translate> <br/> 5ab4h472dgn2ztqbx2b7qg6wvokm9ss B2.PrismaticJoint:setMotorSpeed 0 1049 10496 8125 2018-09-03T08:59:25Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.PrismaticJoint|b2.PrismaticJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets the motor speed in meters per second. <br /> <br /></translate> <source lang="lua"> b2.PrismaticJoint:setMotorSpeed(speed) </source> === <translate>Parameters</translate> === '''speed''': (number) <translate>motor speed in meters per second</translate> <br/> 0xsnld0ys7adlkh409sbtt9vrl181wk B2.PulleyJoint 0 103 11652 10718 2018-09-13T14:32:41Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.PulleyJoint --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/b2.Joint|b2.Joint]]<br/> === <translate>Description</translate> === <translate><br /> The pulley joint is connected to two bodies and two fixed ground points. The pulley supports a ratio such that: length1 ratio * length2 &lt;= constant Yes, the force transmitted is scaled by the ratio. The pulley also enforces a maximum length limit on both sides. This is useful to prevent one side of the pulley hitting the top. <br /> <br /></translate> === <translate>Examples</translate> === '''Pulley joint'''<br/> <source lang="lua">--create empty box2d body for joint local ground = world:createBody({}) local jointDef = b2.createPulleyJointDef(body1, body2, 200, 100, --coordinates where "imaginary string" is attached in the air for body 1 350, 100, --coordinates where "imaginary string" is attached in the air for body 2 200, 300, --coordinates where "imaginary string" is attached to the body 1 350, 300, --coordinates where "imaginary string" is attached in the body 2 1) -- ratio (if < 1 -> makes body 2 heavier, > 1 makes body 1 heavier, =1 makes them equal local pulleyJoint = world:createJoint(jointDef)</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.PulleyJoint:getGroundAnchorA|b2.PulleyJoint:getGroundAnchorA]] ''<translate>returns the x and y coordinates of the first ground anchor</translate>''<br/><!-- GIDEROSMTD:b2.PulleyJoint:getGroundAnchorA() returns the x and y coordinates of the first ground anchor --> [[Special:MyLanguage/b2.PulleyJoint:getGroundAnchorB|b2.PulleyJoint:getGroundAnchorB]] ''<translate>returns the x and y coordinates of the second ground anchor</translate>''<br/><!-- GIDEROSMTD:b2.PulleyJoint:getGroundAnchorB() returns the x and y coordinates of the second ground anchor --> [[Special:MyLanguage/b2.PulleyJoint:getLengthA|b2.PulleyJoint:getLengthA]] ''<translate>returns the current length of the segment attached to bodyA</translate>''<br/><!-- GIDEROSMTD:b2.PulleyJoint:getLengthA() returns the current length of the segment attached to bodyA --> [[Special:MyLanguage/b2.PulleyJoint:getLengthB|b2.PulleyJoint:getLengthB]] ''<translate>returns the current length of the segment attached to bodyB</translate>''<br/><!-- GIDEROSMTD:b2.PulleyJoint:getLengthB() returns the current length of the segment attached to bodyB --> [[Special:MyLanguage/b2.PulleyJoint:getRatio|b2.PulleyJoint:getRatio]] ''<translate>returns the joint ratio</translate>''<br/><!-- GIDEROSMTD:b2.PulleyJoint:getRatio() returns the joint ratio --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} mckzi1g0pv3hi1yaobzk5volg5w1i7y B2.PulleyJoint:getGroundAnchorA 0 350 9786 7432 2018-09-03T08:57:38Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.PulleyJoint|b2.PulleyJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the x and y coordinates of the first ground anchor. <br /> <br /></translate> <source lang="lua"> (number), (number) = b2.PulleyJoint:getGroundAnchorA() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x coordinates of the first ground anchor</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y coordinates of the first ground anchor</translate><br/> pc8nn8k5u4wafbwh5gahhkorccr75fd B2.PulleyJoint:getGroundAnchorB 0 353 9785 7431 2018-09-03T08:57:38Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.PulleyJoint|b2.PulleyJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the x and y coordinates of the second ground anchor. <br /> <br /></translate> <source lang="lua"> (number), (number) = b2.PulleyJoint:getGroundAnchorB() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x coordinates of the second ground anchor</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y coordinates of the second ground anchor</translate><br/> p8kyninpjc57xdc1vo0clr7d4pfqk14 B2.PulleyJoint:getLengthA 0 595 10102 7751 2018-09-03T08:58:11Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.PulleyJoint|b2.PulleyJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the current length of the segment attached to bodyA. <br /> <br /></translate> <source lang="lua"> (number) = b2.PulleyJoint:getLengthA() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The current length of the segment attached to bodyA</translate><br/> ta9ujka74tsjtn2yapfyc3c4hn8tp1w B2.PulleyJoint:getLengthB 0 586 10103 7738 2018-09-03T08:58:11Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.PulleyJoint|b2.PulleyJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the current length of the segment attached to bodyB. <br /> <br /></translate> <source lang="lua"> (number) = b2.PulleyJoint:getLengthB() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The current length of the segment attached to bodyB</translate><br/> 0sbzjwv6lpopi2wfcjlrt9d3hwj961k B2.PulleyJoint:getRatio 0 625 10162 7798 2018-09-03T08:58:18Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.PulleyJoint|b2.PulleyJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the pulley ratio.<br /> <br /></translate> <source lang="lua"> (number) = b2.PulleyJoint:getRatio() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The pulley ratio</translate><br/> syb74qw3eiswhzzoenn826f15jmxmi1 B2.REVOLUTE JOINT 0 1230 9844 7485 2018-09-03T08:57:44Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 1<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate></translate> fovf5p0wutbetvmyyi7x8vjbmoyec06 B2.ROPE JOINT 0 1185 9538 7183 2018-09-03T08:57:12Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 10<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate></translate> 3z3ltqbfusksud6mbbhro4egvqdb2wm B2.RevoluteJoint 0 68 11659 10414 2018-09-13T14:32:53Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.RevoluteJoint --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/b2.Joint|b2.Joint]]<br/> === <translate>Description</translate> === <translate><br /> A revolute joint constrains two bodies to share a common point while they are free to rotate about the point. The relative rotation about the shared point is the joint angle. You can limit the relative rotation with a joint limit that specifies a lower and upper angle. You can use a motor to drive the relative rotation about the shared point. A maximum motor torque is provided so that infinite forces are not generated. <br /> <br /></translate> === <translate>Examples</translate> === '''Revolute joint'''<br/> <source lang="lua">--create empty box2d body for joint local ground = world:createBody({}) ground:setPosition(300, 480) local jointDef = b2.createRevoluteJointDef(body, ground, 300, 300) local revoluteJoint = world:createJoint(jointDef) --will not let ball spin for ever revoluteJoint:setMaxMotorTorque(1) revoluteJoint:enableMotor(true)</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.RevoluteJoint:enableLimit|b2.RevoluteJoint:enableLimit]] ''<translate>enables or disables the joint limit</translate>''<br/><!-- GIDEROSMTD:b2.RevoluteJoint:enableLimit(flag) enables or disables the joint limit --> [[Special:MyLanguage/b2.RevoluteJoint:enableMotor|b2.RevoluteJoint:enableMotor]] ''<translate>enables or disables the joint motor</translate>''<br/><!-- GIDEROSMTD:b2.RevoluteJoint:enableMotor(flag) enables or disables the joint motor --> [[Special:MyLanguage/b2.RevoluteJoint:getJointAngle|b2.RevoluteJoint:getJointAngle]] ''<translate>returns the current joint angle in radians</translate>''<br/><!-- GIDEROSMTD:b2.RevoluteJoint:getJointAngle() returns the current joint angle in radians --> [[Special:MyLanguage/b2.RevoluteJoint:getJointSpeed|b2.RevoluteJoint:getJointSpeed]] ''<translate>returns the current joint angle speed in radians per second</translate>''<br/><!-- GIDEROSMTD:b2.RevoluteJoint:getJointSpeed() returns the current joint angle speed in radians per second --> [[Special:MyLanguage/b2.RevoluteJoint:getLimits|b2.RevoluteJoint:getLimits]] ''<translate>returns the lower and upper joint limit in radians</translate>''<br/><!-- GIDEROSMTD:b2.RevoluteJoint:getLimits() returns the lower and upper joint limit in radians --> [[Special:MyLanguage/b2.RevoluteJoint:getMotorSpeed|b2.RevoluteJoint:getMotorSpeed]] ''<translate>returns the motor speed in radians per second</translate>''<br/><!-- GIDEROSMTD:b2.RevoluteJoint:getMotorSpeed() returns the motor speed in radians per second --> [[Special:MyLanguage/b2.RevoluteJoint:getMotorTorque|b2.RevoluteJoint:getMotorTorque]] ''<translate>returns the current motor torque given the inverse time step</translate>''<br/><!-- GIDEROSMTD:b2.RevoluteJoint:getMotorTorque(inv_dt) returns the current motor torque given the inverse time step --> [[Special:MyLanguage/b2.RevoluteJoint:isLimitEnabled|b2.RevoluteJoint:isLimitEnabled]] ''<translate>is the joint limit enabled?</translate>''<br/><!-- GIDEROSMTD:b2.RevoluteJoint:isLimitEnabled() is the joint limit enabled? --> [[Special:MyLanguage/b2.RevoluteJoint:isMotorEnabled|b2.RevoluteJoint:isMotorEnabled]] ''<translate>is the joint motor enabled?</translate>''<br/><!-- GIDEROSMTD:b2.RevoluteJoint:isMotorEnabled() is the joint motor enabled? --> [[Special:MyLanguage/b2.RevoluteJoint:setLimits|b2.RevoluteJoint:setLimits]] ''<translate>sets the joint limits in radians</translate>''<br/><!-- GIDEROSMTD:b2.RevoluteJoint:setLimits(lower,upper) sets the joint limits in radians --> [[Special:MyLanguage/b2.RevoluteJoint:setMaxMotorTorque|b2.RevoluteJoint:setMaxMotorTorque]] ''<translate>sets the maximum motor torque in N*m</translate>''<br/><!-- GIDEROSMTD:b2.RevoluteJoint:setMaxMotorTorque(torque) sets the maximum motor torque in N*m --> [[Special:MyLanguage/b2.RevoluteJoint:setMotorSpeed|b2.RevoluteJoint:setMotorSpeed]] ''<translate>sets the motor speed in radians per second</translate>''<br/><!-- GIDEROSMTD:b2.RevoluteJoint:setMotorSpeed(speed) sets the motor speed in radians per second --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} oqfw02myc0an2ij24yf1eud5xwrjwj0 B2.RevoluteJoint:enableLimit 0 672 10218 7851 2018-09-03T08:58:24Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.RevoluteJoint|b2.RevoluteJoint]]<br/> === <translate>Description</translate> === <translate><br /> Enables or disables the joint limit. <br /> <br /></translate> <source lang="lua"> b2.RevoluteJoint:enableLimit(flag) </source> === <translate>Parameters</translate> === '''flag''': (boolean) <translate>enable flag of joint limit</translate> <br/> pxjnggslbr9na9vz0dwxh3g6i5ehi02 B2.RevoluteJoint:enableMotor 0 229 9637 7287 2018-09-03T08:57:22Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.RevoluteJoint|b2.RevoluteJoint]]<br/> === <translate>Description</translate> === <translate><br /> Enables or disables the joint motor. <br /> <br /></translate> <source lang="lua"> b2.RevoluteJoint:enableMotor(flag) </source> === <translate>Parameters</translate> === '''flag''': (boolean) <translate>enable flag of joint motor</translate> <br/> 7y7popyd8n3clxxxsjm5xm2mzzl8e31 B2.RevoluteJoint:getJointAngle 0 803 10683 8334 2018-09-03T08:59:47Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.RevoluteJoint|b2.RevoluteJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the current joint angle in radians.<br /> <br /></translate> <source lang="lua"> (number) = b2.RevoluteJoint:getJointAngle() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The current joint angle in radians</translate><br/> e3smmu5m29zdsix6dbrw0j2y579xnj7 B2.RevoluteJoint:getJointSpeed 0 1017 10817 8456 2018-09-03T09:00:02Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.RevoluteJoint|b2.RevoluteJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the current joint angle speed in radians per second. <br /> <br /></translate> <source lang="lua"> (number) = b2.RevoluteJoint:getJointSpeed() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The current joint angle speed in radians per second</translate><br/> 5q3134uwk4l7gy4ofqy1u7ox6n0hgkt B2.RevoluteJoint:getLimits 0 225 9629 7278 2018-09-03T08:57:22Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.RevoluteJoint|b2.RevoluteJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the lower and upper joint limit in radians. <br /> <br /></translate> <source lang="lua"> (number), (number) = b2.RevoluteJoint:getLimits() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>lower joint limit in radians</translate><br/> '''<translate>Returns</translate>''' (number) <translate>upper joint limit in radians</translate><br/> je78g1oegsok84scvku97bhnk7hngfo B2.RevoluteJoint:getMotorForce 0 1022 10473 8466 2018-09-03T08:59:20Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.PrismaticJoint|b2.PrismaticJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the current motor force given the inverse time step, usually in N. <br /> <br /></translate> <source lang="lua"> (number) = b2.RevoluteJoint:getMotorForce(inv_dt) </source> === <translate>Parameters</translate> === '''inv_dt''': (number) <translate></translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The current motor force given the inverse time step, usually in N</translate><br/> cv9xixjfgd155de3ibpjkzc60m5lhey B2.RevoluteJoint:getMotorSpeed 0 1044 10488 8483 2018-09-03T08:59:24Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.RevoluteJoint|b2.RevoluteJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the motor speed in radians per second. <br /> <br /></translate> <source lang="lua"> (number) = b2.RevoluteJoint:getMotorSpeed() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The motor speed in radians per second</translate><br/> fioe8mv6k40nh7l4ie7x47218aah4j9 B2.RevoluteJoint:getMotorTorque 0 821 10694 8341 2018-09-03T08:59:48Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.RevoluteJoint|b2.RevoluteJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the current motor torque given the inverse time step. Unit is N*m. <br /> <br /></translate> <source lang="lua"> (number) = b2.RevoluteJoint:getMotorTorque(inv_dt) </source> === <translate>Parameters</translate> === '''inv_dt''': (number) <translate></translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The current motor torque given the inverse time step. Unit is N*m</translate><br/> b4dzgyggivmrgtv0obf1ufuok4ckfno B2.RevoluteJoint:isLimitEnabled 0 173 9560 8526 2018-09-03T08:57:14Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.RevoluteJoint|b2.RevoluteJoint]]<br/> === <translate>Description</translate> === <translate><br /> Is the joint limit enabled? <br /> <br /></translate> <source lang="lua"> (bool) = b2.RevoluteJoint:isLimitEnabled() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>''true'' if joint limit is enabled, ''false'' otherwise</translate><br/> s2gjudt147etg3q1p1qzmhovqgklxlm B2.RevoluteJoint:isMotorEnabled 0 528 10025 8594 2018-09-03T08:58:03Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.RevoluteJoint|b2.RevoluteJoint]]<br/> === <translate>Description</translate> === <translate><br /> Is the joint motor enabled? <br /> <br /></translate> <source lang="lua"> (bool) = b2.RevoluteJoint:isMotorEnabled() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>''true'' if joint motor is enabled, ''false'' otherwise</translate><br/> 9c86otljqs3qyemijeejm60fcjlmfpe B2.RevoluteJoint:setLimits 0 323 10618 7409 2018-09-03T08:59:41Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.RevoluteJoint|b2.RevoluteJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets the joint limits in radians. <br /> <br /></translate> <source lang="lua"> b2.RevoluteJoint:setLimits(lower,upper) </source> === <translate>Parameters</translate> === '''lower''': (number) <translate>lower joint limit in radians</translate> <br/> '''upper''': (number) <translate>upper joint limit in radians</translate> <br/> o8f4k44i7sum4rhj2cze3drhxlpwrj2 B2.RevoluteJoint:setMaxMotorTorque 0 427 9895 7540 2018-09-03T08:57:49Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.RevoluteJoint|b2.RevoluteJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets the maximum motor torque, usually in N-m. <br /> <br /></translate> <source lang="lua"> b2.RevoluteJoint:setMaxMotorTorque(torque) </source> === <translate>Parameters</translate> === '''torque''': (number) <translate>the maximum motor torque, usually in N-m</translate> <br/> gklcnsc13vtpwedv90072dvvgm7imzc B2.RevoluteJoint:setMotorSpeed 0 512 10001 7647 2018-09-03T08:58:01Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.RevoluteJoint|b2.RevoluteJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets the motor speed in radians per second. <br /> <br /></translate> <source lang="lua"> b2.RevoluteJoint:setMotorSpeed(speed) </source> === <translate>Parameters</translate> === '''speed''': (number) <translate>motor speed in radians per second</translate> <br/> rgphto4bzqsr7fab3j9vkvuysvmp095 B2.RopeJoint 0 128 11640 10161 2018-09-13T14:32:15Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.RopeJoint --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/b2.Joint|b2.Joint]]<br/> === <translate>Description</translate> === <translate><br /> A rope joint enforces a maximum distance between two points on two bodies. It has no other effect.<br /> Warning: if you attempt to change the maximum length during the simulation you will get some non-physical behavior.<br /> A model that would allow you to dynamically modify the length would have some sponginess, so I chose not to implement it that way.<br /> See [[Special:MyLanguage/b2.DistanceJoint|b2.DistanceJoint]] if you want to dynamically control length. <br /> <br /></translate> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.RopeJoint:getMaxLength|b2.RopeJoint:getMaxLength]] <br/><!-- GIDEROSMTD:b2.RopeJoint:getMaxLength() --> [[Special:MyLanguage/b2.RopeJoint:setMaxLength|b2.RopeJoint:setMaxLength]] <br/><!-- GIDEROSMTD:b2.RopeJoint:setMaxLength(maxLength) --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} ephkq9xkgynvurur9ev5tyxhgb02fpg B2.RopeJoint:getMaxLength 0 217 9618 7272 2018-09-03T08:57:21Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.RopeJoint|b2.RopeJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the maximum length of the rope. <br /> <br /></translate> <source lang="lua"> (number) = b2.RopeJoint:getMaxLength() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The maximum length of the rope.</translate><br/> s271pr794xd2nlj7xw3e23w3njw8x3o B2.RopeJoint:setMaxLength 0 632 10168 7802 2018-09-03T08:58:18Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.RopeJoint|b2.RopeJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets the maximum length of the rope. <br /> <br /></translate> <source lang="lua"> b2.RopeJoint:setMaxLength(maxLength) </source> === <translate>Parameters</translate> === '''maxLength''': (number) <translate></translate> <br/> q9j35iqoa5074f8eg2fr2vspewxh1qb B2.STATIC BODY 0 1239 9950 7592 2018-09-03T08:57:55Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 0<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate></translate> 3neyfnt3taysgqdf6f17b8bm5aaxplm B2.Shape 0 60 9551 8971 2018-09-03T08:57:13Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.Shape --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> === <translate>Description</translate> === <translate><br /> A shape is used for collision detection.<br /> You can not create a [[Special:MyLanguage/b2.Shape|b2.Shape]] instance directly, but instead you create [[Special:MyLanguage/b2.CircleShape|b2.CircleShape]], [[Special:MyLanguage/b2.ChainShape|b2.ChainShape]] and [[Special:MyLanguage/b2.PolygonShape|b2.PolygonShape]] instances.<br /> <br /></translate> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} l4sc4w5ixsm4zmigf62cwtrvf9gx4jj B2.WELD JOINT 0 1287 10747 8006 2018-09-03T08:59:54Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 8<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate></translate> thx9fthozj3qivhcixzvelvz4b42otl B2.WHEEL JOINT 0 1254 10177 7814 2018-09-03T08:58:19Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Value</translate>:''' 7<br/> '''<translate>Defined by</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate></translate> 62xduobmrceiwdhy0yjbayplq1q5kdd B2.WeldJoint 0 119 11682 10383 2018-09-13T14:33:26Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.WeldJoint --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/b2.Joint|b2.Joint]]<br/> === <translate>Description</translate> === <translate><br /> A weld joint essentially glues two bodies together. A weld joint may distort somewhat because the island constraint solver is approximate. <br /> <br /></translate> === <translate>Examples</translate> === '''Weld joint'''<br/> <source lang="lua">local jointDef = b2.createWeldJointDef(body1, body2, 100, 100, 130, 100) local weldJoint = world:createJoint(jointDef)</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.WeldJoint:getDampingRatio|b2.WeldJoint:getDampingRatio]] ''<translate>returns damping ratio</translate>''<br/><!-- GIDEROSMTD:b2.WeldJoint:getDampingRatio() returns damping ratio --> [[Special:MyLanguage/b2.WeldJoint:getFrequency|b2.WeldJoint:getFrequency]] ''<translate>returns frequency in Hz</translate>''<br/><!-- GIDEROSMTD:b2.WeldJoint:getFrequency() returns frequency in Hz --> [[Special:MyLanguage/b2.WeldJoint:setDampingRatio|b2.WeldJoint:setDampingRatio]] ''<translate>sets damping ratio</translate>''<br/><!-- GIDEROSMTD:b2.WeldJoint:setDampingRatio(damping) sets damping ratio --> [[Special:MyLanguage/b2.WeldJoint:setFrequency|b2.WeldJoint:setFrequency]] ''<translate>sets frequency in Hz</translate>''<br/><!-- GIDEROSMTD:b2.WeldJoint:setFrequency(frequency) sets frequency in Hz --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} 9e7pz0nsrvovgfuii65zbejvxvpgs76 B2.WeldJoint:getDampingRatio 0 253 9668 7309 2018-09-03T08:57:25Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.WeldJoint|b2.WeldJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns damping ratio. <br /> <br /></translate> <source lang="lua"> (number) = b2.WeldJoint:getDampingRatio() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>Damping ratio</translate><br/> lv4ztxunrqrqmdhchhb9xvjs9wxzdzo B2.WeldJoint:getFrequency 0 924 10392 8030 2018-09-03T08:59:02Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.WeldJoint|b2.WeldJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns frequency in Hz. <br /> <br /></translate> <source lang="lua"> (number) = b2.WeldJoint:getFrequency() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>Frequency in Hz</translate><br/> dlc545lq7gjl1gc11oluz3ozrw92zxe B2.WeldJoint:setDampingRatio 0 671 10221 7855 2018-09-03T08:58:24Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.WeldJoint|b2.WeldJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets damping ratio. <br /> <br /></translate> <source lang="lua"> b2.WeldJoint:setDampingRatio(damping) </source> === <translate>Parameters</translate> === '''damping''': (number) <translate>damping ratio</translate> <br/> evkccgusemnya5om7vxuaqctorpr5rt B2.WeldJoint:setFrequency 0 393 9840 7481 2018-09-03T08:57:44Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.WeldJoint|b2.WeldJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets frequency in Hz.<br /> <br /></translate> <source lang="lua"> b2.WeldJoint:setFrequency(frequency) </source> === <translate>Parameters</translate> === '''frequency''': (number) <translate>frequency in Hz</translate> <br/> awou77t1qczt1723ukfsrhlbaisz4c3 B2.WheelJoint 0 69 11651 10321 2018-09-13T14:32:39Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.WheelJoint --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/b2.Joint|b2.Joint]]<br/> === <translate>Description</translate> === <translate><br /> A wheel joint provides two degrees of freedom: translation along an axis fixed in bodyA and rotation in the plane. You can use a <br /> joint limit to restrict the range of motion and a joint motor to drive the rotation or to model rotational friction. This joint <br /> is designed for vehicle suspensions.<br /> <br /></translate> === <translate>Examples</translate> === '''Wheel joint'''<br/> <source lang="lua">--create empty box2d body for joint local ground = world:createBody({}) ground:setPosition(350, 480) --axisx, axisy values usually between 0 and 1 --0 0 moves freely --0 1 force pulling back on y axis --1 0 force pulling back on x axis --1 1 force pulling back all diretions local jointDef = b2.createWheelJointDef(body, ground, 350, 200, 1, 1) local wheelJoint = world:createJoint(jointDef)</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.WheelJoint:enableMotor|b2.WheelJoint:enableMotor]] ''<translate>enables or disables the joint motor</translate>''<br/><!-- GIDEROSMTD:b2.WheelJoint:enableMotor(flag) enables or disables the joint motor --> [[Special:MyLanguage/b2.WheelJoint:getJointSpeed|b2.WheelJoint:getJointSpeed]] ''<translate>returns the current joint translation speed in meters per second.</translate>''<br/><!-- GIDEROSMTD:b2.WheelJoint:getJointSpeed() returns the current joint translation speed in meters per second. --> [[Special:MyLanguage/b2.WheelJoint:getJointTranslation|b2.WheelJoint:getJointTranslation]] ''<translate>returns the current joint translation in meters.</translate>''<br/><!-- GIDEROSMTD:b2.WheelJoint:getJointTranslation() returns the current joint translation in meters. --> [[Special:MyLanguage/b2.WheelJoint:getMaxMotorTorque|b2.WheelJoint:getMaxMotorTorque]] ''<translate>returns the maximum motor torque in N*m</translate>''<br/><!-- GIDEROSMTD:b2.WheelJoint:getMaxMotorTorque() returns the maximum motor torque in N*m --> [[Special:MyLanguage/b2.WheelJoint:getMotorSpeed|b2.WheelJoint:getMotorSpeed]] ''<translate>returns the motor speed in radians per second</translate>''<br/><!-- GIDEROSMTD:b2.WheelJoint:getMotorSpeed() returns the motor speed in radians per second --> [[Special:MyLanguage/b2.WheelJoint:getSpringDampingRatio|b2.WheelJoint:getSpringDampingRatio]] ''<translate>returns the spring damping ratio</translate>''<br/><!-- GIDEROSMTD:b2.WheelJoint:getSpringDampingRatio() returns the spring damping ratio --> [[Special:MyLanguage/b2.WheelJoint:getSpringFrequencyHz|b2.WheelJoint:getSpringFrequencyHz]] ''<translate>returns the spring frequency in Hertz</translate>''<br/><!-- GIDEROSMTD:b2.WheelJoint:getSpringFrequencyHz() returns the spring frequency in Hertz --> [[Special:MyLanguage/b2.WheelJoint:isMotorEnabled|b2.WheelJoint:isMotorEnabled]] ''<translate>is the joint motor enabled?</translate>''<br/><!-- GIDEROSMTD:b2.WheelJoint:isMotorEnabled() is the joint motor enabled? --> [[Special:MyLanguage/b2.WheelJoint:setMaxMotorTorque|b2.WheelJoint:setMaxMotorTorque]] ''<translate>sets the maximum motor torque in N*m</translate>''<br/><!-- GIDEROSMTD:b2.WheelJoint:setMaxMotorTorque(torque) sets the maximum motor torque in N*m --> [[Special:MyLanguage/b2.WheelJoint:setMotorSpeed|b2.WheelJoint:setMotorSpeed]] ''<translate>sets the motor speed in radians per second</translate>''<br/><!-- GIDEROSMTD:b2.WheelJoint:setMotorSpeed(speed) sets the motor speed in radians per second --> [[Special:MyLanguage/b2.WheelJoint:setSpringDampingRatio|b2.WheelJoint:setSpringDampingRatio]] ''<translate>sets the spring damping ratio</translate>''<br/><!-- GIDEROSMTD:b2.WheelJoint:setSpringDampingRatio(damping) sets the spring damping ratio --> [[Special:MyLanguage/b2.WheelJoint:setSpringFrequencyHz|b2.WheelJoint:setSpringFrequencyHz]] ''<translate>sets the spring frequency in Hertz (0 = disable the spring)</translate>''<br/><!-- GIDEROSMTD:b2.WheelJoint:setSpringFrequencyHz(frequency) sets the spring frequency in Hertz (0 = disable the spring) --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} fh3falpmzjygopflg007u1jorgpe6oe B2.WheelJoint:enableMotor 0 960 10415 8426 2018-09-03T08:59:08Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.WheelJoint|b2.WheelJoint]]<br/> === <translate>Description</translate> === <translate><br /> Enables or disables the joint motor. <br /> <br /></translate> <source lang="lua"> b2.WheelJoint:enableMotor(flag) </source> === <translate>Parameters</translate> === '''flag''': (boolean) <translate>enable flag of joint motor</translate> <br/> 08cuic55iimo4xkn56na2jpie57yydt B2.WheelJoint:getJointSpeed 0 886 10735 8005 2018-09-03T08:59:53Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.WheelJoint|b2.WheelJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the current joint translation speed in meters per second. <br /> <br /></translate> <source lang="lua"> (number) = b2.WheelJoint:getJointSpeed() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The current joint translation speed in meters per second</translate><br/> 9kqoj8rx5hbe94a6qefjsqvp7qxmeow B2.WheelJoint:getJointTranslation 0 861 10713 7981 2018-09-03T08:59:50Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.WheelJoint|b2.WheelJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the current joint translation in meters.<br /> <br /></translate> <source lang="lua"> (number) = b2.WheelJoint:getJointTranslation() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The current joint translation in meters</translate><br/> me26u53u7a8qz7qe71lx3ju9t4onh55 B2.WheelJoint:getMaxMotorTorque 0 582 10093 7733 2018-09-03T08:58:10Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.WheelJoint|b2.WheelJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the maximum motor torque in N*m. <br /> <br /></translate> <source lang="lua"> (number) = b2.WheelJoint:getMaxMotorTorque() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The maximum motor torque in N-m</translate><br/> qn3b0bf6p62ox2o8q3n88oys0u07zwz B2.WheelJoint:getMotorSpeed 0 852 10346 7978 2018-09-03T08:58:52Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.WheelJoint|b2.WheelJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the motor speed in radians per second. <br /> <br /></translate> <source lang="lua"> (number) = b2.WheelJoint:getMotorSpeed() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The motor speed in radians per second</translate><br/> gq2idmzvjfu2fsxahgmtlsn4fu7yc3y B2.WheelJoint:getSpringDampingRatio 0 261 9671 7322 2018-09-03T08:57:26Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.WheelJoint|b2.WheelJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the spring damping ratio. <br /> <br /></translate> <source lang="lua"> (number) = b2.WheelJoint:getSpringDampingRatio() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The spring damping ratio</translate><br/> my53o464s4l1amviiej7lg6q2nk7q5p B2.WheelJoint:getSpringFrequencyHz 0 317 9747 7401 2018-09-03T08:57:34Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.WheelJoint|b2.WheelJoint]]<br/> === <translate>Description</translate> === <translate><br /> Returns the spring frequency in hertz.<br /> <br /></translate> <source lang="lua"> (number) = b2.WheelJoint:getSpringFrequencyHz() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The spring frequency in hertz.</translate><br/> dnjqyaucs4ua4er9saz8vekz6oo1iji B2.WheelJoint:isMotorEnabled 0 878 10365 8695 2018-09-03T08:58:55Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.WheelJoint|b2.WheelJoint]]<br/> === <translate>Description</translate> === <translate><br /> Is the joint motor enabled? <br /> <br /></translate> <source lang="lua"> (bool) = b2.WheelJoint:isMotorEnabled() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (bool) <translate>''true'' if joint motor is enabled, ''false'' otherwise</translate><br/> 2u7c21q101vd5bnbgetza5bwa0i28ay B2.WheelJoint:setMaxMotorTorque 0 585 10081 7722 2018-09-03T08:58:09Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.WheelJoint|b2.WheelJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets the maximum motor torque in N*m. <br /> <br /></translate> <source lang="lua"> b2.WheelJoint:setMaxMotorTorque(torque) </source> === <translate>Parameters</translate> === '''torque''': (number) <translate>the maximum motor torque in N-m</translate> <br/> ojwwsd71vib30o6udcsm5133lny5jpo B2.WheelJoint:setMotorSpeed 0 910 10387 8397 2018-09-03T08:59:00Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.WheelJoint|b2.WheelJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets the motor speed in radians per second. <br /> <br /></translate> <source lang="lua"> b2.WheelJoint:setMotorSpeed(speed) </source> === <translate>Parameters</translate> === '''speed''': (number) <translate>motor speed in radians per second</translate> <br/> jzzlrrd727kjtwwrpaqv9ytj1k37ceb B2.WheelJoint:setSpringDampingRatio 0 634 10172 7804 2018-09-03T08:58:19Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.WheelJoint|b2.WheelJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets the spring damping ratio. <br /> <br /></translate> <source lang="lua"> b2.WheelJoint:setSpringDampingRatio(damping) </source> === <translate>Parameters</translate> === '''damping''': (number) <translate>damping ratio</translate> <br/> f3edgtwz0a677r5yeen3myh2fow8dgi B2.WheelJoint:setSpringFrequencyHz 0 304 9730 7376 2018-09-03T08:57:32Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.WheelJoint|b2.WheelJoint]]<br/> === <translate>Description</translate> === <translate><br /> Sets the spring frequency in hertz. Setting the frequency to zero disables the spring.<br /> <br /></translate> <source lang="lua"> b2.WheelJoint:setSpringFrequencyHz(frequency) </source> === <translate>Parameters</translate> === '''frequency''': (number) <translate>spring frequency in hertz</translate> <br/> rrw7bq82khb29udkjh4hta1ix2iwucl B2.World 0 100 11677 10644 2018-09-13T14:33:22Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.World --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/EventDispatcher|EventDispatcher]]<br/> === <translate>Description</translate> === <translate>The [[Special:MyLanguage/b2.World|b2.World]] class inherits from the following class: [[Special:MyLanguage/EventDispatcher|EventDispatcher]].<br /> <br /> The [[Special:MyLanguage/b2.World|b2.World]] class manages all physics entities and dynamic simulation. It is possible to create and manage more than one [[Special:MyLanguage/b2.World|b2.World]] instance.<br /> <br /></translate> === <translate>Examples</translate> === '''Creating Box2d body and moving Bitmap along the body'''<br/> <source lang="lua">require "box2d" local world = b2.World.new(0, 10, true) --create ball bitmap object from ball graphic local ball = Bitmap.new(Texture.new("ball.png")) --reference center of the ball for positioning ball:setAnchorPoint(0.5,0.5) ball:setPosition(100,100) --get radius local radius = ball:getWidth()/2 --create box2d physical object local body = world:createBody{type = b2.DYNAMIC_BODY} local circle = b2.CircleShape.new(0, 0, radius) local fixture = body:createFixture{shape = circle, density = 1.0, friction = 0.1, restitution = 0.2} ball.body = body --add to scene stage:addChild(ball) stage:addEventListener(Event.ENTER_FRAME, function() -- edit the step values if required. These are good defaults! world:step(1/60, 8, 3) ball:setPosition(ball.body:getPosition()) ball:setRotation(math.rad(ball.body:getAngle())) end)</source> '''Detecting collisions between bodies'''<br/> <source lang="lua">--add collision event listener world:addEventListener(Event.BEGIN_CONTACT, function(e) --getting contact bodies local fixtureA = e.fixtureA local fixtureB = e.fixtureB local bodyA = fixtureA:getBody() local bodyB = fixtureB:getBody() --do what you need with colliding bodies end) --add collision event listener world:addEventListener(Event.END_CONTACT, function(e) --getting contact bodies local fixtureA = e.fixtureA local fixtureB = e.fixtureB local bodyA = fixtureA:getBody() local bodyB = fixtureB:getBody() --do what you need with colliding bodies end) --add collision event listener world:addEventListener(Event.PRE_SOLVE, function(e) --getting contact bodies local fixtureA = e.fixtureA local fixtureB = e.fixtureB local bodyA = fixtureA:getBody() local bodyB = fixtureB:getBody() --do what you need with colliding bodies end) --add collision event listener world:addEventListener(Event.POST_SOLVE, function(e) --getting contact bodies local fixtureA = e.fixtureA local fixtureB = e.fixtureB local bodyA = fixtureA:getBody() local bodyB = fixtureB:getBody() --do what you need with colliding bodies --additionally get collision force print(event.maxImpulse) end)</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/b2.World.new|b2.World.new]] <br/><!-- GIDEROSMTD:b2.World.new(gravityx,gravityy,doSleep) --> [[Special:MyLanguage/b2.World:clearForces|b2.World:clearForces]] ''<translate>call this after you are done with time steps to clear the forces</translate>''<br/><!-- GIDEROSMTD:b2.World:clearForces() call this after you are done with time steps to clear the forces --> [[Special:MyLanguage/b2.World:createBody|b2.World:createBody]] ''<translate>creates a rigid body given a definition</translate>''<br/><!-- GIDEROSMTD:b2.World:createBody(bodyDef) creates a rigid body given a definition --> [[Special:MyLanguage/b2.World:createJoint|b2.World:createJoint]] ''<translate>creates a joint given a definition</translate>''<br/><!-- GIDEROSMTD:b2.World:createJoint(jointDef) creates a joint given a definition --> [[Special:MyLanguage/b2.World:createParticleSystem|b2.World:createParticleSystem]] ''<translate>create particle system</translate>''<br/><!-- GIDEROSMTD:b2.World:createParticleSystem(particleSysDef) create particle system --> [[Special:MyLanguage/b2.World:destroyBody|b2.World:destroyBody]] ''<translate>destroys a rigid body</translate>''<br/><!-- GIDEROSMTD:b2.World:destroyBody(body) destroys a rigid body --> [[Special:MyLanguage/b2.World:destroyJoint|b2.World:destroyJoint]] ''<translate>destroys a joint</translate>''<br/><!-- GIDEROSMTD:b2.World:destroyJoint(joint) destroys a joint --> [[Special:MyLanguage/b2.World:getGravity|b2.World:getGravity]] ''<translate>returns the gravity vector</translate>''<br/><!-- GIDEROSMTD:b2.World:getGravity() returns the gravity vector --> [[Special:MyLanguage/b2.World:queryAABB|b2.World:queryAABB]] ''<translate>query the world for all fixtures that potentially overlap the provided AABB</translate>''<br/><!-- GIDEROSMTD:b2.World:queryAABB(minx,miny,maxx,maxy) query the world for all fixtures that potentially overlap the provided AABB --> [[Special:MyLanguage/b2.World:rayCast|b2.World:rayCast]] ''<translate>raycast the world for all fixtures in the path of the ray</translate>''<br/><!-- GIDEROSMTD:b2.World:rayCast(x1,y1,x2,y2,listener,data) raycast the world for all fixtures in the path of the ray --> [[Special:MyLanguage/b2.World:setDebugDraw|b2.World:setDebugDraw]] ''<translate>registers a b2.DebugDraw instance for debug drawing</translate>''<br/><!-- GIDEROSMTD:b2.World:setDebugDraw() registers a b2.DebugDraw instance for debug drawing --> [[Special:MyLanguage/b2.World:setGravity|b2.World:setGravity]] ''<translate>sets the gravity vector</translate>''<br/><!-- GIDEROSMTD:b2.World:setGravity(gravityx,gravityy) sets the gravity vector --> [[Special:MyLanguage/b2.World:step|b2.World:step]] ''<translate>takes a time step</translate>''<br/><!-- GIDEROSMTD:b2.World:step(timeStep,velocityIterations,positionIterations) takes a time step --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === [[Special:MyLanguage/Event.BEGIN_CONTACT|Event.BEGIN_CONTACT]]<br/><!-- GIDEROSEVT:Event.BEGIN_CONTACT beginContact--> [[Special:MyLanguage/Event.BEGIN_CONTACT_PARTICLE|Event.BEGIN_CONTACT_PARTICLE]]<br/><!-- GIDEROSEVT:Event.BEGIN_CONTACT_PARTICLE beginContactParticle--> [[Special:MyLanguage/Event.END_CONTACT|Event.END_CONTACT]]<br/><!-- GIDEROSEVT:Event.END_CONTACT endContact--> [[Special:MyLanguage/Event.POST_SOLVE|Event.POST_SOLVE]]<br/><!-- GIDEROSEVT:Event.POST_SOLVE postSolve--> [[Special:MyLanguage/Event.PRE_SOLVE|Event.PRE_SOLVE]]<br/><!-- GIDEROSEVT:Event.PRE_SOLVE preSolve--> === <translate>Constants</translate> === |} 74eez53z7cfgqjghzii8alnhhmy7slz B2.World.new 0 1019 10820 8738 2018-09-03T09:00:03Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.World|b2.World]]<br/> === <translate>Description</translate> === <translate><br /> Creates a new [[Special:MyLanguage/b2.World|b2.World]] object. You can create more then one [[Special:MyLanguage/b2.World|b2.World]] object to manage independent worlds.<br /> <br /></translate> <source lang="lua"> (any), (any) = b2.World.new(gravityx,gravityy,doSleep) </source> === <translate>Parameters</translate> === '''gravityx''': (number) <translate>the x component the gravity</translate> <br/> '''gravityy''': (number) <translate>the y component the gravity</translate> <br/> '''doSleep''': (boolean, default = true) <translate>improve performance by not simulating inactive bodies</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (any) <translate>A new [[Special:MyLanguage/b2.World|b2.World]] object.</translate><br/> '''<translate>Returns</translate>''' (any) <translate>A new [[Special:MyLanguage/b2.World|b2.World]] object.</translate><br/> szdj3sec5ixjcc5ydlbt17jvrb80xvh B2.World:clearForces 0 376 9819 8544 2018-09-03T08:57:42Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.World|b2.World]]<br/> === <translate>Description</translate> === <translate><br /> Call this after you are done with time steps to clear the forces. You normally call this after each call to [[Special:MyLanguage/b2.World:step|b2.World:step]],<br /> unless you are performing sub-steps. By default, forces will be automatically cleared, so you don&#039;t need to call this function.<br /> <br /></translate> <source lang="lua"> b2.World:clearForces() </source> rm4jnhlnpi63jkvqtjq0373ccsh1ny7 B2.World:createBody 0 650 12778 12753 2018-10-05T18:43:31Z PaulR 6 /* Parameters */ wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.World|b2.World]]<br/> === <translate>Description</translate> === <translate> Creates a rigid body given a definition. The body definition is given as an ordinary table. The fields of the body definition table are:<br /> <br /> '''type''': (number) The body type: [[Special:MyLanguage/b2.STATIC_BODY|b2.STATIC_BODY]], [[Special:MyLanguage/b2.KINEMATIC_BODY|b2.KINEMATIC_BODY]], or [[Special:MyLanguage/b2.DYNAMIC_BODY|b2.DYNAMIC_BODY]]. Note: if a dynamic body would have zero mass, the mass is set to one.<br /> '''position''': (table) The world position of the body (see the example below to understand how this table is set). Avoid creating bodies at the origin since this can lead to many overlapping shapes.<br /> '''angle''': (number) The world angle of the body in radians.<br /> '''linearVelocity''': (table) The linear velocity of the body&#039;s origin in world co-ordinates (see the example below to understand how this table is set).<br /> '''angularVelocity''': (number) The angular velocity of the body.<br /> '''linearDamping''': (number) Linear damping is use to reduce the linear velocity. The damping parameter can be larger than 1.0 but the damping effect becomes sensitive to the time step when the damping parameter is large.<br /> '''angularDamping''': (number) Angular damping is use to reduce the angular velocity. The damping parameter can be larger than 1.0 but the damping effect becomes sensitive to the time step when the damping parameter is large.<br /> '''allowSleep''': (boolean) Set this flag to false if this body should never fall asleep. Note that this increases CPU usage.<br /> '''awake''': (boolean) Is this body initially awake or sleeping?<br /> '''fixedRotation''': (boolean) Should this body be prevented from rotating? Useful for characters.<br /> '''bullet''': (boolean) Is this a fast moving body that should be prevented from tunneling through other moving bodies? Note that all bodies are prevented from tunneling through kinematic and static bodies. This setting is only considered on dynamic bodies. '''Warning:''' You should use this flag sparingly since it increases processing time.<br /> '''active''': (boolean) Does this body start out active?<br /> '''gravityScale''': (number) Scale the gravity applied to this body.<br /> <br /> The unset fields gets default values.<br /> <br /> '''Warning:''' This function is locked during callbacks.<br /> <br /></translate> <source lang="lua"> (b2.Body) = b2.World:createBody(bodyDef) </source> <br /> === <translate>Parameters</translate> === '''bodyDef''': (table) <translate></translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (b2.Body) <translate>created body.</translate><br/> <br /> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">local body = world:createBody{ type = b2.STATIC_BODY, position = {x=0, y=0.5}, angle = math.pi/4, linearVelocity = {x=0.1, y=0.2}, }</source> 2qrhv78jtxt3d8gbi1r448dz33zmtk3 B2.World:createJoint 0 1033 12744 10836 2018-10-05T12:54:13Z PaulR 6 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.World|b2.World]]<br/> === <translate>Description</translate> === <translate> Creates a joint given a definition. All 10 types of joints is created by using this function:<br /> <br /> ===Revolute Joint=== Revolute joint definition. This requires defining an anchor point where the bodies are joined. The definition uses<br /> local anchor points so that the initial configuration can violate the constraint slightly. You also need to specify the<br /> initial relative angle for joint limits. This helps when saving and loading a game. The local anchor points are measured from<br /> the body&#039;s origin rather than the center of mass because:<br /> <br /> 1. you might not know where the center of mass will be.<br /> 2. if you add/remove shapes from a body<br /> <br /> and recompute the mass, the joints will be broken.<br /> <br /> '''type''': (number) b2.REVOLUTE_JOINT<br /> '''bodyA''': (b2.Body) The first attached body.<br /> '''bodyB''': (b2.Body) The second attached body.<br /> '''collideConnected''': (boolean) Set this flag to true if the attached bodies should collide.<br /> '''localAnchorA''': (table) The local anchor point relative to bodyA&#039;s origin.<br /> '''localAnchorB''': (table) The local anchor point relative to bodyB&#039;s origin.<br /> '''referenceAngle''': (number) The bodyB angle minus bodyA angle in the reference state (radians).<br /> '''enableLimit''': (boolean) A flag to enable joint limits.<br /> '''lowerAngle''': (number) The lower angle for the joint limit (radians).<br /> '''upperAngle''': (number) The upper angle for the joint limit (radians).<br /> '''enableMotor''': (boolean) A flag to enable the joint motor.<br /> '''motorSpeed''': (number) The desired motor speed. Usually in radians per second.<br /> '''maxMotorTorque''': (number) The maximum motor torque used to achieve the desired motor speed. Usually in N-m.<br /> <br /> Also, you can use [[b2.createRevoluteJointDef]] function to create a revolute joint definiton table easier.<br /> <br /> ===Prismatic Joint=== Prismatic joint definition. This requires defining a line of motion using an axis and an anchor point. The definition uses<br /> local anchor points and a local axis so that the initial configuration can violate the constraint slightly. The joint translation is<br /> zero when the local anchor points coincide in world space. Using local anchors and a local axis helps when saving and loading a game.<br /> <br /> '''type''': (number) b2.PRISMATIC_JOINT<br /> '''bodyA''': (b2.Body) The first attached body.<br /> '''bodyB''': (b2.Body) The second attached body.<br /> '''collideConnected''': (boolean) Set this flag to true if the attached bodies should collide.<br /> '''localAnchorA''': (table) The local anchor point relative to bodyA&#039;s origin.<br /> '''localAnchorB''': (table) The local anchor point relative to bodyB&#039;s origin.<br /> '''localAxisA''': (table) The local translation axis in bodyA.<br /> '''referenceAngle''': (number) The body2 angle minus body1 angle in the reference state (radians).<br /> '''enableLimit''': (boolean) A flag to enable joint limits.<br /> '''lowerTranslation''': (number) The lower translation limit, usually in meters.<br /> '''upperTranslation''': (number) The upper translation limit, usually in meters.<br /> '''enableMotor''': (boolean) A flag to enable the joint motor.<br /> '''maxMotorForce''': (number) The maximum motor torque, usually in N-m.<br /> '''motorSpeed''': (number) The desired motor speed in radians per second.<br /> <br /> Also, you can use [[b2.createPrismaticJointDef]] function to create a prismatic joint definiton table easier.<br /> <br /> ===Distance Joint=== Distance joint definition. This requires defining an anchor point on both bodies and the non-zero length of the distance joint.<br /> The definition uses local anchor points so that the initial configuration can violate the constraint slightly.<br /> This helps when saving and loading a game.<br /> <br /> '''type''': (number) b2.DISTANCE_JOINT<br /> '''bodyA''': (b2.Body) The first attached body.<br /> '''bodyB''': (b2.Body) The second attached body.<br /> '''collideConnected''': (boolean) Set this flag to true if the attached bodies should collide.<br /> '''localAnchorA''': (table) The local anchor point relative to bodyA&#039;s origin.<br /> '''localAnchorB''': (table) The local anchor point relative to bodyB&#039;s origin.<br /> '''length''': (number) The natural length between the anchor points. Do not use a zero or short length.<br /> '''frequencyHz''': (number) The mass-spring-damper frequency in Hertz.<br /> '''dampingRatio''': (number) The damping ratio. 0 = no damping, 1 = critical damping.<br /> <br /> Also, you can use [[b2.createDistanceJointDef]] function to create a distance joint definiton table easier.<br /> <br /> ===Pulley Joint=== Pulley joint definition. This requires two ground anchors, two dynamic body anchor points, max lengths for each side, and a pulley ratio.<br /> <br /> '''type''': (number) b2.PULLEY_JOINT<br /> '''bodyA''': (b2.Body) The first attached body.<br /> '''bodyB''': (b2.Body) The second attached body.<br /> '''collideConnected''': (boolean) Set this flag to true if the attached bodies should collide.<br /> '''groundAnchorA''': (table) The first ground anchor in world coordinates. This point never moves.<br /> '''groundAnchorB''': (table) The second ground anchor in world coordinates. This point never moves.<br /> '''localAnchorA''': (table) The local anchor point relative to bodyA&#039;s origin.<br /> '''localAnchorB''': (table) The local anchor point relative to bodyB&#039;s origin.<br /> '''lengthA''': (number) The a reference length for the segment attached to bodyA.<br /> '''lengthB''': (number) The a reference length for the segment attached to bodyB.<br /> '''ratio''': (number) The pulley ratio, used to simulate a block-and-tackle.<br /> <br /> Also, you can use [[b2.createPulleyJointDef]] function to create a pulley joint definiton table easier.<br /> <br /> ===Mouse Joint=== Mouse joint definition. This requires a world target point, tuning parameters, and the time step.<br /> <br /> '''type''': (number) b2.MOUSE_JOINT<br /> '''bodyA''': (b2.Body) The first attached body.<br /> '''bodyB''': (b2.Body) The second attached body.<br /> '''collideConnected''': (boolean) Set this flag to true if the attached bodies should collide.<br /> '''target''': (table) The initial world target point. This is assumed to coincide with the body anchor initially.<br /> '''maxForce''': (number) The maximum constraint force that can be exerted to move the candidate body. Usually you will express as some multiple of the weight (multiplier * mass * gravity).<br /> '''frequencyHz''': (number) The response speed.<br /> '''dampingRatio''': (number) The damping ratio. 0 = no damping, 1 = critical damping.<br /> <br /> Also, you can use [[b2.createMouseJointDef]] function to create a mouse joint definiton table easier.<br /> <br /> ===Gear Joint=== Gear joint definition. This definition requires two existing revolute or prismatic joints (any combination will work). The provided joints<br /> must attach a dynamic body to a static body.<br /> <br /> '''type''': (number) b2.GEAR_JOINT<br /> '''bodyA''': (b2.Body) The first attached body.<br /> '''bodyB''': (b2.Body) The second attached body.<br /> '''collideConnected''': (boolean) Set this flag to true if the attached bodies should collide.<br /> '''joint1''': (b2.Joint) The first revolute/prismatic joint attached to the gear joint.<br /> '''joint2''': (b2.Joint) The second revolute/prismatic joint attached to the gear joint.<br /> '''ratio''': (number) The gear ratio.<br /> <br /> Also, you can use [[b2.createGearJointDef]] function to create a gear joint definiton table easier.<br /> <br /> ===Wheel Joint=== Wheel joint definition. This requires defining a line of motion using an axis and an anchor point. <br /> The definition uses local anchor points and a local axis so that the initial configuration can violate <br /> the constraint slightly. The joint translation is zero when the local anchor points coincide in world space. <br /> Using local anchors and a local axis helps when saving and loading a game.<br /> <br /> '''type''': (number) b2.WHEEL_JOINT<br /> '''bodyA''': (b2.Body) The first attached body.<br /> '''bodyB''': (b2.Body) The second attached body.<br /> '''collideConnected''': (boolean) Set this flag to true if the attached bodies should collide.<br /> '''localAnchorA''': (table) The local anchor point relative to bodyA&#039;s origin.<br /> '''localAnchorB''': (table) The local anchor point relative to bodyB&#039;s origin.<br /> '''localAxisA''': (table) The local translation axis in bodyA.<br /> '''enableMotor''': (boolean) A flag to enable the joint motor.<br /> '''maxMotorTorque''': (number) The maximum motor torque, usually in N-m.<br /> '''motorSpeed''': (number) The desired motor speed in radians per second.<br /> '''frequencyHz''': (number) Suspension frequency, zero indicates no suspension.<br /> '''dampingRatio''': (number) Suspension damping ratio, one indicates critical damping.<br /> <br /> Also, you can use [[b2.createWheelJointDef]] function to create a wheel joint definiton table easier.<br /> <br /> ===Weld Joint=== Weld joint definition. You need to specify local anchor points where they are attached and the relative<br /> body angle. The position of the anchor points is important for computing the reaction torque.<br /> <br /> '''type''': (number) b2.WELD_JOINT<br /> '''bodyA''': (b2.Body) The first attached body.<br /> '''bodyB''': (b2.Body) The second attached body.<br /> '''collideConnected''': (boolean) Set this flag to true if the attached bodies should collide.<br /> '''localAnchorA''': (table) The local anchor point relative to bodyA&#039;s origin.<br /> '''localAnchorB''': (table) The local anchor point relative to bodyB&#039;s origin.<br /> '''referenceAngle''': (number) The bodyB angle minus bodyA angle in the reference state (radians).<br /> <br /> Also, you can use [[b2.createWeldJointDef]] function to create a weld joint definiton table easier.<br /> <br /> ===Friction Joint=== Friction joint definition.<br /> <br /> '''type''': (number) b2.LINE_JOINT<br /> '''bodyA''': (b2.Body) The first attached body.<br /> '''bodyB''': (b2.Body) The second attached body.<br /> '''collideConnected''': (boolean) Set this flag to true if the attached bodies should collide.<br /> '''localAnchorA''': (table) The local anchor point relative to bodyA&#039;s origin.<br /> '''localAnchorB''': (table) The local anchor point relative to bodyB&#039;s origin.<br /> '''maxForce''': (number) The maximum friction force in N.<br /> '''maxTorque''': (number) The maximum friction torque in N-m.<br /> <br /> ===Rope Joint=== Rope joint definition. This requires two body anchor points and a maximum length.<br /> <br /> '''type''': (number) b2.ROPE_JOINT<br /> '''bodyA''': (b2.Body) The first attached body.<br /> '''bodyB''': (b2.Body) The second attached body.<br /> '''collideConnected''': (boolean) Set this flag to true if the attached bodies should collide.<br /> '''localAnchorA''': (table) The local anchor point relative to bodyA&#039;s origin.<br /> '''localAnchorB''': (table) The local anchor point relative to bodyB&#039;s origin.<br /> '''maxLength''': (number) The maximum length of the rope.<br /> <br /> Also, you can use [[b2.createRopeJointDef]] function to create a rope joint definiton table easier.<br /> <br /></translate> <source lang="lua"> (b2.Joint) = b2.World:createJoint(jointDef) </source> === <translate>Parameters</translate> === '''jointDef''': (table) <translate></translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (b2.Joint) <translate>created joint</translate><br/> ez4ey8wkh1yr00ei4uqrv09r86syaki B2.World:createParticleSystem 0 900 10382 8390 2018-09-03T08:58:59Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2015.06.30<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.World|b2.World]]<br/> === <translate>Description</translate> === <translate>Creats new particle system, which will use Liquid fun. Parameters that you can provide in table: "pressureStrength", "dampingStrength", "elaticStrength", "springStrength", "viscousStrength", "surfaceTensionPressureStrength", "surfaceTensionNormalStrength", "repulsiveStrength", "powderStrength", "ejectionStrength", "staticPressureStrength", "staticPressureRelaxation", "colorMixingStrength", "lifetimeGranularity", "radius", "staticPressureIterations", "destroyByAge"</translate> <source lang="lua"> (b2.ParticleSystem) = b2.World:createParticleSystem(particleSysDef) </source> === <translate>Parameters</translate> === '''particleSysDef''': (table) <translate>parameters that define particle system</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (b2.ParticleSystem) <translate>new particle system</translate><br/> sj66ojns6l7ke98suiqtx2emqq9oo3k B2.World:destroyBody 0 598 12746 10117 2018-10-05T13:02:57Z PaulR 6 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.World|b2.World]]<br/> === <translate>Description</translate> === <translate> Destroys a rigid body. This function is locked during callbacks.<br /> <br /> '''Warning:'''<br /> - This automatically deletes all associated shapes and joints.<br /> - This function is locked during callbacks.<br /> <br /></translate> <source lang="lua"> b2.World:destroyBody(body) </source> === <translate>Parameters</translate> === '''body''': (b2.Body) <translate>body to be destroyed</translate> <br/> f33so68cw7o310pftovmgeoprxvr9a3 B2.World:destroyJoint 0 377 12747 9816 2018-10-05T13:04:01Z PaulR 6 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.World|b2.World]]<br/> === <translate>Description</translate> === <translate> Destroy a joint. This may cause the connected bodies to begin colliding. <br /> <br /> '''Warning:''' This function is locked during callbacks.<br /> <br /></translate> <source lang="lua"> b2.World:destroyJoint(joint) </source> <br /> === <translate>Parameters</translate> === '''joint''': (b2.Joint) <translate>joint to be destroyed</translate> <br/> abnbafdc87vt18dc2zn7mbmdw8wvyu6 B2.World:getGravity 0 839 10705 7968 2018-09-03T08:59:49Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.World|b2.World]]<br/> === <translate>Description</translate> === <translate><br /> Returns the gravity vector.<br /> <br /></translate> <source lang="lua"> (number), (number) = b2.World:getGravity() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>x component of gravity vector.</translate><br/> '''<translate>Returns</translate>''' (number) <translate>y component of gravity vector.</translate><br/> 9q2l99qr36vqj62k0gq6ctav9141g17 B2.World:queryAABB 0 162 9549 7208 2018-09-03T08:57:13Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.World|b2.World]]<br/> === <translate>Description</translate> === <translate><br /> Query the world for all fixtures that potentially overlap the provided AABB.<br /> <br /></translate> <source lang="lua"> (table) = b2.World:queryAABB(minx,miny,maxx,maxy) </source> === <translate>Parameters</translate> === '''minx''': (number) <translate>the minimal x coordinate of the query box</translate> <br/> '''miny''': (number) <translate>the minimal y coordinate of the query box</translate> <br/> '''maxx''': (number) <translate>the maximal x coordinate of the query box</translate> <br/> '''maxy''': (number) <translate>the maximal y coordinate of the query box</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>Indexed array of fixtures that potentially overlaps the provided AABB</translate><br/> === <translate>Examples</translate> === '''Query specific area for bodies'''<br/> <source lang="lua">--get all fixtures in this area local fixtures = world:queryAABB(0, 0, 100, 10) --check if there are any fixture if #fixtures > 0 then for i = 1, #fixtures do --getting body of fixture local body = fixtures[i]:getBody() end end</source> mite1u4suwty8xa1vva4fsvocvt9389 B2.World:rayCast 0 854 12748 10351 2018-10-05T13:06:55Z PaulR 6 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.World|b2.World]]<br/> === <translate>Description</translate> === <translate><br /> Ray-cast the world for all fixtures in the path of the ray. Your callback controls whether you get the closest point, any point, or n-points. The ray-cast ignores shapes that contain the starting point. <br /> <br /> Listener function is called for each fixture found in the query and accepts 6 parameters (7 if data parameter is provided):<br /> <br /> 1. the fixture hit by the ray<br /> 2. the x coordinate of the point of initial intersection <br /> 3. the y coordinate of the point of initial intersection<br /> 4. the x coordinate of the normal vector at the point of intersection <br /> 5. the y coordinate of the normal vector at the point of intersection <br /> 6. fraction<br /> <br /> You control how the ray cast proceeds by returning a number:<br /> <br /> - return no value or -1: ignore this fixture and continue<br /> - return 0: terminate the ray cast<br /> - return fraction: clip the ray to this point<br /> - return 1: don&#039;t clip the ray and continue<br /> <br /></translate> <source lang="lua"> b2.World:rayCast(x1,y1,x2,y2,listener,data) </source> <br /> === <translate>Parameters</translate> === '''x1''': (number) <translate>the x coordinate of the ray starting point</translate> <br/> '''y1''': (number) <translate>the y coordinate of the ray starting point</translate> <br/> '''x2''': (number) <translate>the x coordinate of the ray ending point</translate> <br/> '''y2''': (number) <translate>the y coordinate of the ray ending point</translate> <br/> '''listener''': (function) <translate>the listener function that processes the results</translate> <br/> '''data''': (any) <translate>an optional data parameter that is passed as a first argument to the listener function</translate> '''optional'''<br/> <br /> === <translate>Examples</translate> === '''Detecting bodies with raycasting'''<br/> <source lang="lua">local raycastCallback function(fixture, hitX, hitY, vectX, vectY, fration) --so if this function is called, it means we hit some kind of object --and it's fixture is stored in first variable we named "fixture" --so we can for example get body local body = fixture:getBody() end --now we add callback function for projected raycast above body --Parameters: --object x coordinate --object y coordinate --projection vector on x axis --projection vector on y axis --callback function local x, y = body:getPosition() world:rayCast(x, y, x, y-100, raycastCallback)</source> kzo9tdmv8lul1pfmb6pgnbswigsqdp5 B2.World:setDebugDraw 0 428 9876 7520 2018-09-03T08:57:47Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.World|b2.World]]<br/> === <translate>Description</translate> === <translate><br /> Registers a b2.DebugDraw instance for debug drawing.<br /> <br /></translate> <source lang="lua"> b2.World:setDebugDraw() </source> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">local debugDraw = b2.DebugDraw.new() world:setDebugDraw(debugDraw) stage:addChild(debugDraw)</source> 8aj3yvzsbw2xxkdz7bawos3nr2e7i6q B2.World:setGravity 0 990 10433 8077 2018-09-03T08:59:12Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.World|b2.World]]<br/> === <translate>Description</translate> === <translate><br /> Sets the gravity vector.<br /> <br /></translate> <source lang="lua"> b2.World:setGravity(gravityx,gravityy) </source> === <translate>Parameters</translate> === '''gravityx''': (number) <translate>the x component the gravity</translate> <br/> '''gravityy''': (number) <translate>the y component the gravity</translate> <br/> 2sxx9etncg52zh6obmp78w1r1caln6t B2.World:step 0 971 12749 10427 2018-10-05T13:08:16Z PaulR 6 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2.World|b2.World]]<br/> === <translate>Description</translate> === <translate> Take a time step. This performs collision detection, integration, and constraint solution.<br /> <br /></translate> <source lang="lua"> b2.World:step(timeStep,velocityIterations,positionIterations) </source> <br/> === <translate>Parameters</translate> === '''timeStep''': (number) <translate>the amount of time to simulate, this should not vary</translate> <br/> '''velocityIterations''': (number) <translate>for the velocity constraint solver</translate> <br/> '''positionIterations''': (number) <translate>for the position constraint solver</translate> <br/> <br/> === <translate>Examples</translate> === '''Creating Box2d body and moving Bitmap along the body'''<br/> <source lang="lua">require "box2d" local world = b2.World.new(0, 10, true) --create ball bitmap object from ball graphic local ball = Bitmap.new(Texture.new("ball.png")) --reference center of the ball for positioning ball:setAnchorPoint(0.5,0.5) ball:setPosition(100,100) --get radius local radius = ball:getWidth()/2 --create box2d physical object local body = world:createBody{type = b2.DYNAMIC_BODY} local circle = b2.CircleShape.new(0, 0, radius) local fixture = body:createFixture{shape = circle, density = 1.0, friction = 0.1, restitution = 0.2} ball.body = body --add to scene stage:addChild(ball) stage:addEventListener(Event.ENTER_FRAME, function() -- edit the step values if required. These are good defaults! world:step(1/60, 8, 3) ball:setPosition(ball.body:getPosition()) ball:setRotation(math.rad(ball.body:getAngle())) end)</source> cn3fro2gz4jtzwcmpuw22nggrywcp5z B2.WorldManifold 0 52 11663 10849 2018-09-13T14:33:06Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:b2.WorldManifold --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2012.09.6<br/> === <translate>Description</translate> === <translate>Contains information about contact relative to the world</translate> === <translate>Examples</translate> === '''Checking collisions from bottom using b2.Contact'''<br/> <source lang="lua">local isTouchingGround = false world:addEventListener(Event.BEGIN_CONTACT, function(e) local manifold = e.contact:getWorldManifold() if manifold.normal.y > 0.9 then --collision came from bottom isTouchingGround = true end end) world:addEventListener(Event.END_CONTACT, function(e) local manifold = e.contact:getWorldManifold() if manifold.normal.y < 0.1 then --collision ended from bottom isTouchingGround = false end end)</source> '''Example content of b2.WorldManifold'''<br/> <source lang="lua">[normal] => Table { { [y] => -1 [x] => 0 } [points] => Table { { [1] => Table { { [y] => 319.92502212524 [x] => 99.999997615814 } }</source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === [[Special:MyLanguage/normal|normal]]<br/><!-- GIDEROSCST:normal table--> [[Special:MyLanguage/points|points]]<br/><!-- GIDEROSCST:points table--> |} a22pz67izrv7mldlf2wgqgt9f1c8jfv B2.createDistanceJointDef 0 346 9780 7430 2018-09-03T08:57:38Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate><br /> Creates and returns a distance joint definition table with the bodies, anchors, and length using the world anchors.<br /> (Please refer to [[b2.World:createJoint]] function for more information about all the information needed to create a distance joint).<br /> <br /></translate> <source lang="lua"> (table) = b2.createDistanceJointDef(bodyA,bodyB,anchorAx,anchorAy,anchorBx,anchorBy) </source> === <translate>Parameters</translate> === '''bodyA''': (b2.Body) <translate>the first attached body</translate> <br/> '''bodyB''': (b2.Body) <translate>the second attached body</translate> <br/> '''anchorAx''': (number) <translate>the x coordinate of the world anchor point of bodyA</translate> <br/> '''anchorAy''': (number) <translate>the y coordinate of the world anchor point of bodyA</translate> <br/> '''anchorBx''': (number) <translate>the x coordinate of the world anchor point of bodyB</translate> <br/> '''anchorBy''': (number) <translate>the y coordinate of the world anchor point of bodyB</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>A new distance joint definition table</translate><br/> === <translate>Examples</translate> === '''Distance joint'''<br/> <source lang="lua">local jointDef = b2.createDistanceJointDef(body1, body2, 100, 100, 200, 100) local distanceJoint = world:createJoint(jointDef) --by default length between two bodies is the length they have between them when joint was created --but it is possilbe to change it using distanceJoint:setLength(200) distanceJoint:setDampingRatio(0.5) distanceJoint:setFrequency(4)</source> gxkvhotokufl4oxa5ub2ds81ozhlpwr B2.createFrictionJointDef 0 351 9794 7439 2018-09-03T08:57:39Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate><br /> Creates and returns a friction joint definition table with the bodies and local anchors using a world anchor point.<br /> (Please refer to [[b2.World:createJoint]] function for more information about all the information needed to create a friction joint).<br /> <br /></translate> <source lang="lua"> (table) = b2.createFrictionJointDef(bodyA,bodyB,anchorx,anchory) </source> === <translate>Parameters</translate> === '''bodyA''': (b2.Body) <translate>the first attached body</translate> <br/> '''bodyB''': (b2.Body) <translate>the second attached body</translate> <br/> '''anchorx''': (number) <translate>the x coordinate of the world anchor point</translate> <br/> '''anchory''': (number) <translate>the y coordinate of the world anchor point</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>A new friction joint definition table</translate><br/> === <translate>Examples</translate> === '''Friction joint'''<br/> <source lang="lua">--create empty box2d body for joint local ground = world:createBody({}) ground:setPosition(350, 480) --create friction joint local jointDef = b2.createFrictionJointDef(body, ground, 350, 200) local frictionJoint = world:createJoint(jointDef) --set maximum friction force to slow down the ball frictionJoint:setMaxForce(100)</source> 4wg24ymetbbkx84pqrdrssfdeanvtxk B2.createGearJointDef 0 552 10053 7695 2018-09-03T08:58:06Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate><br /> Creates and returns a gear joint definition table.<br /> (Please refer to [[b2.World:createJoint]] function for more information about all the information needed to create a gear joint).<br /> <br /></translate> <source lang="lua"> (table) = b2.createGearJointDef(bodyA,bodyB,joint1,joint2,ratio) </source> === <translate>Parameters</translate> === '''bodyA''': (b2.Body) <translate>the first attached body</translate> <br/> '''bodyB''': (b2.Body) <translate>the second attached body</translate> <br/> '''joint1''': (b2.Joint) <translate>the first revolute/prismatic joint attached to the gear joint</translate> <br/> '''joint2''': (b2.Joint) <translate>the second revolute/prismatic joint attached to the gear joint</translate> <br/> '''ratio''': (number, default = 1) <translate>the gear ratio</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>A new gear joint definition table</translate><br/> === <translate>Examples</translate> === '''Gear joint combining revolute and prismatic joints'''<br/> <source lang="lua">--create empty box2d body for joint local ground = world:createBody({}) --create revolute joint --note that ground should be passed as first parameter here local jointDef = b2.createRevoluteJointDef(ground, body1, 300, 300) local revoluteJoint = world:createJoint(jointDef) --set motor revoluteJoint:setMaxMotorTorque(1) revoluteJoint:enableMotor(true) --axisx, axisy values usually between 0 and 1 --note that ground should be passed as first parameter here local jointDef = b2.createPrismaticJointDef(ground, body2, 350, 100, 0.3, 1) local prismaticJoint = world:createJoint(jointDef) --set motor prismaticJoint:setMaxMotorForce(1) prismaticJoint:enableMotor(true) --create gear joint using two already created joints local jointDef = b2.createGearJointDef(body1, body2, revoluteJoint, prismaticJoint, 1) local gearJoint = world:createJoint(jointDef)</source> 7whe21mlevf46fklxa5n93npdvg8j55 B2.createMouseJointDef 0 896 10740 8010 2018-09-03T08:59:53Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate><br /> Creates and returns a mouse joint definition table with the bodies, world target point, maxForce and optional frequencyHz and dampingRatio.<br /> (Please refer to [[b2.World:createJoint]] function for more information about all the information needed to create a mouse joint).<br /> <br /></translate> <source lang="lua"> (table) = b2.createMouseJointDef(bodyA,bodyB,targetx,targety,maxForce,frequencyHz,dampingRatio) </source> === <translate>Parameters</translate> === '''bodyA''': (b2.Body) <translate>the first attached body</translate> <br/> '''bodyB''': (b2.Body) <translate>the second attached body</translate> <br/> '''targetx''': (number) <translate>the x coordinate of the world target point</translate> <br/> '''targety''': (number) <translate>the y coordinate of the world target point</translate> <br/> '''maxForce''': (number) <translate>the maximum constraint force that can be exerted to move the candidate body</translate> <br/> '''frequencyHz''': (number, default = 5) <translate>the response speed</translate> <br/> '''dampingRatio''': (number, default = 0.7) <translate>the damping ratio. 0 = no damping, 1 = critical damping</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>A new mouse joint definition table</translate><br/> === <translate>Examples</translate> === '''Mouse joint'''<br/> <source lang="lua">--create empty box2d body for joint local ground = world:createBody({}) --joint with dummy body local mouseJoint = nil -- create a mouse joint on mouse down function self:onMouseDown(event) local jointDef = b2.createMouseJointDef(ground, body, event.x, event.y, 100000) mouseJoint = world:createJoint(jointDef) end -- update the target of mouse joint on mouse move function self:onMouseMove(event) if mouseJoint ~= nil then mouseJoint:setTarget(event.x, event.y) end end -- destroy the mouse joint on mouse up function self:onMouseUp(event) if mouseJoint ~= nil then world:destroyJoint(mouseJoint) mouseJoint = nil end end</source> 8jcnykrln4bek0oalqbo0y9pgx8w4r5 B2.createPrismaticJointDef 0 437 9902 7537 2018-09-03T08:57:50Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate><br /> Creates and returns a prismatic joint definition table with the bodies, anchors, axis, and reference angle using the world anchor and world axis.<br /> (Please refer to [[b2.World:createJoint]] function for more information about all the information needed to create a prismatic joint).<br /> <br /></translate> <source lang="lua"> (table) = b2.createPrismaticJointDef(bodyA,bodyB,anchorx,anchory,axisx,axisy) </source> === <translate>Parameters</translate> === '''bodyA''': (b2.Body) <translate>the first attached body</translate> <br/> '''bodyB''': (b2.Body) <translate>the second attached body</translate> <br/> '''anchorx''': (number) <translate>the x coordinate of the world anchor point</translate> <br/> '''anchory''': (number) <translate>the y coordinate of the world anchor point</translate> <br/> '''axisx''': (number) <translate>the x coordinate of the world axis</translate> <br/> '''axisy''': (number) <translate>the y coordinate of the world axis</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>A new prismatic joint definition table</translate><br/> === <translate>Examples</translate> === '''Prismatic joint'''<br/> <source lang="lua">--create empty box2d body for joint local ground = world:createBody({}) ground:setPosition(465, 480) --axisx, axisy values usually between 0 and 1 --0 0 moves freely --0 1 moves on y axis --1 0 moves on x axis --1 1 moves on diagonal local jointDef = b2.createPrismaticJointDef(body, ground, 350, 100, 0.3, 1) local prismaticJoint = world:createJoint(jointDef)</source> 1t63l5uqiyur1v1a6vihy485z3iar8y B2.createPulleyJointDef 0 479 9961 7606 2018-09-03T08:57:56Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate><br /> Creates and returns a pulley joint definition table with the bodies, anchors, lengths, max lengths, and ratio using the world anchors.<br /> (Please refer to [[b2.World:createJoint]] function for more information about all the information needed to create a pulley joint).<br /> <br /></translate> <source lang="lua"> (table) = b2.createPulleyJointDef(bodyA,bodyB,groundAnchorAx,groundAnchorAy,groundAnchorBx,groundAnchorBy,anchorAx,anchorAy,anchorBx,anchorBy,ratio) </source> === <translate>Parameters</translate> === '''bodyA''': (b2.Body) <translate>the first attached body</translate> <br/> '''bodyB''': (b2.Body) <translate>the second attached body</translate> <br/> '''groundAnchorAx''': (number) <translate>the x coordinate of the first ground anchor in world coordinates. This point never moves.</translate> <br/> '''groundAnchorAy''': (number) <translate>the y coordinate of the first ground anchor in world coordinates. This point never moves.</translate> <br/> '''groundAnchorBx''': (number) <translate>the x coordinate of the second ground anchor in world coordinates. This point never moves.</translate> <br/> '''groundAnchorBy''': (number) <translate>the y coordinate of the second ground anchor in world coordinates. This point never moves.</translate> <br/> '''anchorAx''': (number) <translate>the x coordinate of the world anchor point of bodyA</translate> <br/> '''anchorAy''': (number) <translate>the y coordinate of the world anchor point of bodyA</translate> <br/> '''anchorBx''': (number) <translate>the x coordinate of the world anchor point of bodyB</translate> <br/> '''anchorBy''': (number) <translate>the y coordinate of the world anchor point of bodyB</translate> <br/> '''ratio''': (number) <translate>the pulley ratio, used to simulate a block-and-tackle</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>A new pulley joint definition table</translate><br/> === <translate>Examples</translate> === '''Pulley joint'''<br/> <source lang="lua">--create empty box2d body for joint local ground = world:createBody({}) local jointDef = b2.createPulleyJointDef(body1, body2, 200, 100, --coordinates where "imaginary string" is attached in the air for body 1 350, 100, --coordinates where "imaginary string" is attached in the air for body 2 200, 300, --coordinates where "imaginary string" is attached to the body 1 350, 300, --coordinates where "imaginary string" is attached in the body 2 1) -- ratio (if < 1 -> makes body 2 heavier, > 1 makes body 1 heavier, =1 makes them equal local pulleyJoint = world:createJoint(jointDef)</source> rt9tyystndo0t7dfjtek5kvxhvxupyp B2.createRevoluteJointDef 0 1094 10550 8190 2018-09-03T08:59:34Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate><br /> Creates and returns a revolute joint definition table with the bodies, local anchors, and reference angle using a world anchor point.<br /> (Please refer to [[b2.World:createJoint]] function for more information about all the information needed to create a revolute joint).<br /> <br /></translate> <source lang="lua"> (table) = b2.createRevoluteJointDef(bodyA,bodyB,anchorx,anchory) </source> === <translate>Parameters</translate> === '''bodyA''': (b2.Body) <translate>the first attached body</translate> <br/> '''bodyB''': (b2.Body) <translate>the second attached body</translate> <br/> '''anchorx''': (number) <translate>the x coordinate of the world anchor point</translate> <br/> '''anchory''': (number) <translate>the y coordinate of the world anchor point</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>A new revolute joint definition table</translate><br/> === <translate>Examples</translate> === '''Example'''<br/> <source lang="lua">local jointdef = b2.createRevoluteJointDef(bodyA, bodyB, anchorx, anchory) local joint = b2.World:createJoint(jointdef)</source> '''Revolute joint'''<br/> <source lang="lua">--create empty box2d body for joint local ground = world:createBody({}) ground:setPosition(300, 480) local jointDef = b2.createRevoluteJointDef(body, ground, 300, 300) local revoluteJoint = world:createJoint(jointDef) --will not let ball spin for ever revoluteJoint:setMaxMotorTorque(1) revoluteJoint:enableMotor(true)</source> 17fqg6oswzytimudfpwy4823s68ubka B2.createRopeJointDef 0 207 9605 7255 2018-09-03T08:57:19Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2012.09.3<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate><br /> Creates and returns a rope joint definition table with the bodies and local anchors using a world anchor point.<br /> (Please refer to [[b2.World:createJoint]] function for more information about all the information needed to create a rope joint).<br /> <br /></translate> <source lang="lua"> (table) = b2.createRopeJointDef(bodyA,bodyB,anchorAx,anchorAy,anchorBx,anchorBy,maxLength) </source> === <translate>Parameters</translate> === '''bodyA''': (b2.Body) <translate>the first attached body</translate> <br/> '''bodyB''': (b2.Body) <translate>the second attached body</translate> <br/> '''anchorAx''': (number) <translate>the x coordinate of the world anchor point of bodyA</translate> <br/> '''anchorAy''': (number) <translate>the y coordinate of the world anchor point of bodyA</translate> <br/> '''anchorBx''': (number) <translate>the x coordinate of the world anchor point of bodyB</translate> <br/> '''anchorBy''': (number) <translate>the y coordinate of the world anchor point of bodyB</translate> <br/> '''maxLength''': (number) <translate>the maximum length of the rope</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>A new rope joint definition table</translate><br/> jnypqjls0khmpe4k9f6elmsc219ju4v B2.createWeldJointDef 0 745 10269 7902 2018-09-03T08:58:33Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate><br /> Creates and returns a weld joint definition table with the bodies, anchors, and reference angle using a world anchor point.<br /> (Please refer to [[b2.World:createJoint]] function for more information about all the information needed to create a weld joint).<br /> <br /></translate> <source lang="lua"> (table) = b2.createWeldJointDef(bodyA,bodyB,anchorAx,anchorAy,anchorBx,anchorBy) </source> === <translate>Parameters</translate> === '''bodyA''': (b2.Body) <translate>the first attached body</translate> <br/> '''bodyB''': (b2.Body) <translate>the second attached body</translate> <br/> '''anchorAx''': (number) <translate>the x coordinate of the world anchor point of bodyA</translate> <br/> '''anchorAy''': (number) <translate>the y coordinate of the world anchor point of bodyA</translate> <br/> '''anchorBx''': (number) <translate>the x coordinate of the world anchor point of bodyB</translate> <br/> '''anchorBy''': (number) <translate>the y coordinate of the world anchor point of bodyB</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>A new weld joint definition table</translate><br/> === <translate>Examples</translate> === '''Weld joint'''<br/> <source lang="lua">local jointDef = b2.createWeldJointDef(body1, body2, 100, 100, 130, 100) local weldJoint = world:createJoint(jointDef)</source> 6vhh9t0yzbhyo4lv3smqg3rdr7rh30m B2.createWheelJointDef 0 798 10310 8333 2018-09-03T08:58:43Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate><br /> Creates and returns a wheel joint definition table.<br /> (Please refer to [[b2.World:createJoint]] function for more information about all the information needed to create a wheel joint).<br /> <br /></translate> <source lang="lua"> (table) = b2.createWheelJointDef(bodyA,bodyB,anchorx,anchory,axisx,axisy) </source> === <translate>Parameters</translate> === '''bodyA''': (b2.Body) <translate>the first attached body</translate> <br/> '''bodyB''': (b2.Body) <translate>the second attached body</translate> <br/> '''anchorx''': (number) <translate>the x coordinate of the world anchor point</translate> <br/> '''anchory''': (number) <translate>the y coordinate of the world anchor point</translate> <br/> '''axisx''': (number) <translate>the x coordinate of the world translation axis in bodyA</translate> <br/> '''axisy''': (number) <translate>the y coordinate of the world translation axis in bodyA</translate> <br/> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (table) <translate>A new wheel joint definition table</translate><br/> === <translate>Examples</translate> === '''Wheel joint'''<br/> <source lang="lua">--create empty box2d body for joint local ground = world:createBody({}) ground:setPosition(350, 480) --axisx, axisy values usually between 0 and 1 --0 0 moves freely --0 1 force pulling back on y axis --1 0 force pulling back on x axis --1 1 force pulling back all diretions local jointDef = b2.createWheelJointDef(body, ground, 350, 200, 1, 1) local wheelJoint = world:createJoint(jointDef)</source> hjvau7geuberxd58njfs2ew1jgwljiv B2.getScale 0 238 9642 7291 2018-09-03T08:57:23Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate><br /> Returns the global pixels to meters scale (Please refer to [[b2.setScale]] function for more information about pixels to meters scaling).<br /> <br /></translate> <source lang="lua"> (number) = b2.getScale() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (number) <translate>The global pixels to meters scale</translate><br/> 257bvkw98r8tatvbm5sgnfnzqszhz2c B2.setScale 0 1142 10602 8777 2018-09-03T08:59:39Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2011.6<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/b2|b2]]<br/> === <translate>Description</translate> === <translate><br /> Box2D is tuned for MKS (meters-kilogram-second) units and the size of moving objects should roughly between 0.1 and 10 meters.<br /> If you directly use the pixels as your units, unfortunately this will lead to a poor simulation and possibly weird behavior.<br /> <br /> Gideros uses an internal scale system to convert between meters and pixels. By default, the value of this scale is 30<br /> which means 1 meter = 30 pixels. This is a global value and effects all the physics system. Therefore, it is recommended to set this<br /> value once before any physical objects are instantiated (e.g. right after calling ''require &quot;box2d&quot;'')<br /> <br /></translate> <source lang="lua"> b2.setScale(scale) </source> === <translate>Parameters</translate> === '''scale''': (number) <translate>- the global pixels to meters scale</translate> <br/> p2hg0vz6g1thc9jx98lv8cguguft31a Lpeg 0 28 14837 9663 2019-12-08T14:01:05Z MoKaLux 19 formatting wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:lpeg --> '''<translate>Supported platforms</translate>:''' [[File:Platform mac.png]][[File:Platform pc.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2012.8<br/> === <translate>Description</translate> === LPeg is a pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs). For more information and detailed documentation, please visit http://www.inf.puc-rio.br/~roberto/lpeg/ {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} cyj2qmsd1b3y8osndzzas4tqg2tia2u Media 0 2627 14859 14857 2019-12-08T19:29:24Z MoKaLux 19 first attempt at creating methods for media plugin wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Media --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2016.1<br/> === <translate>Description</translate> === * Get image from Camera, gallery or file system * Resize image * Make copy of an image * Take screenshots * Play videos (for cutscenes) * Manipulate pictures (getting/setting pixels) * And much more... === <translate>Examples</translate> === '''Example 1.''' <source lang="lua"> --require plugin require "media" -- is camera available print(mediamanager:isCameraAvailable()) -- take screenshot (no permission needed) mediamanager:takeScreenshot() -- get picture from gallery (*need read permission*) mediamanager:getPicture() -- save picture to sdcard/pictures folder (*need write permission*) mediamanager:postPicture("gfx/ball.png") </source> '''Example 2.''' <source lang="lua"> require "media" mediamanager:addEventListener(Event.MEDIA_RECEIVE, function(e) local media = Media.new(e.path) media:resize(200, 200) print(media:getPixel(1, 1)) for x = 50, 100 do for y = 50, 100 do media:setPixel(x, y, 255, 0, 0, 0.5) end end media:save() local bmp = Bitmap.new(Texture.new(e.path, true)) stage:addChild(bmp) end) if mediamanager:isCameraAvailable() then mediamanager:takePicture() else mediamanager:getPicture() end </source> '''Example 3.''' Save a picture on your phone or on your pc. <source lang="lua"> require "media" -- draw your gfx local source = Pixel.new(0xff00ff, 1, 128, 128) -- create a render target and draw to it local rt = RenderTarget.new(source:getWidth(), source:getHeight()) rt:draw(source) -- save your render target to gideros documents folder local myfilepath = "|D|mysavedpicture2.png" rt:save(myfilepath) -- create a new media and save your gfx local media = Media.new(myfilepath) -- android saved path = internal storage/pictures !!! NEED permission write external storage !!! mediamanager:postPicture(myfilepath) -- show your gfx on stage local mybmprt = Bitmap.new(Texture.new(myfilepath)) mybmprt:setPosition(64, 64) stage:addChild(mybmprt) </source> === <translate>Notes</translate> === By resizing image you will actually resize the file of the image, so there is no going back to upscale it later. <br/> getPicture method gives you copies of the image, so you won't harm the original. <br/> The dimensions when resizing are all actual dimensions of the image and not logical dimensions in your project. {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === <!--'''mediamanager:deleteFile(path)''' -- deletes file at provided path<br/> --> [[Special:MyLanguage/mediamanager:deleteFile|mediamanager:deleteFile(path)]] ''<translate>deletes file at provided path</translate>''<br/><!-- GIDEROSMTD:mediamanager:deleteFile(path) deletes file at provided path --> <!--'''mediamanager:getPicture()''' -- allow user to select picture from gallery<br/> --> [[Special:MyLanguage/mediamanager:getPicture|mediamanager:getPicture]] ''<translate>allow user to select picture from gallery</translate>''<br/><!-- GIDEROSMTD:mediamanager:getPicture() allow user to select picture from gallery --> <!--'''mediamanager:isCameraAvailable()''' -- returns true if you can get picture from camera<br/> --> [[Special:MyLanguage/mediamanager:isCameraAvailable|mediamanager:isCameraAvailable]] ''<translate>returns true if you can get picture from camera</translate>''<br/><!-- GIDEROSMTD:mediamanager:isCameraAvailable() returns true if you can get picture from camera --> <!--'''mediamanager:playVideo(path, force)''' -- play video file in given path (bool force to watch till the end, or quit playing on tap)<br/>--> [[Special:MyLanguage/mediamanager:playVideo|mediamanager:playVideo(path, force)]] ''<translate>play video file in given path (bool force to watch till the end, or quit playing on tap)</translate>''<br/><!-- GIDEROSMTD:mediamanager:playVideo(path, force) play video file in given path (bool force to watch till the end, or quit playing on tap) --> <!--'''mediamanager:postPicture(path)''' -- add picture from given path to gallery (or open save file dialog on pc)<br/> --> [[Special:MyLanguage/mediamanager:postPicture|mediamanager:postPicture(path)]] ''<translate>add picture from given path to gallery (or open save file dialog on pc)</translate>''<br/><!-- GIDEROSMTD:mediamanager:postPicture(path) add picture from given path to gallery (or open save file dialog on pc) --> <!--'''mediamanager:takePicture()''' -- allow user to provide picture input from camera<br/> --> [[Special:MyLanguage/mediamanager:takePicture|mediamanager:takePicture]] ''<translate>allow user to provide picture input from camera</translate>''<br/><!-- GIDEROSMTD:mediamanager:takePicture() allow user to provide picture input from camera --> <!--'''mediamanager:takeScreenshot()''' -- capture a screenshot of the app<br/> --> [[Special:MyLanguage/mediamanager:takeScreenshot|mediamanager:takeScreenshot]] ''<translate>capture a screenshot of the app</translate>''<br/><!-- GIDEROSMTD:mediamanager:takeScreenshot() capture a screenshot of the app --> '''Media.new(path)''' -- create new Media object with provided image<br/> '''Media.new(width, height)''' -- create blank Media object with provided dimensions<br/> '''Media:getPath()''' -- returns the path that was used to create object<br/> '''Media:getWidth()''' -- returns the width of the image<br/> '''Media:getHeight()''' -- returns the height of the image<br/> '''Media:getPixel(x, y)''' -- returns r, g, b, a values of pixel at x,y coordinate (RGB are in range of 0 to 255, alpha is in range of 0 to 1)<br/> '''Media:setPixel(x, y, r, g, b, a)''' -- sets r, g, b, a values to pixel at x,y coordinate (RGB are in range of 0 to 255, alpha is in range of 0 to 1)<br/> '''Media:setPixel(x, y, hex, a, blendAlpha)''' -- sets hex, a values to pixel at x,y coordinate (alpha is in range of 0 to 1)<br/> '''Media:resizeWidth(newWidth, fixed)''' -- resize image width, if fixed is true image is resized with fixed aspect ratio<br/> '''Media:resizeHeight(newHeight, fixed)''' -- resize image height, if fixed is true image is resized with fixed aspect ratio<br/> '''Media:resize(newWidth, newHeight, fixed, crop)''' -- resize image to new width and new height, if fixed is true image is resized with fixed aspect ratio and takes crop value into account (by either cropping image if true, or doing letterbox resize if false)<br/> '''Media:crop(x, y, width, height)''' -- crop with and height from x and y point from a given image<br/> '''Media:copy(destination)''' -- make a copy of the image<br/> '''Media:save()''' -- save the changes made to file<br/> '''Media:setRotation()''' -- rotate image to provided angle in degrees<br/> '''Media:getRotation()''' -- return previously set rotation<br/> '''Media:getRotation()''' -- return previously set rotation<br/> '''Media:flipHorizontal()''' -- flip image horizontally<br/> '''Media:flipVertical()''' -- flip image vertically<br/> '''Media:drawImage(x, y, media, alpha)''' -- draw another image on current one at specific x and y coordinates. You can provide either another media object or string path to image file<br/> '''Media:drawText(x, y, text, hexColor, fontSize, alpha)''' -- draw a text at provided coorindates with provided settings<br/> '''Media:drawLine(x0, y0, x1, y0, hexColor, alpha, blendAlpha)''' -- draw a line from x0,y0 to x1,y1 with provided settings<br/> '''Media:drawFill(x, y, width, height, hexColor, alpha, blendAlpha)''' -- draw filled rectangle at x,y position with width,height dimensions and with provided settings<br/> '''Media:floodFill(x, y, hexColor, alpha, tolerance, blendAlpha)''' -- fill area with provided color based on tolerance to other colors<br/> '''Media:trim(hexColor)''' -- trim image by provided background color, if color is not provided, uses top left pixel to crop<br/> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === [[Special:MyLanguage/Event.MEDIA_RECEIVE|Event.MEDIA_RECEIVE]] ''(e.path) -- path to image''<br/><!-- Event.MEDIA_RECEIVE mediaReceive--> [[Special:MyLanguage/Event.MEDIA_CANCEL|Event.MEDIA_CANCEL]] ''--user cancelled media input''<br/><!-- Event.MEDIA_CANCEL mediaCancel--> [[Special:MyLanguage/Event.VIDEO_COMPLETE|Event.VIDEO_COMPLETE]] ''--user completed watching video''<br/><!-- Event.VIDEO_COMPLETE videoComplete--> === <translate>Constants</translate> === |} gw0wob76v43t5o5j8mjrlcc1ofm2wgd Mediamanager:deleteFile 0 2846 14860 2019-12-08T19:43:55Z MoKaLux 19 first attempt at creating methods for media plugin wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.1<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Media|Media]]<br/> === <translate>Description</translate> === Deletes file at provided path. <source lang="lua"> mediamanager:deleteFile(path) </source> === <translate>Parameters</translate> === '''path''': (string) <translate>the path of the file to delete</translate> <!-- {{Media}} --> 567q61wo2yam3dco2ivzafeo1pwnh28 Mediamanager:getPicture 0 2845 14858 2019-12-08T19:03:46Z MoKaLux 19 first attempt at creating methods for media plugin wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.1<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Media|Media]]<br/> === <translate>Description</translate> === Allows user to select picture from gallery. <source lang="lua"> (string) = mediamanager:getPicture() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>path to the picture</translate><br/> <!-- {{Media}} --> tiakqqf85bx1v9cgvt4l8nm4nnnwclt Mediamanager:isCameraAvailable 0 2843 14853 2019-12-08T18:31:38Z MoKaLux 19 first attempt at creating methods for media plugin wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.1<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Media|Media]]<br/> === <translate>Description</translate> === Checks if camera is available. <source lang="lua"> (bool) = mediamanager:isCameraAvailable() </source> === <translate>Return values</translate> === '''Returns''' (bool) ''true'' if camera is available, ''false'' otherwise. <!-- {{Media}} --> is0aq6cwoxxw1f4s3d4l9i30gblsx01 Mediamanager:playVideo 0 2847 14862 2019-12-08T19:51:09Z MoKaLux 19 first attempt at creating methods for media plugin wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.1<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Media|Media]]<br/> === <translate>Description</translate> === Plays video file in given path. <source lang="lua"> mediamanager:playVideo(path, force) </source> === <translate>Parameters</translate> === '''path''': (string) <translate>the path of the video to play</translate><br/> '''force''': (bool) <translate>force to watch till the end, or quit playing on tap</translate> <!-- {{Media}} --> ng2u47x7bkio2pyab13kg9rrbzt40l7 Mediamanager:postPicture 0 2848 14863 2019-12-08T19:57:07Z MoKaLux 19 first attempt at creating methods for media plugin wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.1<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Media|Media]]<br/> === <translate>Description</translate> === Adds picture from given path to gallery (or opens save file dialog on pc). <source lang="lua"> mediamanager:postPicture(path) </source> === <translate>Parameters</translate> === '''path''': (string) <translate>the path to save the file to</translate> <!-- {{Media}} --> o9zlknxqwolr53rumuiyhuhvwr5k6e7 Mediamanager:takePicture 0 2844 14856 2019-12-08T18:52:40Z MoKaLux 19 first attempt at creating methods for media plugin wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.1<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Media|Media]]<br/> === <translate>Description</translate> === Allows user to provide picture input from camera. <source lang="lua"> (string) = mediamanager:takePicture() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>path of the picture</translate><br/> <!-- {{Media}} --> jspbge6m8etyw3c8pq34gvwaurvygq6 Mediamanager:takeScreenshot 0 2849 14864 2019-12-08T20:02:26Z MoKaLux 19 first attempt at creating methods for media plugin wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2016.1<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Media|Media]]<br/> === <translate>Description</translate> === Captures a screenshot of the app. <source lang="lua"> (string) = mediamanager:takeScreenshot() </source> === <translate>Return values</translate> === '''<translate>Returns</translate>''' (string) <translate>path to the screenshot</translate><br/> <!-- {{Media}} --> 7e97d2gtxlq51m4ty8h0zji3bk2pzrw Microphone 0 106 11654 10722 2018-09-13T14:32:45Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:Microphone --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> === <translate>Description</translate> === <translate>Use this plugin to record to an audio clip using a connected microphone.</translate> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Microphone.new|Microphone.new]] ''<translate>Creates a new Microphone object.</translate>''<br/><!-- GIDEROSMTD:Microphone.new(deviceName,sampleRate,numChannels,bitsPerSample,quality) Creates a new Microphone object. --> [[Special:MyLanguage/Microphone:setOutputFile|Microphone:setOutputFile]] ''<translate>Sets the output file</translate>''<br/><!-- GIDEROSMTD:Microphone:setOutputFile(fileName) Sets the output file --> [[Special:MyLanguage/Microphone:start|Microphone:start]] ''<translate>Start recording with device.</translate>''<br/><!-- GIDEROSMTD:Microphone:start() Start recording with device. --> [[Special:MyLanguage/Microphone:stop|Microphone:stop]] ''<translate>Stop recording</translate>''<br/><!-- GIDEROSMTD:Microphone:stop() Stop recording --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === [[Special:MyLanguage/Event.DATA_AVAILABLE|Event.DATA_AVAILABLE]]<br/><!-- GIDEROSEVT:Event.DATA_AVAILABLE dataAvailable--> === <translate>Constants</translate> === |} te5h1inku0uhfw1sqrsi2c94v8kenjh Microphone.new 0 575 10086 7726 2018-09-03T08:58:09Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Microphone|Microphone]]<br/> === <translate>Description</translate> === <translate>Creates a new Microphone object.</translate> <source lang="lua"> Microphone.new(deviceName,sampleRate,numChannels,bitsPerSample,quality) </source> === <translate>Parameters</translate> === '''deviceName''': (string) <translate>The name of the device. Passing nil or an empty string will pick the default device.</translate> <br/> '''sampleRate''': (number) <translate>Sample rate of the recording. This value should be between 4000 and 44100.</translate> <br/> '''numChannels''': (number) <translate>Number of channels. This value can be 1 for mono and 2 for stereo.</translate> <br/> '''bitsPerSample''': (number) <translate>Bits per sample. This value can be 8 or 16.</translate> <br/> '''quality''': (number) <translate>Quality factor when a compression codec is used, between 0 and 1. Default to 0.5.</translate> '''optional'''<br/> 8ebx0dumy7kyqxoendceqo45cw95sm4 Microphone:setOutputFile 0 349 9795 7435 2018-09-03T08:57:39Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Microphone|Microphone]]<br/> === <translate>Description</translate> === <translate>Sets the output file. If an output file is specified, captured audio is recorded to this file. You cannot set output file while recording.</translate> <source lang="lua"> Microphone:setOutputFile(fileName) </source> === <translate>Parameters</translate> === '''fileName''': (string) <translate>The filename. It should be on documents or temporary directory.</translate> <br/> pfggt04krk5p02ewzaj9phdy3pxklh3 Microphone:start 0 311 9748 7393 2018-09-03T08:57:34Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Microphone|Microphone]]<br/> === <translate>Description</translate> === <translate>Start recording with device.</translate> <source lang="lua"> Microphone:start() </source> h79rdbyw40y1bgtjljlt6mmjk8es1sv Microphone:stop 0 258 9666 7316 2018-09-03T08:57:25Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2013.06<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Microphone|Microphone]]<br/> === <translate>Description</translate> === <translate>Stop recording.</translate> <source lang="lua"> Microphone:stop() </source> 02oc4gwc1hvhhvl03z2soqbcgtkdgr6 Noise 0 2858 15030 15023 2019-12-14T07:41:16Z MoKaLux 19 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:FastNoise --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2019.12<br/> === <translate>Description</translate> === <translate>FastNoise is an open source noise generation library with a large collection of different noise algorithms. [[https://github.com/Auburns/FastNoise FastNoise home page]] </translate> === <translate>Features</translate> === * Value Noise 2D, 3D * Perlin Noise 2D, 3D * Simplex Noise 2D, 3D, 4D * Cubic Noise 2D, 3D * Gradient Perturb 2D, 3D * Multiple fractal options for all of the above * Cellular (Voronoi) Noise 2D, 3D * White Noise 2D, 3D, 4D * Texture generation * Array generation <translate>Orignal documentation: https://github.com/Auburns/FastNoise/wiki</translate> === <translate>Examples</translate> === '''Example 1.''' <source lang="lua"> require "FastNoise" local myNoise = Noise.new() -- create FastNoise instance myNoise:setSeed(456) -- set generation seed myNoise:setFrequency(0.04) -- how coarse the noise output is myNoise:setInterp(Noise.HERMITE) -- set noise interpolation type myNoise:setNoiseType(Noise.SIMPLEX) -- set noise type for y = 1, 4 do for x = 1, 4 do local v = myNoise:noise(x, y) -- generate 2D noise -- other possible function: -- myNoise:noise(x) -- 1D noise -- myNoise:noise(x, y, z) -- 3D noise -- myNoise:noise2D(x, y) -- true 2D noise -- myNoise:noise3D(x, y, z) -- true 3D noise -- difference between noise2D(x, y) and noise(x, y) is that "noise" function uses 3D noise with -- x = 0, y = 0, z = 0 by default where noise2D uses only 2 values. In other words: noise(x) == noise(x,0,0); -- noise(x, y) == noise(x,y,0); noise(x,y) == noise2D(x,y); noise(x,y,z) == noise3D(x,y,z) print(v) end end </source> '''Example 2. Grayscaled noise image''' <source lang="lua"> require "FastNoise" local n = Noise.new() -- generate 128x128 texture local tex = n:generateTexture(128, 128) -- add it to scene stage:addChild(Bitmap.new(tex)) </source> '''Example 3. Colored seamless noise image''' <source lang="lua"> require "FastNoise" local n = Noise.new() n:setFrequency(0.03) n:setFractalOctaves(5) n:setFractalLacunarity(2.5) n:setInterp(Noise.HERMITE) n:setFractalGain(0.6) n:setNoiseType(Noise.SIMPLEX_FRACTAL) -- create a color table used by noise -- h: height value in range [0..1] -- color: in RGBA format local colors = { {h = 0.3, color = {52,99,195,255}}, {h = 0.4, color = {54,102,198,255}}, {h = 0.45, color = {209,208,128,255}}, {h = 0.55, color = {88,151,24,255}}, {h = 0.6, color = {63,106,20,255}}, {h = 0.7, color = {92,68,61,255}}, {h = 0.9, color = {75,60,55,255}}, {h = 1, color = {255,255,255,255}}, } -- generate 128x128 texture local tex = n:generateTexture(128, 128, false, {wrap=Texture.REPEAT}, {tileable = true, colors = colors}) -- add it to scene stage:addChild(Pixel.new(tex, 256,256)) </source> === <translate>Notes</translate> === {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/Noise.new|Noise.new]] ''<translate>creates a new Noise object</translate>''<br/><!-- GIDEROSMTD:Noise.new() creates a new Noise object --> [[Special:MyLanguage/Noise:reset|Noise:reset]] ''<translate>reset noise parameters to default</translate>''<br/><!-- GIDEROSMTD:FastNoise:reset() reset noise parameters to default --> [[Special:MyLanguage/Noise:noise|Noise:noise]] ''<translate>get noise value</translate>''<br/><!-- GIDEROSMTD:Noise:noise([x,y,z]) get noise value --> [[Special:MyLanguage/Noise:noise2D|Noise:noise2D]] ''<translate>get 2D noise value</translate>''<br/><!-- GIDEROSMTD:Noise:noise2D(x,y) get 2D noise value --> [[Special:MyLanguage/Noise:noise3D|Noise:noise3D]] ''<translate>get 3D noise value</translate>''<br/><!-- GIDEROSMTD:Noise:noise3D(x,y,z) get 3D noise value --> [[Special:MyLanguage/Noise:whiteNoise4D|Noise:whiteNoise4D]] ''<translate>get 4D white noise value</translate>''<br/><!-- GIDEROSMTD:Noise:whiteNoise4D(x,y,z,w) get 4D white noise value --> [[Special:MyLanguage/Noise:whiteNoise2DInt|Noise:whiteNoise2DInt]] ''<translate>get integer 2D white noise value</translate>''<br/><!-- GIDEROSMTD:Noise:whiteNoise2DInt(x,y) get integer 2D white noise value --> [[Special:MyLanguage/Noise:whiteNoise3DInt|Noise:whiteNoise3DInt]] ''<translate>get integer 3D white noise value</translate>''<br/><!-- GIDEROSMTD:Noise:whiteNoise3DInt(x,y,z) get integer 3D white noise value --> [[Special:MyLanguage/Noise:whiteNoise4DInt|Noise:whiteNoise4DInt]] ''<translate>get integer 4D white noise value</translate>''<br/><!-- GIDEROSMTD:Noise:whiteNoise4DInt(x,y,z,w) get integer 4D white noise value --> [[Special:MyLanguage/Noise:simplex4D|Noise:simplex4D]] ''<translate>get 4D simplex noise value</translate>''<br/><!-- GIDEROSMTD:Noise:simplex4D(x,y,z,w) get 4D simplex noise value --> [[Special:MyLanguage/Noise:gradientPerturb2D|Noise:gradientPerturb2D]] ''<translate>returns modified x, y</translate>''<br/><!-- GIDEROSMTD:Noise:gradientPerturb2D(x,y) returns modified x, y --> [[Special:MyLanguage/Noise:gradientPerturb3D|Noise:gradientPerturb3D]] ''<translate>returns modified x, y, z</translate>''<br/><!-- GIDEROSMTD:Noise:gradientPerturb3D(x,y,z) returns modified x, y, z --> [[Special:MyLanguage/Noise:gradientPerturbFractal2D|Noise:gradientPerturbFractal2D]] ''<translate>returns modified x,y</translate>''<br/><!-- GIDEROSMTD:Noise:gradientPerturbFractal2D(x,y) returns modified x,y --> [[Special:MyLanguage/Noise:gradientPerturbFractal3D|Noise:gradientPerturbFractal3D]] ''<translate>returns modified x,y,z</translate>''<br/><!-- GIDEROSMTD:Noise:gradientPerturbFractal3D(x,y,z) returns modified x,y,z --> [[Special:MyLanguage/Noise:setNoiseType|Noise:setNoiseType]] ''<translate>sets the type of noise returned by noise()</translate>''<br/><!-- GIDEROSMTD:Noise:setNoiseType(noiseType) sets the type of noise returned by noise() --> [[Special:MyLanguage/Noise:setFractalOctaves|Noise:setFractalOctaves]] ''<translate>the amount of noise layers used to create the fractal</translate>''<br/><!-- GIDEROSMTD:Noise:setFractalOctaves(n) the amount of noise layers used to create the fractal --> [[Special:MyLanguage/Noise:setInterp|Noise:setInterp]] ''<translate>changes the interpolation method used to smooth between noise values</translate>''<br/><!-- GIDEROSMTD:Noise:setInterp(interpolation) changes the interpolation method used to smooth between noise values --> [[Special:MyLanguage/Noise:setSeed|Noise:setSeed]] ''<translate>using different seeds will cause the noise output to change</translate>''<br/><!-- GIDEROSMTD:Noise:setSeed() using different seeds will cause the noise output to change --> [[Special:MyLanguage/Noise:setFrequency|Noise:setFrequency]] ''<translate>affects how coarse the noise output is</translate>''<br/><!-- GIDEROSMTD:Noise:setFrequency(frequency) affects how coarse the noise output is --> [[Special:MyLanguage/Noise:setFractalLacunarity|Noise:setFractalLacunarity]] ''<translate>the frequency multiplier between each octave</translate>''<br/><!-- GIDEROSMTD:Noise:setFractalLacunarity(lacunarity) the frequency multiplier between each octave --> [[Special:MyLanguage/Noise:setFractalGain|Noise:setFractalGain]] ''<translate>the relative strength of noise from each layer when compared to the last</translate>''<br/><!-- GIDEROSMTD:Noise:setFractalGain(gain) the relative strength of noise from each layer when compared to the last --> [[Special:MyLanguage/Noise:setFractalType|Noise:setFractalType]] ''<translate>used in all fractal noise generation</translate>''<br/><!-- GIDEROSMTD:Noise:setFractalType(noiseType) used in all fractal noise generation --> [[Special:MyLanguage/Noise:setCellularDistanceFunction|Noise:setCellularDistanceFunction]] ''<translate>the distance function used to calculate the cell for a given point</translate>''<br/><!-- GIDEROSMTD:Noise:setCellularDistanceFunction(distanceFunctionType) the distance function used to calculate the cell for a given point --> [[Special:MyLanguage/Noise:setCellularReturnType|Noise:setCellularReturnType]] ''<translate>what value does the cellular function return from its calculations</translate>''<br/><!-- GIDEROSMTD:Noise:setCellularReturnType(returnType) what value does the cellular function return from its calculations --> [[Special:MyLanguage/Noise:setCellularNoiseLookup|Noise:setCellularNoiseLookup]] ''<translate>TODO</translate>''<br/><!-- GIDEROSMTD:Noise:setCellularNoiseLookup(Noise) TODO --> [[Special:MyLanguage/Noise:setCellularDistance2Indices|Noise:setCellularDistance2Indices]] ''<translate>sets the 2 distance indicies used for distance2 return types</translate>''<br/><!-- GIDEROSMTD:Noise:setCellularDistance2Indices(index0, index1) sets the 2 distance indicies used for distance2 return types --> [[Special:MyLanguage/Noise:setCellularJitter|Noise:setCellularJitter]] ''<translate>sets the maximum distance a cellular point can move from its grid position</translate>''<br/><!-- GIDEROSMTD:Noise:setCellularJitter(jitter) sets the maximum distance a cellular point can move from its grid position --> [[Special:MyLanguage/Noise:setGradientPerturbAmp|Noise:setGradientPerturbAmp]] ''<translate>sets the maximum perturb distance from original location when using gradientPerturb()</translate>''<br/><!-- GIDEROSMTD:Noise:setGradientPerturbAmp(amp) sets the maximum perturb distance from original location when using gradientPerturb() --> [[Special:MyLanguage/Noise:getNoiseType|Noise:getNoiseType]] ''<translate>returns noise type</translate>''<br/><!-- GIDEROSMTD:Noise:getNoiseType() returns noise type --> [[Special:MyLanguage/Noise:getFractalOctaves|Noise:getFractalOctaves]] ''<translate>returns number of fractal octaves</translate>''<br/><!-- GIDEROSMTD:Noise:getFractalOctaves() returns number of fractal octaves --> [[Special:MyLanguage/Noise:getInterp()|Noise:getInterp()]] ''<translate>returns interpolation type</translate>''<br/><!-- GIDEROSMTD:Noise:getInterp() returns interpolation type --> [[Special:MyLanguage/Noise:getSeed|Noise:getSeed]] ''<translate>returns generator's seed</translate>''<br/><!-- GIDEROSMTD:Noise:getSeed() returns generator's seed --> [[Special:MyLanguage/Noise:getFrequency|Noise:getFrequency]] ''<translate>returns noise frequency</translate>''<br/><!-- GIDEROSMTD:Noise:getFrequency() returns noise frequency --> [[Special:MyLanguage/Noise:getFractalLacunarity|Noise:getFractalLacunarity]] ''<translate>returns noise lacunarity</translate>''<br/><!-- GIDEROSMTD:Noise:getFractalLacunarity() returns noise lacunarity --> [[Special:MyLanguage/Noise:getFractalGain|Noise:getFractalGain]] ''<translate>return noise gain</translate>''<br/><!-- GIDEROSMTD:Noise:getFractalGain() return noise gain --> [[Special:MyLanguage/Noise:getFractalType|Noise:getFractalType]] ''<translate>returns noise type</translate>''<br/><!-- GIDEROSMTD:Noise:getFractalType() returns noise type --> [[Special:MyLanguage/Noise:getCellularDistanceFunction|Noise:getCellularDistanceFunction]] ''<translate>returns distance function type</translate>''<br/><!-- GIDEROSMTD:Noise:getCellularDistanceFunction() returns distance function type --> [[Special:MyLanguage/Noise:getCellularReturnType|Noise:getCellularReturnType]] ''<translate>returns cellular return type</translate>''<br/><!-- GIDEROSMTD:Noise:getCellularReturnType() returns cellular return type --> [[Special:MyLanguage/Noise:getCellularNoiseLookup|Noise:getCellularNoiseLookup]] ''<translate>returns Noise object that was set by setCellularNoiseLookup() function</translate>''<br/><!-- GIDEROSMTD:Noise:getCellularNoiseLookup() returns Noise object that was set by setCellularNoiseLookup() function --> [[Special:MyLanguage/Noise:getCellularJitter|Noise:getCellularJitter]] ''<translate>returns cellular jitter value</translate>''<br/><!-- GIDEROSMTD:Noise:getCellularJitter() returns cellular jitter value --> [[Special:MyLanguage/Noise:getGradientPerturbAmp|Noise:getGradientPerturbAmp]] ''<translate>returns gradient perturb amplitude.</translate>''<br/><!-- GIDEROSMTD:Noise:getGradientPerturbAmp() returns gradient perturb amplitude. --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === [[Special:MyLanguage/Noise.FBM|Noise.FBM]]<br/><!-- GIDEROSCST:Noise.FBM fbm--> [[Special:MyLanguage/Noise.BILLOW|Noise.BILLOW]]<br/><!-- GIDEROSCST:Noise.BILLOW billow--> [[Special:MyLanguage/Noise.RIGID_MULTI|Noise.RIGID_MULTI]]<br/><!-- GIDEROSCST:Noise.RIGID_MULTI rigid_multi--> [[Special:MyLanguage/Noise.VALUE|Noise.VALUE]]<br/><!-- GIDEROSCST:Noise.VALUE value--> [[Special:MyLanguage/Noise.VALUE_FRACTAL|Noise.VALUE_FRACTAL]]<br/><!-- GIDEROSCST:Noise.VALUE_FRACTAL value_fractal--> [[Special:MyLanguage/Noise.PERLIN|Noise.PERLIN]]<br/><!-- GIDEROSCST:Noise.PERLIN perlin--> [[Special:MyLanguage/Noise.PERLIN_FRACTAL|Noise.PERLIN_FRACTAL]]<br/><!-- GIDEROSCST:Noise.PERLIN_FRACTAL perlin_fractal--> [[Special:MyLanguage/Noise.SIMPLEX|Noise.SIMPLEX]]<br/><!-- GIDEROSCST:Noise.SIMPLEX simplex--> [[Special:MyLanguage/Noise.SIMPLEX_FRACTAL|Noise.SIMPLEX_FRACTAL]]<br/><!-- GIDEROSCST:Noise.SIMPLEX_FRACTAL simplex_fractal--> [[Special:MyLanguage/Noise.CELLULAR|Noise.CELLULAR]]<br/><!-- GIDEROSCST:Noise.CELLULAR cellular--> [[Special:MyLanguage/Noise.WHITE_NOISE|Noise.WHITE_NOISE]]<br/><!-- GIDEROSCST:Noise.WHITE_NOISE white_noise--> [[Special:MyLanguage/Noise.CUBIC|Noise.CUBIC]]<br/><!-- GIDEROSCST:Noise.CUBIC cubic--> [[Special:MyLanguage/Noise.CUBIC_FRACTAL|Noise.CUBIC_FRACTAL]]<br/><!-- GIDEROSCST:Noise.CUBIC_FRACTAL cubic_fractal--> [[Special:MyLanguage/Noise.CELL_VALUE|Noise.CELL_VALUE]]<br/><!-- GIDEROSCST:Noise.CELL_VALUE cell_value--> [[Special:MyLanguage/Noise.NOISE_LOOKUP|Noise.NOISE_LOOKUP]]<br/><!-- GIDEROSCST:Noise.NOISE_LOOKUP noise_lookup--> [[Special:MyLanguage/Noise.DISTANCE|Noise.DISTANCE]]<br/><!-- GIDEROSCST:Noise.DISTANCE distance--> [[Special:MyLanguage/Noise.DISTANCE_2|Noise.DISTANCE_2]]<br/><!-- GIDEROSCST:Noise.DISTANCE_2 distance_2--> [[Special:MyLanguage/Noise.DISTANCE_2_ADD|Noise.DISTANCE_2_ADD]]<br/><!-- GIDEROSCST:Noise.DISTANCE_2_ADD distance_2_add--> [[Special:MyLanguage/Noise.DISTANCE_2_SUB|Noise.DISTANCE_2_SUB]]<br/><!-- GIDEROSCST:Noise.DISTANCE_2_SUB distance_2_sub--> [[Special:MyLanguage/Noise.DISTANCE_2_MUL|Noise.DISTANCE_2_MUL]]<br/><!-- GIDEROSCST:Noise.DISTANCE_2_MUL distance_2_mul--> [[Special:MyLanguage/Noise.DISTANCE_2_DIV|Noise.DISTANCE_2_DIV]]<br/><!-- GIDEROSCST:Noise.DISTANCE_2_DIV distance_2_div--> [[Special:MyLanguage/Noise.LINEAR|Noise.LINEAR]]<br/><!-- GIDEROSCST:Noise.LINEAR linear--> [[Special:MyLanguage/Noise.HERMITE|Noise.HERMITE]]<br/><!-- GIDEROSCST:Noise.HERMITE hermite--> [[Special:MyLanguage/Noise.QUINTIC|Noise.QUINTIC]]<br/><!-- GIDEROSCST:Noise.QUINTIC quintic--> [[Special:MyLanguage/Noise.EUCLIDEAN|Noise.EUCLIDEAN]]<br/><!-- GIDEROSCST:Noise.EUCLIDEAN euclidean--> [[Special:MyLanguage/Noise.MANHATTAN|Noise.MANHATTAN]]<br/><!-- GIDEROSCST:Noise.MANHATTAN manhattan--> [[Special:MyLanguage/Noise.NATURAL|Noise.NATURAL]]<br/><!-- GIDEROSCST:Noise.NATURAL natural--> |} {{Noise}} h6z7itm9fropgmlat27egdtvgj3wiyb Noise:noise 0 2864 15035 15034 2019-12-14T09:11:32Z Rrraptor 22 wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2019.12<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Noise|Noise]]<br/> === <translate>Description</translate> === <translate><br /> Get noise value.<br /> <br /></translate> <source lang="lua"> Noise:noise([x, y, z]) </source> === <translate>Parameters</translate> === '''x''': (number, default = 0) <translate>x value</translate> <br/> '''y''': (number, default = 0) <translate>y value</translate> <br/> '''z''': (number, default = 0) <translate>z value</translate> <br/> {{Noise}} 4n9959ntowrrz8p41qo879dri0mir82 Noise:reset 0 2865 15036 2019-12-14T09:14:31Z Rrraptor 22 Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2019.12<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Noise|Noise]]<br/> === <tra..." wikitext text/x-wiki __NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2019.12<br/> '''<translate>Class</translate>:''' [[Special:MyLanguage/Noise|Noise]]<br/> === <translate>Description</translate> === <translate><br /> Reset noise parameters to default.<br /> <br /></translate> <source lang="lua"> Noise:reset() </source> {{Noise}} pzn114n92u3vg9fdmczeeuqjvmh6cua ReactPhysics3D 0 2667 13456 13455 2019-10-08T07:18:20Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:LiquidFun --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2019.10<br/> === <translate>Description</translate> === <translate>ReactPhysics3D is an open source 3D physics and collision engine.</translate> [[https://www.reactphysics3d.com/ React Physics 3D home page]] <br /><br /> === <translate>Classes</translate> === <div style="column-count:3;-moz-column-count:3;-webkit-column-count:3"> <!-- GIDEROSOBJ:r3d.BallAndSocketShape -->[[Special:MyLanguage/r3d.BallAndSocketShape|r3d.BallAndSocketShape]]<br /> <!-- GIDEROSOBJ:r3d.Body -->[[Special:MyLanguage/r3d.Body|r3d.Body]]<br /> <!-- GIDEROSOBJ:r3d.BoxShape -->[[Special:MyLanguage/r3d.BoxShape|r3d.BoxShape]]<br /> <!-- GIDEROSOBJ:r3d.CapsuleShape -->[[Special:MyLanguage/r3d.CapsuleShape|r3d.CapsuleShape]]<br /> <!-- GIDEROSOBJ:r3d.ConcaveMeshShape -->[[Special:MyLanguage/r3d.ConcaveMeshShape|r3d.ConcaveMeshShape]]<br /> <!-- GIDEROSOBJ:r3d.ConvexMeshShape -->[[Special:MyLanguage/r3d.ConvexMeshShape|r3d.ConvexMeshShape]]<br /> <!-- GIDEROSOBJ:r3d.FixedJoint -->[[Special:MyLanguage/r3d.FixedJoint|r3d.FixedJoint]]<br /> <!-- GIDEROSOBJ:r3d.Fixture -->[[Special:MyLanguage/r3d.Fixture|r3d.Fixture]]<br /> <!-- GIDEROSOBJ:r3d.HeightFieldShape -->[[Special:MyLanguage/r3d.HeightFieldShape|r3d.HeightFieldShape]]<br /> <!-- GIDEROSOBJ:r3d.HingeJoint -->[[Special:MyLanguage/r3d.HingeJoint|r3d.HingeJoint]]<br /> <!-- GIDEROSOBJ:r3d.Joint -->[[Special:MyLanguage/r3d.Joint|r3d.Joint]]<br /> <!-- GIDEROSOBJ:r3d.Shape -->[[Special:MyLanguage/r3d.Shape|r3d.Shape]]<br /> <!-- GIDEROSOBJ:r3d.SphereShape -->[[Special:MyLanguage/r3d.SphereShape|r3d.SphereShape]]<br /> <!-- GIDEROSOBJ:r3d.World -->[[Special:MyLanguage/r3d.World|r3d.World]]<br /> </div> 7i2fkpldejm6k94khrodxbccp44ulj6 R3d.Body 0 2668 13463 13459 2019-10-08T09:42:47Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:r3d.Body --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2019.10<br/> === <translate>Description</translate> === {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/r3d.Body:createFixture|r3d.Body:createFixture]] ''<translate>create a new fixture</translate>''<br/><!-- GIDEROSMTD:r3d.Body:createFixture(shape,transform,mass) create a new fixture --> [[Special:MyLanguage/r3d.Body:destroyFixture|r3d.Body:destroyFixture]] ''<translate>destroy a fixture</translate>''<br/><!-- GIDEROSMTD:r3d.Body:destroyFixture(fixture) destroy a fixture --> [[Special:MyLanguage/r3d.Body:getTransform|r3d.Body:getTransform]] ''<translate>get the body's transform</translate>''<br/><!-- GIDEROSMTD:r3d.Body:getTransform() get the body's transform --> [[Special:MyLanguage/r3d.Body:setTransform|r3d.Body:setTransform]] ''<translate>set the body's transform</translate>''<br/><!-- GIDEROSMTD:r3d.Body:setTransform(transform) set the body's transform --> [[Special:MyLanguage/r3d.Body:getMaterial|r3d.Body:getMaterial]] ''<translate>get the body's material</translate>''<br/><!-- GIDEROSMTD:r3d.Body:getMaterial() get the body's material --> [[Special:MyLanguage/r3d.Body:setMaterial|r3d.Body:setMaterial]] ''<translate>set the body's material</translate>''<br/><!-- GIDEROSMTD:r3d.Body:setMaterial(material) set the body's material --> [[Special:MyLanguage/r3d.Body:setType|r3d.Body:setType]] ''<translate>set the body's type</translate>''<br/><!-- GIDEROSMTD:r3d.Body:setType(type) set the body's type --> [[Special:MyLanguage/r3d.Body:enableGravity|r3d.Body:enableGravity]] ''<translate>enable or disable gravity on the body</translate>''<br/><!-- GIDEROSMTD:r3d.Body:enableGravity(enable) enable or disable gravity on the body --> [[Special:MyLanguage/r3d.Body:setIsAllowedToSleep|r3d.Body:setIsAllowedToSleep]] ''<translate>allow or disallow a body to sleep</translate>''<br/><!-- GIDEROSMTD:r3d.Body:setIsAllowedToSleep(allowed) allow or disallow a body to sleep --> [[Special:MyLanguage/r3d.Body:applyForce|r3d.Body:applyForce]] ''<translate>apply a force to this body</translate>''<br/><!-- GIDEROSMTD:r3d.Body:applyForce(forcX,forceY,forceZ[,pointX,pointY,pointZ]) apply a force to this body --> [[Special:MyLanguage/r3d.Body:applyTorque|r3d.Body:applyTorque]] ''<translate>apply a torque to this body</translate>''<br/><!-- GIDEROSMTD:r3d.Body:applyTorque(torqueX,torqueY,torqueZ) apply a torque to this body --> [[Special:MyLanguage/r3d.Body:raycast|r3d.Body:raycast]] ''<translate>perform a ray cast on the body</translate>''<br/><!-- GIDEROSMTD:r3d.Body:raycast(sx,sy,sz,ex,ey,ez) perform a ray cast on the body --> [[Special:MyLanguage/r3d.Body:testPointInside|r3d.Body:testPointInside]] ''<translate>check if a point is inside the body</translate>''<br/><!-- GIDEROSMTD:r3d.Body:testPointInside(x,y,z) check if a point is inside the body --> | style="width: 50%; vertical-align:top;"| === <translate>Constants</translate> === [[Special:MyLanguage/r3d.Body.DYNAMIC_BODY|r3d.Body.DYNAMIC_BODY]]<br/><!-- GIDEROSCST:r3d.Body.DYNAMIC_BODY 2--> [[Special:MyLanguage/r3d.Body.KINEMATIC_BODY|r3d.Body.KINEMATIC_BODY]]<br/><!-- GIDEROSCST:r3d.Body.KINEMATIC_BODY 1--> [[Special:MyLanguage/r3d.Body.STATIC_BODY|r3d.Body.STATIC_BODY]]<br/><!-- GIDEROSCST:r3d.Body.STATIC_BODY 0--> |} rpka00mci9n0o5z0gi4b6cgdm30xlff R3d.BoxShape 0 2671 13465 2019-10-08T09:54:12Z Hgy29 2 Created page with "__NOTOC__ <languages /> <!-- GIDEROSOBJ:r3d.BoxShape --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]]File:Platfor..." wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:r3d.BoxShape --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2019.10<br/> === <translate>Description</translate> === {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/r3d.BoxShape.new|r3d.BoxShape.new]] ''<translate>create a new box shape</translate>''<br/><!-- GIDEROSMTD:r3d.BoxShape.new(hX,hY,hZ) create a new box shape --> | style="width: 50%; vertical-align:top;"| |} 0w7lol32z8pbb98xh3hgqfltqyk9j85 R3d.CapsuleShape 0 2673 13467 2019-10-08T09:57:05Z Hgy29 2 Created page with "__NOTOC__ <languages /> <!-- GIDEROSOBJ:r3d.CapsuleShape --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]]File:Pla..." wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:r3d.CapsuleShape --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2019.10<br/> === <translate>Description</translate> === {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/r3d.CapsuleShape.new|r3d.CapsuleShape.new]] ''<translate>create a new capsule shape</translate>''<br/><!-- GIDEROSMTD:r3d.CapsuleShape.new(size,height) create a new capsule shape --> | style="width: 50%; vertical-align:top;"| |} rcqy6xexxj2bdhipm8w12pixh891a27 R3d.ConcaveMeshShape 0 2675 13469 2019-10-08T09:59:45Z Hgy29 2 Created page with "__NOTOC__ <languages /> <!-- GIDEROSOBJ:r3d.ConcaveMeshShape --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]]File..." wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:r3d.ConcaveMeshShape --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2019.10<br/> === <translate>Description</translate> === {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/r3d.ConcaveMeshShape.new|r3d.ConcaveMeshShape.new]] ''<translate>create a new concave mesh shape</translate>''<br/><!-- GIDEROSMTD:r3d.ConcaveMeshShape.new(vertices,indices) create a new concave mesh shape --> | style="width: 50%; vertical-align:top;"| |} t61alwqrti3vq2iflou86i39scd582t R3d.ConvexMeshShape 0 2674 13468 2019-10-08T09:59:05Z Hgy29 2 Created page with "__NOTOC__ <languages /> <!-- GIDEROSOBJ:r3d.ConvexMeshShape --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]]File:..." wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:r3d.ConvexMeshShape --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2019.10<br/> === <translate>Description</translate> === {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/r3d.ConvexMeshShape.new|r3d.ConvexMeshShape.new]] ''<translate>create a new convex mesh shape</translate>''<br/><!-- GIDEROSMTD:r3d.ConvexMeshShape.new(vertices,indices,faces) create a new convex mesh shape --> | style="width: 50%; vertical-align:top;"| |} mrn6ce3gghxg7hxgm5ysamghr5qou8u R3d.Fixture 0 2670 13464 2019-10-08T09:47:55Z Hgy29 2 Created page with "__NOTOC__ <languages /> <!-- GIDEROSOBJ:r3d.Fixture --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]]File:Platform..." wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:r3d.Fixture --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2019.10<br/> === <translate>Description</translate> === {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/r3d.Fixture:setCollisionCategoryBits|r3d.Fixture:setCollisionCategoryBits]] ''<translate>set the categories of this fixture</translate>''<br/><!-- GIDEROSMTD:r3d.Fixture:setCollisionCategoryBits(bits) set the categories of this fixture --> [[Special:MyLanguage/r3d.Fixture:setCollideWithMaskBits|r3d.Fixture:setCollideWithMaskBits]] ''<translate>set the categories this fixture can collide with</translate>''<br/><!-- GIDEROSMTD:r3d.Fixture:setCollideWithMaskBits(bits) set the categories this fixture can collide with --> [[Special:MyLanguage/r3d.Fixture:raycast|r3d.Fixture:raycast]] ''<translate>perform a ray cast on the fixture</translate>''<br/><!-- GIDEROSMTD:r3d.Fixture:raycast(sx,sy,sz,ex,ey,ez) perform a ray cast on the fixture --> [[Special:MyLanguage/r3d.Fixture:testPointInside|r3d.Fixture:testPointInside]] ''<translate>check if a point is inside the fixture</translate>''<br/><!-- GIDEROSMTD:r3d.Fixture:testPointInside(x,y,z) check if a point is inside the fixture --> | style="width: 50%; vertical-align:top;"| |} 44xq4yg7ine7l2dpngqalg8uajtshkc R3d.HeightFieldShape 0 2676 13470 2019-10-08T10:01:35Z Hgy29 2 Created page with "__NOTOC__ <languages /> <!-- GIDEROSOBJ:r3d.HeightFieldShape --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]]File..." wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:r3d.HeightFieldShape --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2019.10<br/> === <translate>Description</translate> === {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/r3d.HeightFieldShape.new|r3d.HeightFieldShape.new]] ''<translate>create a new height field shape</translate>''<br/><!-- GIDEROSMTD:r3d.HeightFieldShape.new(width,height,minAltitude,maxAltitude,field) create a new height field shape --> | style="width: 50%; vertical-align:top;"| |} efhnaa3vfotl22w60aahic63dc8cltp R3d.SphereShape 0 2672 13466 2019-10-08T09:56:23Z Hgy29 2 Created page with "__NOTOC__ <languages /> <!-- GIDEROSOBJ:r3d.SphereShape --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]]File:Plat..." wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:r3d.SphereShape --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2019.10<br/> === <translate>Description</translate> === {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/r3d.SphereShape.new|r3d.SphereShape.new]] ''<translate>create a new sphere shape</translate>''<br/><!-- GIDEROSMTD:r3d.SphereShape.new(size) create a new sphere shape --> | style="width: 50%; vertical-align:top;"| |} ixzxsho28ead2hf2h8b3p9lf7jeu9z5 R3d.World 0 2669 13462 13461 2019-10-08T09:27:08Z Hgy29 2 wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:r3d.World --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2019.10<br/> === <translate>Description</translate> === {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === [[Special:MyLanguage/r3d.World.new|r3d.World.new]] ''<translate>create a new world</translate>''<br/><!-- GIDEROSMTD:r3d.World.new(gravityX,gravityY,gravityZ) create a 3D physics world --> [[Special:MyLanguage/r3d.World:createBody|r3d.World:createBody]] ''<translate>create a new body</translate>''<br/><!-- GIDEROSMTD:r3d.World:createBody(transform) create a new body --> [[Special:MyLanguage/r3d.World:destroyBody|r3d.World:destroyBody]] ''<translate>destroy a body</translate>''<br/><!-- GIDEROSMTD:r3d.World:destroyBody(body) destroy a body --> [[Special:MyLanguage/r3d.World:step|r3d.World:step]] ''<translate>Step the world</translate>''<br/><!-- GIDEROSMTD:r3d.World:step(time) step the world --> [[Special:MyLanguage/r3d.World:raycast|r3d.World:raycast]] ''<translate>perform a ray cast on the world</translate>''<br/><!-- GIDEROSMTD:r3d.World:raycast(sx,sy,sz,ex,ey,ez,callback,category) perform a ray cast on the world --> [[Special:MyLanguage/r3d.World:testOverlap|r3d.World:testOverlap]] ''<translate>check if two bodies overlap</translate>''<br/><!-- GIDEROSMTD:r3d.World:testOverlap(bodyA,bodyB) check if two bodies overlap --> [[Special:MyLanguage/r3d.World:testAABBOverlap|r3d.World:testAABBOverlap]] ''<translate>check if two bodies AABB overlap</translate>''<br/><!-- GIDEROSMTD:r3d.World:testAABBOverlap(bodyA,bodyB) check if two bodies AABB overlap --> [[Special:MyLanguage/r3d.World:testCollision|r3d.World:testCollision]] ''<translate>check collisions</translate>''<br/><!-- GIDEROSMTD:r3d.World:testCollision([bodyA,[bodyB,]]callback[,category]) check collisions --> [[Special:MyLanguage/r3d.World:setEventListener|r3d.World:setEventListener]] ''<translate>set the event listener for collisions in the world</translate>''<br/><!-- GIDEROSMTD:r3d.World:setEventListener(listener) set the event listener for collisions in the world --> [[Special:MyLanguage/r3d.World:createBallAndSocketJoint|r3d.World:createBallAndSocketJoint]] <br/><!-- GIDEROSMTD:r3d.World:createBallAndSocketJoint(bodyA,bodyB,anchorX,anchorY,anchorZ,params) --> [[Special:MyLanguage/r3d.World:createHingeJoint|r3d.World:createHingeJoint]] <br/><!-- GIDEROSMTD:r3d.World:createHingeJoint(bodyA,bodyB,anchorX,anchorY,anchorZ,axisX,axisY,axisZ,params) --> [[Special:MyLanguage/r3d.World:createSliderJoint|r3d.World:createSliderJoint]] <br/><!-- GIDEROSMTD:r3d.World:createSliderJoint(bodyA,bodyB,anchorX,anchorY,anchorZ,axisX,axisY,axisZ,params) --> [[Special:MyLanguage/r3d.World:createFixedJoint|r3d.World:createFixedJoint]] <br/><!-- GIDEROSMTD:r3d.World:createFixedJoint(bodyA,bodyB,anchorX,anchorY,anchorZ,params) --> [[Special:MyLanguage/r3d.World:destroyJoint|r3d.World:destroyJoint]] ''<translate>destroy a joint</translate>''<br/><!-- GIDEROSMTD:r3d.World:destroyBody(joint) destroy a joint --> | style="width: 50%; vertical-align:top;"| |} o4qrb2ykstwvjfkft72vm8ozcxe926a TTS 0 2654 14839 13379 2019-12-08T14:09:18Z MoKaLux 19 formatting wikitext text/x-wiki __NOTOC__ <languages /> <!-- GIDEROSOBJ:TTS --> '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]]<br/> '''<translate>Available since</translate>:''' Gideros 2018.1<br/> === <translate>Description</translate> === Enables text to speech on your mobile. === <translate>Examples</translate> === '''Example''' <source lang="lua"> require "tts" local platform = application:getDeviceInfo() --local tts=TTS.new() local tts = TTS.new("fr", 1, 1) local count = 1 local text = "This is a fairly long sentence that will test the new TTS engine for Android devices." tts:addEventListener(Event.TTS_ERROR, function(e) print("TTS Error:"..e.error) end) local function stopSpeech() tts:stop() local function resumeSpeech() tts:speak("It was stopped and has been resumed") end local timerB=Timer.new(500, 1) timerB:addEventListener(Event.TIMER, resumeSpeech) timerB:start() end -- stop tts and then resume it local timer=Timer.new(9000, 1) timer:addEventListener(Event.TIMER, stopSpeech) tts:addEventListener(Event.TTS_INIT_COMPLETE, function() print("TTS Initialised") local sentence = "Test "..count..text tts:setVolume(1) tts:speak(sentence, tostring(count)) timer:start() --count = count + 1 end) tts:setVolume(1) tts:addEventListener(Event.TTS_UTTERANCE_COMPLETE, function(e) print("Utterance:"..e.utteranceId.." state:"..e.state.. " Count: "..count) if e.state == "start" then print("started") elseif e.state == "done" then count += 1 local sentence = "test "..count .. text if count == 2 then tts:setLanguage("en-US") tts:speak(sentence.." in British English", tostring(count)) elseif count == 3 then tts:setSpeed(0.4) tts:setPitch(2) tts:speak("The pitch and speed have been changed", tostring(count)) elseif count == 4 and platform == "iOS" then tts:setSpeed(1) tts:setPitch(1) tts:setVolume(0.2) print("volume: "..tts:getVolume()) tts:speak("This is quiet", "3") tts:setVolume(1) elseif count == 4 then -- not iOS count += 1 tts:shutdown() elseif count == 5 and platform == "iOS" then tts:setVoice("com.apple.ttsbundle.siri_female_en-GB_premium") tts:speak("A new voice has been selected by the identifier, but it needs to be installed on the device.", tostring(count)) print("pitch: "..tts:getPitch()..", speed: "..tts:getSpeed()) local voices = tts:getVoicesInstalled() for i = 1, #voices do print(voices[i]["language"]..", "..voices[i]["identifier"]..", "..voices[i]["quality"]..", "..voices[i]["name"]) end elseif count > 5 then tts:shutdown() end end end) </source> {|- | style="width: 50%; vertical-align:top;"| === <translate>Methods</translate> === <!-- [[Special:MyLanguage/camera.availableDevices|camera.availableDevices]] ''<translate>Return a list of available devices.</translate>''<br/> [[Special:MyLanguage/camera.start|camera.start]] ''<translate>Start streaming camera pictures to a Texture</translate>''<br/> [[Special:MyLanguage/camera.stop|camera.stop]] ''<translate>Stop camera streaming.</translate>''<br/> --> | style="width: 50%; vertical-align:top;"| === <translate>Events</translate> === === <translate>Constants</translate> === |} 4r9i7qn9rsivn2tccpigjhkw6s4yakq