CreateApp2 makes it easier for users to create their own simulation via scripting. CreateApp2 provides an editor text field for the script that is being run, and an execute button to re-run the script.

Intended for scripting, this provides a ContactSim but no RigidBody objects or ForceLaws. The RigidBody objects and ForceLaws should be created via scripting such as a URL Query Script.

CreateApp2 extends CreateApp by using a different layout TabLayout3.

Hierarchy (view full)

Constructors

Methods

  • Adds the given Observer to this Subject's list of Observers, so that the Observer will be notified of changes in this Subject. An Observer may call Subject.addObserver during its observe method.

    Parameters

    Returns void

  • Notifies all Observers that the Parameter with the given name has changed by calling observe on each Observer.

    Parameters

    • name: string

      the language-independent or English name of the Parameter that has changed

    Returns void

    Throws

    if there is no Parameter with the given name

  • Define short-cut name replacement rules. For example 'sim' is replaced by 'myApp.sim' when myName is 'myApp'.

    Parameters

    • myName: string

      the name of this object, valid in global Javascript context.

    Returns void

  • Parameters

    • script: string
    • output: boolean = true

      whether to print the result to the output text area and add the script to session history; default is true

    Returns any

    the result of evaluating the string

  • Removes the Observer from this Subject's list of Observers. An Observer may call removeObserver during its observe method.

    Parameters

    • observer: Observer

      the Observer to detach from list of Observers

    Returns void

  • Display the author of the GitHub Gist on the web page. There should be an <a> tag with the id gist_author on the page.

    Parameters

    • login: null | string
    • html_url: null | string

    Returns void

  • Sets whether this Subject will broadcast events, typically used to temporarily disable broadcasting. Intended to be used in situations where a subclass overrides a method that broadcasts an event. This allows the subclass to prevent the superclass broadcasting that event, so that the subclass can broadcast the event when the method is completed.

    Parameters

    • value: boolean

      whether this Subject should broadcast events

    Returns boolean

    the previous value

  • Display the description of the GitHub Gist on the web page. There should be a <span> tag with the id gist_desc on the page.

    Parameters

    • desc: null | string

    Returns void

  • Display the URL of the GitHub Gist on the web page. There should be an <a> tag with the id gist_link on the page.

    Parameters

    • url: null | string

    Returns void

  • Returns a minimal string representation of this object, usually giving just identity information like the class name and name of the object.

    For an object whose main purpose is to represent another Printable object, it is recommended to include the result of calling toStringShort on that other object. For example, calling toStringShort() on a DisplayShape might return something like this:

    DisplayShape{polygon:Polygon{'chain3'}}
    

    Returns string

    a minimal string representation of this object.

Generated using TypeDoc