pub struct System { /* private fields */ }
Expand description
Provides access to all the different subsystems implemented on each platform.
Implementations
sourceimpl System
impl System
pub fn new() -> System
sourcepub fn load_asset_pack(
manifest: Manifest
) -> Promise<Box<dyn AssetPack + 'static, Global>>
pub fn load_asset_pack(
manifest: Manifest
) -> Promise<Box<dyn AssetPack + 'static, Global>>
Request to load an asset pack described by the given manifest.
sourcepub fn volume() -> AnimatedFloat
pub fn volume() -> AnimatedFloat
The global volume applied to all sounds, defaults to 1
sourcepub fn time() -> f32
pub fn time() -> f32
Gets the current clock time, in seconds since January 1, 1970. Depending on the platform, this may be slightly more efficient than Date.now().getTime().
sourcepub fn stage() -> Box<dyn StageSystem + 'static, Global>
pub fn stage() -> Box<dyn StageSystem + 'static, Global>
The Stage subsystem, for controlling the display viewport
sourcepub fn storage() -> Box<dyn StorageSystem + 'static, Global>
pub fn storage() -> Box<dyn StorageSystem + 'static, Global>
The Storage subsystem, for persisting values
sourcepub fn pointer() -> Box<dyn PointerSystem + 'static, Global>
pub fn pointer() -> Box<dyn PointerSystem + 'static, Global>
The Pointer subsystem, for unified mouse/touch events
sourcepub fn mouse() -> Box<dyn MouseSystem + 'static, Global>
pub fn mouse() -> Box<dyn MouseSystem + 'static, Global>
The Mouse subsystem, for direct access to the mouse
sourcepub fn touch() -> Box<dyn TouchSystem + 'static, Global>
pub fn touch() -> Box<dyn TouchSystem + 'static, Global>
The Touch subsystem, for direct access to the multi-touch
sourcepub fn keyboard() -> Box<dyn KeyboardSystem + 'static, Global>
pub fn keyboard() -> Box<dyn KeyboardSystem + 'static, Global>
The Keyboard subsystem, for keyboard events
sourcepub fn web() -> Box<dyn WebSystem + 'static, Global>
pub fn web() -> Box<dyn WebSystem + 'static, Global>
The Web subsystem, for using the device’s web browser
sourcepub fn external() -> Box<dyn ExternalSystem + 'static, Global>
pub fn external() -> Box<dyn ExternalSystem + 'static, Global>
The External subsystem, for interaction with external code
sourcepub fn locale() -> Option<String>
pub fn locale() -> Option<String>
Gets the RFC 4646 language tag of the environment. For example, “en-US”, “pt”, or None if the locale is unknown
sourcepub fn motion() -> Box<dyn MotionSystem + 'static, Global>
pub fn motion() -> Box<dyn MotionSystem + 'static, Global>
The Motion subsystem, for events from the device’s motion sensors
sourcepub fn renderer() -> Box<dyn RendererSystem + 'static, Global>
pub fn renderer() -> Box<dyn RendererSystem + 'static, Global>
The Renderer subsystem, for creating textures and accessing the GPU
True when the app is not currently visible, such as when minimized or placed in a background browser tab. While hidden, frame updates may be paused or throttled.
sourcepub fn uncaught_error() -> Signal1<String>
pub fn uncaught_error() -> Signal1<String>
Emitted when an uncaught exception occurs, if the platform supports it
Auto Trait Implementations
impl RefUnwindSafe for System
impl Send for System
impl Sync for System
impl Unpin for System
impl UnwindSafe for System
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
fn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.