====== Core (Module) ====== Module for built-in classes and other integral features of Doomsday Script. ===== Functions ===== #@Identifier_HTML~importPath~@# ( ) Returns the current search path for imported Doomsday Script modules. The return value is an array: [ , /modules, /home/modules, /data/net.dengine.stdlib.pack/modules, /data/ net.dengine.stdlib.gui.pack/modules, /data/net.dengine.client.pack/modules ] Loaded packages can add paths here using ''importPath'' in their [[fs:packages#scripting|metadata]]. ===== Core.Animation ===== #@Identifier_HTML~setValue~@# ( #@Arg_HTML~Number,target~@#, #@Arg_HTML~Number,span~@# = 0, #@Arg_HTML~Number,delay~@# = 0 ) Starts a new animation from the current value to //target//. The transition to the new target value will take //span// seconds. If //delay// is not zero, the transition will wait //delay// seconds before starting, however the delay time is considered to be included in //span// so increasing the value of //delay// does not change the transition span time, and the maximum delay is equal to //span//. uEmission.setValue(1, 1) #@Identifier_HTML~setValueFrom~@# ( #@Arg_HTML~Number,fromValue~@#, #@Arg_HTML~Number,toValue~@#, #@Arg_HTML~Number,span~@#, #@Arg_HTML~Number,delay~@# = 0 ) Starts a new animation from //fromValue// to //toValue//. The current value of the animation is discarded before starting the animation. The transition will take a total of //span// seconds, and will start after //delay// seconds has passed. In the following example, an animation is started from 1 to 0, with the duration of 0.9 seconds. For the first 0.5 seconds, the value remains at 1, after which it transitions in 0.4 seconds to 0. uEmission.setValueFrom(1, 0, 0.9, 0.5) #@Identifier_HTML~target~@# ( ) Returns the target value of the animation. #@Identifier_HTML~value~@# ( ) Returns the current value of the animation. If the animation is not ongoing, this is the same as the target value. ===== Core.Dictionary ===== Base class for values of type Dictionary. #@Identifier_HTML~keys~@# ( ) Returns the keys of a dictionary as an array: $ d = {'key1': 'value1', 'key2': 'value2'} $ d.keys() ⇒ [ key1, key2 ] #@Identifier_HTML~values~@# ( ) Returns the values of a dictionary as an array: $ d = {'key1': 'value1', 'key2': 'value2'} $ d.values() ⇒ [ value1, value2 ] ===== Core.File ===== #@Identifier_HTML~description~@# ( ) #@Identifier_HTML~flush~@# ( ) #@Identifier_HTML~locate~@# ( #@Arg_HTML~Text,relativePath~@# ) #@Identifier_HTML~metaId~@# ( ) #@Identifier_HTML~modifiedAt~@# ( ) #@Identifier_HTML~name~@# ( ) #@Identifier_HTML~path~@# ( ) #@Identifier_HTML~read~@# ( ) #@Identifier_HTML~readUtf8~@# ( ) #@Identifier_HTML~replace~@# ( #@Arg_HTML~Text,relativePath~@# ) #@Identifier_HTML~size~@# ( ) #@Identifier_HTML~type~@# ( ) #@Identifier_HTML~write~@# ( #@Arg_HTML~Block,data~@# ) ===== Core.Folder ===== Parent class for File objects that represent folders. Folders are derived both from Core.File and Core.Folder. ===== Core.RemoteFile ===== ===== Core.String ===== Base class for values of type Text. #@Identifier_HTML~beginsWith~@# ( #@Arg_HTML~Text,text~@# ) #@Identifier_HTML~endsWith~@# ( #@Arg_HTML~Text,text~@# ) #@Identifier_HTML~fileNameAndPathWithoutExtension~@# ( ) #@Identifier_HTML~fileNameExtension~@# ( ) #@Identifier_HTML~fileNamePath~@# ( ) Returns a text string with the file name removed. $ "/abc/def.txt".fileNamePath() ⇒ /abc #@Identifier_HTML~fileNameWithoutExtension~@# ( ) #@Identifier_HTML~lower~@# ( ) #@Identifier_HTML~upper~@# ( )