Home Reference Source
import Group from 'myr/src/myr/Group.js'
public class | source

Group

Class representing a Group in MYR

Constructor Summary

Public Constructor
public

constructor(originalMyr: Myr, id: string)

Instantiate a new Group class

Member Summary

Public Members
public

add(id: Group | string): *

Add new MYR entity to the Group

public

els: *[]

public

Return an object with elements of the Group

public
public

getEl(outerElId: string): object: *

Retrieve specific MYR entity in the Group

public

getIndex(outerElId: string): number: *

Retrieve the index of specific MYR entity in the Group

public

id: *

public

myr: *

public

remove(id: Group | string): *

Remove MYR entity from the Group

public

setPosition(x: number, y: number, z: number): *

Sets the x, y, and z position of the Group

public

setRotation(x: number, y: number, z: number): *

Sets the x, y, and z rotation of the Group

public

setScale(x: number, y: number, z: number): *

Sets the x, y, and z scale of the Group

Public Constructors

public constructor(originalMyr: Myr, id: string) source

Instantiate a new Group class

Params:

NameTypeAttributeDescription
originalMyr Myr

MYR instance

id string

ID assigned for this Group

Public Members

public add(id: Group | string): * source

Add new MYR entity to the Group

public els: *[] source

public entObj: object: * source

Return an object with elements of the Group

Return:

object

Flag indicates it's a Group and elements

public entity: boolean source

public getEl(outerElId: string): object: * source

Retrieve specific MYR entity in the Group

Return:

object

MYR object if found, null other wise

public getIndex(outerElId: string): number: * source

Retrieve the index of specific MYR entity in the Group

Return:

number

Index of the array if found, null otherwise.

public id: * source

public myr: * source

public remove(id: Group | string): * source

Remove MYR entity from the Group

public setPosition(x: number, y: number, z: number): * source

Sets the x, y, and z position of the Group

public setRotation(x: number, y: number, z: number): * source

Sets the x, y, and z rotation of the Group

public setScale(x: number, y: number, z: number): * source

Sets the x, y, and z scale of the Group