Documentation generator: JsDoc Toolkit 2.4.0
Template: Codeview 1.2
Generated on: 2016-0-4 21:22

Namespace enchant.ENV

enchant.js environment variables. Execution settings can be changed by modifying these before calling new Core().

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<static>  
enchant.ENV.BROWSER
Identifier of the current browser.
<static>  
Method names of CanvasRenderingContext2D that will be defined as Surface method.
<static>  
enchant.ENV.COLOR_DETECTION_LEVEL
Specifies range of the touch detection.
<static>  
enchant.ENV.KEY_BIND_TABLE
Keybind Table.
<static>  
If keydown event occure for these keycodes the setPreventDefault() method will be called.
<static>  
enchant.ENV.RETINA_DISPLAY
Determines if the current browser is an iPhone with a retina display.
<static>  
Determines if Sound is enabled on Mobile Safari.
<static>  
enchant.ENV.TOUCH_ENABLED
Determines if the current browser supports touch.
<static>  
enchant.ENV.USE_ANIMATION
Determines if animation feature is enabled.
<static>  
If click/touch event occure for these tags the setPreventDefault() method will not be called.
<static>  
enchant.ENV.USE_FLASH_SOUND
Determines if for current browser Flash should be used to play sound instead of the native audio class.
<static>  
Determines if "touch to start" scene is enabled.
<static>  
enchant.ENV.USE_WEBAUDIO
Determines if WebAudioAPI is enabled.
<static>  
enchant.ENV.VENDOR_PREFIX
The CSS vendor prefix of the current browser.
<static>  
enchant.ENV.VERSION
Version of enchant.js

Namespace Detail

enchant.ENV

Field Detail

<static> {String} enchant.ENV.BROWSER
Identifier of the current browser.
<static> {String[]} enchant.ENV.CANVAS_DRAWING_METHODS
Method names of CanvasRenderingContext2D that will be defined as Surface method.
<static> {Boolean} enchant.ENV.COLOR_DETECTION_LEVEL
Specifies range of the touch detection. The detection area will be (COLOR_DETECTION_LEVEL * 2 + 1)px square.
<static> {Object} enchant.ENV.KEY_BIND_TABLE
Keybind Table. You can use 'left', 'up', 'right', 'down' for preset event.
enchant.ENV.KEY_BIND_TABLE = {
    37: 'left',
    38: 'up',
    39: 'right',
    40: 'down',
    32: 'a', //-> use 'space' key as 'a button'
};
<static> {Number[]} enchant.ENV.PREVENT_DEFAULT_KEY_CODES
If keydown event occure for these keycodes the setPreventDefault() method will be called.
<static> {Boolean} enchant.ENV.RETINA_DISPLAY
Determines if the current browser is an iPhone with a retina display. True, if this display is a retina display.
<static> {Boolean} enchant.ENV.SOUND_ENABLED_ON_MOBILE_SAFARI
Determines if Sound is enabled on Mobile Safari.
<static> {Boolean} enchant.ENV.TOUCH_ENABLED
Determines if the current browser supports touch. True, if touch is enabled.
<static> {Boolean} enchant.ENV.USE_ANIMATION
Determines if animation feature is enabled. (true: Timeline instance will be generated in new Node)
<static> {String[]} enchant.ENV.USE_DEFAULT_EVENT_TAGS
If click/touch event occure for these tags the setPreventDefault() method will not be called.
<static> {Boolean} enchant.ENV.USE_FLASH_SOUND
Determines if for current browser Flash should be used to play sound instead of the native audio class. True, if flash should be used.
<static> {Boolean} enchant.ENV.USE_TOUCH_TO_START_SCENE
Determines if "touch to start" scene is enabled. It is necessary on Mobile Safari because WebAudio Sound is muted by browser until play any sound in touch event handler. If set it to false, you should control this behavior manually.
<static> {Boolean} enchant.ENV.USE_WEBAUDIO
Determines if WebAudioAPI is enabled. (true: use WebAudioAPI instead of Audio element if possible)
<static> {String} enchant.ENV.VENDOR_PREFIX
The CSS vendor prefix of the current browser.
<static> {String} enchant.ENV.VERSION
Version of enchant.js