User Tools

Site Tools


script:module:core

Core (Module)

Module for built-in classes and other integral features of Doomsday Script.

Functions

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 metadata.

Core.Animation

setValue ( target : Number, span : Number = 0, delay : Number = 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)

setValueFrom ( fromValue : Number, toValue : Number, span : Number, delay : Number = 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)

target ( )

Returns the target value of the animation.

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.

keys ( )

Returns the keys of a dictionary as an array:

$ d = {'key1': 'value1', 'key2': 'value2'}
$ d.keys()
⇒ [ key1, key2 ]

values ( )

Returns the values of a dictionary as an array:

$ d = {'key1': 'value1', 'key2': 'value2'}
$ d.values()
⇒ [ value1, value2 ]

Core.File

description ( )

flush ( )

locate ( relativePath : Text )

metaId ( )

modifiedAt ( )

name ( )

path ( )

read ( )

readUtf8 ( )

replace ( relativePath : Text )

size ( )

type ( )

write ( data : Block )

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.

beginsWith ( text : Text )

endsWith ( text : Text )

fileNameAndPathWithoutExtension ( )

fileNameExtension ( )

fileNamePath ( )

Returns a text string with the file name removed.

$ "/abc/def.txt".fileNamePath()
⇒ /abc

fileNameWithoutExtension ( )

lower ( )

upper ( )

script/module/core.txt · Last modified: 2019-11-17 21:27 by skyjake