API Docs for:
Show:

LSQ Class

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

LSQ allows to set or get values easily from the global scene, using short strings as identifiers similar to jQuery and the DOM: LSQ("nod_name").material = ...

Item Index

Methods

get

(
  • locator
)

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

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:1064

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:1163

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:1124

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