API Docs for:
Show:

LSQ Class

Defined in: ../src/core.js:773
Module: LS

LSQ allows to set or get values easily from the global scene, using short strings as identifiers

Item Index

Methods

get

(
  • locator
)

Defined in ../src/core.js:807

Retrieves the value of a property of one node in the scene, just by using a string identifier Example: var value = LSQ.get("mynode|a_child/MeshRenderer/enabled");

Parameters:

  • locator String

    the locator string identifying the property

Returns:

:

value of the property

set

(
  • locator
  • value
)

Defined in ../src/core.js:779

Assigns a value to a property of one node in the scene, just by using a string identifier Example: LSQ.set("mynode|a_child/MeshRenderer/enabled",false);

Parameters:

  • locator String

    the locator string identifying the property

  • value

    value to assign to property

setFromInfo

(
  • info
  • value
)

Defined in ../src/core.js:876

Assigns a value using the getLocatorInfo object instead of searching it again This is faster but if the locator points to a different object it wont work.

Parameters:

  • info Object

    information of a location (obtain using scene.getLocatorInfo

  • value

    to assign

shortify

(
  • locator
)
String

Defined in ../src/core.js:837

Shortens a locator that uses unique identifiers to a simpler one, but be careful, because it uses names instead of UIDs it could point to the wrong property Example: "@NODE--a40661-1e8a33-1f05e42-56/@COMP--a40661-1e8a34-1209e28-57/size" -> "node|child/Collider/size"

Parameters:

  • locator String

    the locator string to shortify

Returns:

String:

the locator using names instead of UIDs