Using AI to help create your Incisor® project?
Boost your AI’s accuracy with our downloadable text files packed with essential info and examples. Upload them into your favorite AI tool to instantly improve context, consistency, and output quality.
Incisor® API Documentation
Incisor® API Documentation
This document is part of the compiled knowledge base for the Incisor® Software Development Platform.
Any use of this content is subject to the INCISOR® end user license and terms of use agreement.
https://www.incisordev.com/eultua
2025.11.25.13.26.58
----------------------------------------------------------
TABLE OF CONTENTS:
----------------------------------------------------------
Section 1: GLOBAL
Section 2: INCISOR
Section 3: AppEvent
Section 4: PauseEvent
Section 5: SpeedControl
Section 6: FocusChangeInfo
Section 7: AssetComponent
Section 8: LoadingTierDefinition
Section 9: Button
Section 10: Camera
Section 11: OrthographicCamera
Section 12: Intersection
Section 13: Code
Section 14: Constants
Section 15: ConstructDefinition
Section 16: Blueprint
Section 17: Construct
Section 18: CursorInputOverrideButton
Section 19: Curve
Section 20: CurvePoint
Section 21: CustomAddOnDefinition
Section 22: RegisteredProperty
Section 23: CustomAddOn_SceneObject
Section 24: CustomAddOn_GraphicObject
Section 25: CustomAddOn_Button
Section 26: CustomAddOn_TextBox
Section 27: CustomAddOn_TextAssembly
Section 28: CustomAddOn_ParticleSystem
Section 29: CustomAddOn_Construct
Section 30: CustomObjectDefinition
Section 31: shapifySwoop
Section 32: shapifyAddMotion
Section 33: shapify
Section 34: shearSwoop
Section 35: shearAddMotion
Section 36: shear
Section 37: EffectControllerDefinition
Section 38: EffectNode
Section 39: IncisorExtensions
Section 40: ProcessResult
Section 41: InspectorPanel
Section 42: FileBrowser
Section 43: PrePublishInfoObject
Section 44: PostPublishInfoObject
Section 45: ProcessConfiguration
Section 46: FileIO
Section 47: IncrCommsResponseObject
Section 48: PathInfo
Section 49: FlowController
Section 50: FlowState
Section 51: FlowStateElement
Section 52: FontDefinition
Section 53: Geometry
Section 54: GeometryEditor
Section 55: GraphicAsset
Section 56: MaterialPreset
Section 57: GraphicExpander
Section 58: GraphicObject
Section 59: Masking
Section 60: MaskGroup
Section 61: IncisorApp
Section 62: IncisorAppBasic
Section 63: LayoutObject
Section 64: LayoutStack
Section 65: LazyUpdater
Section 66: MaterialMaster
Section 67: Material
Section 68: Matrix4
Section 69: Matrix4Array
Section 70: Motion
Section 71: MotionControllers
Section 72: MotionType
Section 73: ParticleSystemDefinition
Section 74: ParticleSystem
Section 75: ParticleSystemRamp
Section 76: ParticleSystemRamp1
Section 77: ParticleSystemRamp2
Section 78: ParticleSystemRamp3
Section 79: ParticleSystemRamp4
Section 80: ParticleInfo
Section 81: ParticleSystemDefinitions
Section 82: Paths
Section 83: Pdf
Section 84: PdfSection
Section 85: PdfParagraph
Section 86: PdfHeader
Section 87: PdfFooter
Section 88: PdfImage
Section 89: PdfTable
Section 90: PdfRow
Section 91: PdfCell
Section 92: PdfTextFrame
Section 93: PivotPointAdjuster
Section 94: PixelsObject
Section 95: PixelsObjects
Section 96: TimePlaybackController
Section 97: ValuePlaybackController
Section 98: PlaybackController
Section 99: Precomp
Section 100: ProjectConfiguration
Section 101: AssetConfiguration
Section 102: Publishing
Section 103: RenderTarget
Section 104: SceneObject
Section 105: Scene
Section 106: Layer
Section 107: LayersByScene
Section 108: ScrollingPanel
Section 109: SlotReel
Section 110: Sound
Section 111: VolumeControl
Section 112: SpriteSetter
Section 113: Supervisor
Section 114: Swooper
Section 115: TweenType
Section 116: TweenControllers
Section 117: TextAssembly
Section 118: TextBox
Section 119: HtmlBacking
Section 120: RangeInfo
Section 121: TextFormat
Section 122: CharacterMaterial
Section 123: Texture
Section 124: Timeline
Section 125: TimeStamp
Section 126: UiBooleanSupervisor_checkbox
Section 127: UiButton
Section 128: UiCollapsibleStack
Section 129: UiDropDownMenu
Section 130: UiGraphicButton
Section 131: UiKeyboardNavigator
Section 132: UiKeyboardNavigable
Section 133: UiLinkButton
Section 134: UiMenu
Section 135: UiMenuItem
Section 136: UiNumberSupervisor_textField
Section 137: UiPopupWindow
Section 138: UiStringSupervisor_menu
Section 139: UiStringSupervisor_textField
Section 140: UiStyle
Section 141: UiPanel
Section 142: UiOutline
Section 143: UiTextField
Section 144: UiText
Section 145: UiVectorSupervisor_textField
Section 146: UiVisualFocus
Section 147: UiZoom
Section 148: UrlParameterIterator
Section 149: Vector1Swoop
Section 150: Vector2Swoop
Section 151: Vector3Swoop
Section 152: Vector4Swoop
Section 153: ColorSwoop
Section 154: Vector1AddMotion
Section 155: Vector2AddMotion
Section 156: Vector3AddMotion
Section 157: Vector4AddMotion
Section 158: ColorAddMotion
Section 159: Vector4Base
Section 160: Vector4
Section 161: Color
Section 162: Vector3Base
Section 163: Vector3
Section 164: Vector2Base
Section 165: Vector2
Section 166: VectorBase
Section 167: Vector1
Section 168: WaitThen
Section 169: Deprecation Schedule
Section 170: Release Notes
----------------------------------------------------------
Section 1: GLOBAL
----------------------------------------------------------
GLOBAL
[type: scope]
The global scope of a given Incisor project.
nc
[type: INCISOR]
Object housing all of the main Incisor functionality. Accessible via 'nc' from anywhere within project code, excluding code within the 'PreloadConfiguration.js' file (that code is executed before 'nc' is instantiated).
pr
[type: ProjectMain]
Object housing the main entry-point for the entire project
constants
[type: Constants]
Object housing predefined constant values for various Incisor® options and modes.
CODE
[type: Code]
Object housing tools for pre-process manipulation of code.
nce
[type: IncisorExtensions] [requires: unpublished only, license - extensions]
Object housing all of the Incisor Extensions functionality. In general, this object has much of the same functionality as nc/INCISOR and is therefore documented as extending that object but not all of the same functionality is available through this object, so auto-complete may show some non-existent members on this object.
----------------------------------------------------------
Section 2: INCISOR
----------------------------------------------------------
INCISOR
[type: class] [NON-INSTANTIABLE]
Class housing all of the main Incisor functionality. Accessible via 'nc' from anywhere within project code, excluding code within the 'PreloadConfiguration.js' file (that code is executed before 'nc' is instantiated).
INCISOR.projectName
[type: string]
The name of the project.
INCISOR.appEvents
[type: dictionary]
Object housing Incisor® AppEvents, which enable callbacks for software events including screen updates, cursor/pointer/mouse events, keyboard events, and many more.
INCISOR.appEvents.fixedUpdate
[type: AppEvent]
The fixed updater AppEvent occurs in an automatically repeating manner at a rate dictated by 'nc.targetFixedUpdateRate' (defaults to 60 fps). This AppEvent should be used to drive the logic and sequencing in a given project. It is a 'fixed' updater because it will be called at the designated rate regardless of 'dropped' screen updates, and logic/sequencing using this AppEvent will never experience 'time slippage' due to any software performance issues.
INCISOR.appEvents.lateFixedUpdate
[type: AppEvent]
The fixed updater AppEvent occurs in an automatically repeating manner at a rate dictated by 'nc.targetFixedUpdateRate' (defaults to 60 fps). This AppEvent should be used to drive the logic and sequencing in a given project. It is a 'fixed' updater because it will be called at the designated rate regardless of 'dropped' screen updates, and logic/sequencing using this AppEvent will never experience 'time slippage' due to any software performance issues. This AppEvent will always happen after the 'fixedUpdate' AppEvent. This AppEvent is 'ordered', meaning callbacks added can provide a 'callbackOrder' parameter, which is used to determine the execution order of callbacks.
INCISOR.appEvents.screenUpdate
[type: AppEvent]
The screen updater AppEvent occurs in an automatically repeating manner at a rate dictated by 'nc.targetScreenUpdateRate' (defaults to 60 fps). This AppEvent should only be used to drive processes that are tied to rendering - it occurs before each auto-render of the Cameras. It is a 'screen' updater because it is only called when the system's performance allows - if project logic or sequencing are tied to this AppEvent, they may experience 'time slippage' if there are any software performance issues.
INCISOR.appEvents.lateScreenUpdate
[type: AppEvent]
The late updater AppEvent occurs in an automatically repeating manner at a rate dictated by 'nc.targetScreenUpdateRate' (defaults to 60 fps). This AppEvent should only be used to drive processes that are tied to rendering - it occurs after each auto-render of the Cameras. It is a 'late' updater because it is called after rendering, and can be used to wrap up rendering processes, and prep for the next render. Much like the 'screenUpdate', the lateScreenUpdate only happens when system performance allows, and so would experience time slippage with performance issues. This AppEvent will always happen after the 'screenUpdate'. This AppEvent is 'ordered', meaning callbacks added can provide a 'callbackOrder' parameter, which is used to determine the execution order of callbacks.
INCISOR.appEvents.start
[type: AppEvent]
The start AppEvent occurs one time after ProjectMain.init (pr.init) has been called, which happens directly before the automatic iterative appEvents (i.e. fixedUpdate, screenUpdate etc...) begin. This AppEvent can be used to perform tasks which require that all SceneObjects and CustomAddOns to be 'in place' and set up before running. An example use of this AppEvent would be within a CustomAddOn that resides on an item inside a Construct - if you put code that references other CustomAddOns in a constructor, there's no guarantee that the other CustomAddOns or their owners will be populated yet. So in this case it would be better to run that same code in a 'start' callback, which waits for all of the setup before running. It should be noted that callbacks added after the official 'start' occurs will be invoked on the next fixedUpdate. This AppEvent is 'ordered', meaning callbacks added can provide a 'callbackOrder' parameter, which is used to determine the execution order of callbacks.
INCISOR.appEvents.keyboardEvent
[type: AppEvent]
The keyboardEvent is triggered for all keyboard events such as 'keydown' and 'keyup'. The native browser-triggered event will be sent to all callbacks as their first parameter. Callbacks added to this AppEvent also have a 'singular focus option', meaning they can require that a particular object be 'focused' in order for the callback to be invoked - this enables certain functionality related to user-input to be restricted to the appropriate contexts within a UI.
INCISOR.appEvents.canvasResize
[type: AppEvent]
The canvasResize is triggered any time a key canvas is resized. The native browser-triggered event will be sent to all callbacks as their first parameter.
INCISOR.appEvents.keyDown
[type: AppEvent]
The keyDown is triggered any time a key on the keyboard is pushed down. The native browser-triggered event will be sent to all callbacks as their first parameter. Callbacks added to this AppEvent also have a 'singular focus option', meaning they can require that a particular object be 'focused' in order for the callback to be invoked - this enables certain functionality related to user-input to be restricted to the appropriate contexts within a UI.
INCISOR.appEvents.keyUp
[type: AppEvent]
The keyUp is triggered any time a key on the keyboard that was previously pushed down is released. The native browser-triggered event will be sent to all callbacks as their first parameter. Callbacks added to this AppEvent also have a 'singular focus option', meaning they can require that a particular object be 'focused' in order for the callback to be invoked - this enables certain functionality related to user-input to be restricted to the appropriate contexts within a UI.
INCISOR.appEvents.cursorMove
[type: AppEvent]
The cursorMove is triggered any time the cursor is moved. The native browser-triggered event will be sent to all callbacks as their first parameter. Callbacks added to this AppEvent also have a 'singular focus option', meaning they can require that a particular object be 'focused' in order for the callback to be invoked - this enables certain functionality related to user-input to be restricted to the appropriate contexts within a UI.
INCISOR.appEvents.cursorPress
[type: AppEvent]
The cursorPress is triggered any time the cursor is 'pressed down', which would be either by clicking the mouse button, or touching a touch-screen device. The native browser-triggered event will be sent to all callbacks as their first parameter. Callbacks added to this AppEvent also have a 'singular focus option', meaning they can require that a particular object be 'focused' in order for the callback to be invoked - this enables certain functionality related to user-input to be restricted to the appropriate contexts within a UI.
INCISOR.appEvents.cursorRelease
[type: AppEvent]
The cursorRelease is triggered any time the cursor is 'let up', which would be either by realeasing the mouse button, or lifting a finger from a touch-screen device. The native browser-triggered event will be sent to all callbacks as their first parameter. Callbacks added to this AppEvent also have a 'singular focus option', meaning they can require that a particular object be 'focused' in order for the callback to be invoked - this enables certain functionality related to user-input to be restricted to the appropriate contexts within a UI.
INCISOR.appEvents.cursorScroll
[type: AppEvent]
The cursorScroll is triggered any time mouse scroll wheel is used. The native browser-triggered event will be sent to all callbacks as their first parameter. Callbacks added to this AppEvent also have a 'singular focus option', meaning they can require that a particular object be 'focused' in order for the callback to be invoked - this enables certain functionality related to user-input to be restricted to the appropriate contexts within a UI.
INCISOR.appEvents.contextMenu
[type: AppEvent]
The contextMenu is triggered when the context menu (right-click dropdown menu) is accessed. The native browser-triggered event will be sent to all callbacks as their first parameter. Callbacks added to this AppEvent also have a 'singular focus option', meaning they can require that a particular object be 'focused' in order for the callback to be invoked - this enables certain functionality related to user-input to be restricted to the appropriate contexts within a UI.
INCISOR.appEvents.cursorLeave
[type: AppEvent]
The cursorLeave is triggered any time the cursor leaves the canvas altogether. The native browser-triggered event will be sent to all callbacks as their first parameter. Callbacks added to this AppEvent also have a 'singular focus option', meaning they can require that a particular object be 'focused' in order for the callback to be invoked - this enables certain functionality related to user-input to be restricted to the appropriate contexts within a UI.
INCISOR.appEvents.cursorEvent
[type: AppEvent]
The cursorEvent is triggered any time the cursorMove, cursorPress, cursorRelease, cursorScroll, or contextMenu events are triggered. Use this AppEvent if you want to have a single callback receive the feedback from all of the cursor events. The native browser-triggered event will be sent to all callbacks as their first parameter. Callbacks added to this AppEvent also have a 'singular focus option', meaning they can require that a particular object be 'focused' in order for the callback to be invoked - this enables certain functionality related to user-input to be restricted to the appropriate contexts within a UI.
INCISOR.appEvents.focusChange
[type: AppEvent]
The focusChange AppEvent is triggered any time 'nc.singularFocusObject' is set to a new object. A FocusChangeInfo object will be sent to all callbacks as their first parameter - this object contains references to the object that is losing focus, as well as the object gaining focus.
INCISOR.appEvents.osFocusChange
[type: AppEvent]
The osFocusChange AppEvent is triggered any time the OS changes its focus to or from the browser/app running this instance of Incisor®. The status of the browser/app ('focused' or 'unfocused') will be sent to all callbacks as their first parameter.
INCISOR.appEvents.visibilityChange
[type: AppEvent]
The visibilityChange AppEvent is triggered any time the OS-level visibility of the browser/app running this instance of Incisor® changes. The status of the browser/app ('hidden' or 'visible') will be sent to all callbacks as their first parameter. This AppEvent is 'ordered', meaning callbacks added can provide a 'callbackOrder' parameter, which is used to determine the execution order of callbacks.
INCISOR.appEvents.clipboardEvent
[type: AppEvent]
The clipboardEvent is triggered any time the browser encounters a 'copy', 'cut', or 'paste' event, affecting the OS clipboard. Use this AppEvent if you want to have a single callback receive the feedback from all of the clipboard events. The native browser-triggered event will be sent to all callbacks as their first parameter. Callbacks added to this AppEvent also have a 'singular focus option', meaning they can require that a particular object be 'focused' in order for the callback to be invoked - this enables certain functionality related to user-input to be restricted to the appropriate contexts within a UI.
INCISOR.appEvents.uiZoomChange
[type: AppEvent]
The uiZoomChange AppEvent is triggered any time nc.uiZoom.totalZoom is changed, which can happen when nc.uiZoom.zoomValue changes or when the browser's devicePixelRatio changes. The updated totalZoom value will be sent to all callbacks as their first parameter.
INCISOR.pauseEvents
[type: dictionary]
Object housing all defined PauseEvents. A given PauseEvent can be used as a parameter in 'nc.pause' and 'nc.resume' to pause and resume various time-based and user-interaction processes. Pausable processes react to pausing or resuming with PauseEvents unless those processes have a given PauseEvent as part of their designated 'pauseImmunity', which can determined in the parameters of a pausable-process-initiating method.
INCISOR.pauseEvents.MainPauseEvent
[type: PauseEvent]
One of the currently defined PauseEvents.
INCISOR.pauseEvents.InspectorPauseEvent
[type: PauseEvent]
One of the currently defined PauseEvents.
INCISOR.speedControls
[type: dictionary]
Object housing all defined SpeedControls. SpeedControls can be used to control the speed of time-based sequencing processes such as Motions, Swoops, or Timelines. Applicable processes can subscribe to multiple SpeedControls - the 'speed' values of all of the SpeedControls a process subscribes to are multiplied together to determine the overall pacing of the given time-based process.
INCISOR.speedControls.MainSpeedControl
[type: SpeedControl]
One of the currently defined SpeedControls.
INCISOR.defaultPauseImmunity
[type: [PauseEvent], PauseEvent] [default: [nc.pauseEvents.MainPauseEvent]]
This is the pause immunity that is automatically applied if the 'pauseImmunity' parameter of any pausable-process-initiating method is left undefined. This value can be changed between big blocks of code to distinguish how groups of functionality react to different pauseEvents without needing to include specific 'pauseImmunity' for every single process initiated within each block.
INCISOR.defaultSpeedControl
[type: [SpeedControl], SpeedControl] [default: [nc.speedControls.MainSpeedControl]]
The SpeedControl(s) that are automatically applied if the 'speedControl' parameter is left undefined in any method that initiates a speed controllable process. This value can be changed between big blocks of code to distinguish how groups of functionality interact with different sets of SpeedControls without needing to include specific 'speedControl' parameters for every single applicable process initiated within each block.
INCISOR.defaultFocusFallback
[type: SceneObject] [default: undefined]
The default focusFallback value for new SceneObjects. This property can be changed at the top of any block of code where a lot of related SceneObjects are instantiated, and as a result all of those SceneObjects will receive the same new default focusFallback value.
INCISOR.targetFixedUpdateRate
[type: number] [default: 60]
The number of times per second that the fixedUpdate will occur.
INCISOR.targetScreenUpdateRate
[type: number] [default: 60]
The number of times per second that the screenUpdate will occur.
INCISOR.softwareSpeed
[type: number] [default: 1]
When changed from 1, this value will increase or decrease the pacing of the fixedUpdate (independently from the 'targetFixedUpdateRate'), as well as the playback rate of all sounds played. The screenUpdate is not effected by this value. Manipulating this value can serve as a 'fast-forward' for the entire project.
INCISOR.singularFocusObject
[type: SceneObject]
The singularFocusObject determines which callbacks connected to certain user-input AppEvents are invoked. For example, when a 'keyboardEvent' callback is added, a 'singularFocusRequirements' parameter can be supplied and that callback will only be invoked if the singularFocusObject is listed in the supplied 'singularFocusRequirements'. This is a way of adding keyboard AppEvent callbacks that will only be called if an associated contextual object is 'focused'.
INCISOR.singularFocusButtonPressRequirements
[type: [Button]] [default: undefined]
Optional array of Buttons that can be supplied while a given object is the singularFocusObject; any cursor press must then be within one of the given Buttons in order for that focus to be maintained. A cursor press anywhere outside of these buttons will result in nc.reliquishFocus to be called. When a TextBox is focused via editing or selecting, this value is automatically set to the TextBox, and as a result, any exterior cursor press un-focuses the TextBox. When this property is undefined, cursor presses do not affect focus at all.
INCISOR.hiddenUpdating
[type: boolean] [default: false;]
Flag determining if this project will continue its processes in any way while it is hidden by the OS.
INCISOR.hiddenScreenUpdating
[type: boolean] [default: false;]
Flag determining if this project's ScreenUpdate will occur while it is hidden by the OS.
INCISOR.maxReconciliationTime
[type: number] [default: 1;]
In the event that tasks within the 'fixedUpdate' and 'lateFixedUpdate' processes take longer than their alloted time for sustained periods, a sort of 'computational pile-up' can occur, where more instructions are scheduled per second that can be completed. This property limits the amount of 'catching up' that the system will try to do to, effectively allowing time to slip in these processes to avoid such computational pile-up. It should be noted that this value corresponds to the the maximum reconciliation time for when nc.hiddenUpdating is set to false.
INCISOR.maxHiddenReconciliationTime
[type: number] [default: 10;]
In the event that tasks within the 'fixedUpdate' and 'lateFixedUpdate' processes take longer than their alloted time for sustained periods, a sort of 'computational pile-up' can occur, where more instructions are scheduled per second that can be completed. This property limits the amount of 'catching up' that the system will try to do to, effectively allowing time to slip in these processes to avoid such computational pile-up. It should be noted that this value corresponds to the the maximum reconciliation time for when nc.hiddenUpdating is set to true.
INCISOR.isTouchCursor
[type: boolean]
Flag reflecting if the expected cursor events will be received via input from a touch screen.
INCISOR.loadingTiers
[type: dictionary]
Dictionary of loading tiers - each loading tier has a number designation. Loading tiers are a means to organize AssetComponents into separately downloadable groups.
INCISOR.loadingTiers.100
[type: number]
The numeric designation of the '100' loading tier.
INCISOR.multiTapInterval
[type: number] [default: 0.25]
The max amount of time between two Button presses for the Button presses to be considered part of the same 'doubleTap' or 'tripleTap'.
INCISOR.cameras
[type: dictionary]
Dictionary of all registered Cameras in this project.
INCISOR.cameras.MainCamera
[type: OrthographicCamera]
One of the currently defined Cameras.
INCISOR.mainCamera
[type: OrthographicCamera]
The 'MainCamera' Camera.
INCISOR.canvasElement
[type: HTMLCanvasElement]
The main canvas element for this project.
INCISOR.constants
[type: Constants]
Object housing predefined constant values for various Incisor® options and modes.
INCISOR.constructDefs
[type: dictionary]
Dictionary of available ConstructDefinitions.
INCISOR.customAddOnDefs
[type: dictionary] [NON-INSTANTIABLE]
A dictionary of the CustomAddOn definitions currently registered with this project. CustomAddOns are objects containing modular user-defined functionality that can be added to different types of SceneObjects in the GUI. The type of the particular CustomAddOn determines what type of SceneObject it can be added to. For example, a CustomAddOn_SceneObject can be added to all objects that inherit from SceneObject, while a CustomAddOn_Button can only be added to objects that inherit from Button. To add a CustomAddOn in code, simply create a new instance of the CustomAddOn, passing the owning object as the parameter. To make a CustomAddOn available in the Incisor inspector build a class that extends one of the CustomAddOn types within a 'codeAsset' file, then call 'nc.registerCustomAddOn' in a 'runBeforeInit' block to register the new CustomAddOn type with the GUI. Once a CustomAddOn is added to another object, it can be found in that object's 'customAddOns' member, which is a dictionary of CustomAddOns.
INCISOR.customObjectDefs
[type: dictionary] [NON-INSTANTIABLE]
A dictionary of the CustomObject definitions currently registered with this project. CustomAddOns are objects containing modular user-defined functionality that can be added to different types of SceneObjects in the GUI. The type of the particular CustomAddOn determines what type of SceneObject it can be added to. For example, a CustomAddOn_SceneObject can be added to all objects that inherit from SceneObject, while a CustomAddOn_Button can only be added to objects that inherit from Button. To add a CustomAddOn in code, simply create a new instance of the CustomAddOn, passing the owning object as the parameter. To make a CustomAddOn available in the Incisor inspector build a class that extends one of the CustomAddOn types within a 'codeAsset' file, then call 'nc.registerCustomAddOn' in a 'runBeforeInit' block to register the new CustomAddOn type with the GUI. Once a CustomAddOn is added to another object, it can be found in that object's 'customAddOns' member, which is a dictionary of CustomAddOns.
INCISOR.effectControllers
[type: dictionary]
Dictionary of EffectControllerDefinitions for all of the registered EffectControllers.
INCISOR.effectControllers.fillColor
[type: fillColor_Definition]
The info-object for the 'fillColor' EffectController.
INCISOR.effectControllers.mainTexture
[type: mainTexture_Definition]
The info-object for the 'mainTexture' EffectController.
INCISOR.effectControllers.colorMultiply
[type: colorMultiply_Definition]
The info-object for the 'colorMultiply' EffectController.
INCISOR.effectControllers.shapify
[type: shapify_Definition]
The info-object for the 'shapify' EffectController.
INCISOR.effectControllers.shear
[type: shear_Definition]
The info-object for the 'shear' EffectController.
INCISOR.effectControllers.shear_center
[type: shear_center_Definition]
The info-object for the 'shear_center' EffectController.
INCISOR.effectNodes
[type: dictionary]
Dictionary of all defined EffectNodes.
INCISOR.effectNodes.FillColor
[type: EffectNode]
One of the currently defined EffectNodes.
INCISOR.effectNodes.SampleMainTexture
[type: EffectNode]
One of the currently defined EffectNodes.
INCISOR.effectNodes.ColorMultiply
[type: EffectNode]
One of the currently defined EffectNodes.
INCISOR.effectNodes.Shapify
[type: EffectNode]
One of the currently defined EffectNodes.
INCISOR.effectNodes.MaskingReturn
[type: EffectNode]
One of the currently defined EffectNodes.
INCISOR.effectNodes.Shear
[type: EffectNode]
One of the currently defined EffectNodes.
INCISOR.fileIO
[type: FileIO] [requires: license - fileIO]
Object housing functionality to perform file IO tasks such as 'writeTextFile', 'moveTo', 'createDirectory' an more. This functionality only exists within un-built projects, and also requires that the user account has access to the FileIO features.
INCISOR.flows
[type: dictionary] [NON-INSTANTIABLE] [requires: license - proGaming, module - flowControllers]
The FlowControllers currently defined in this project. FlowControllers provide a way to organize the general flow of state-based items in a project. For example if your project is a game with an intro, a menu, and several levels, you could create a FlowController named "GameFlowController" and then define and add an 'Intro' FlowState, a 'Menu' FlowState, and 'LevelXX' FlowStates to that FlowController. Within each FlowState in the FlowController, timed callback elements can be added to help define the sequencing within each FlowState. Once created, FlowControllers, FlowStates, and FlowStateElements can be accessed via 'nc.flows'. This class is not meant to be instantiated or provided directly to 'FlowController.addFlowState', rather it is meant to be a class for user-defined FlowStates to extend. Call 'nc.defineFlowController' to create a new FlowController, then use 'nc.flows' to access it.
INCISOR.flows.incr_replaceText_flowControllersDocumentation
[type: dictionary]
INCISOR.fontNames
[type: dictionary]
Dictionary of the names of the fonts available within this project.
INCISOR.fontNames.NullFont
[type: string]
The 'NullFont' font name string.
INCISOR.fontNames.incr_inspectorFont
[type: string]
The 'incr_inspectorFont' font name string.
INCISOR.fontNames.MonoSpace
[type: string]
The 'MonoSpace' font name string.
INCISOR.geometries
[type: dictionary]
Dictionary of all registered Geometries.
INCISOR.geometries.WhiteBox
[type: Geometry]
One of the currently defined Geometries.
INCISOR.geometries.WhiteTriangle
[type: Geometry]
One of the currently defined Geometries.
INCISOR.geometries.NullFont_Char0
[type: Geometry]
One of the currently defined Geometries.
INCISOR.graphicAssets
[type: dictionary]
Dictionary of all registered GraphicAssets.
INCISOR.graphicAssets.WhiteBox
[type: GraphicAsset]
One of the currently defined GraphicAssets.
INCISOR.graphicAssets.WhiteTriangle
[type: GraphicAsset]
One of the currently defined GraphicAssets.
INCISOR.graphicAssets.NullFont_Char0
[type: GraphicAsset]
One of the currently defined GraphicAssets.
INCISOR.maskGroups
[type: dictionary]
The MaskGroups available in this project.
INCISOR.maskGroups.MainMaskGroup
[type: MaskGroup]
One of the currently defined MaskGroups.
INCISOR.incisorApp
[type: IncisorApp] [requires: unpublished only, license - advancedTools]
Object housing functionality allowing for direct interactions with the Incisor® application from within the javascript runtime. Such functionality includes the ability to get/set project and application settings, initiate the hosting of files in local directories, script the opening of new browser tabs, and perform other transactions with the Incisor® application.
INCISOR.incisorAppBasic
[type: IncisorAppBasic] [requires: unpublished only]
Object housing basic functionality allowing for direct interactions with the Incisor® application from within the javascript runtime. Such functionality includes the ability to get the list of optional code modules from the Incisor™ application. See 'nc.incisorApp' for many more application interaction options.
INCISOR.keyDownStates
[type: object]
Dictionary with the current state of each key on the keyboard, regardless of pause states or focused objects (see nc.singularFocusObject). This can be used used to check the state of modifier keys such as the 'shift' or 'option' key. If the key in question is down, this object will have a member (with the key as the name) that is true, otherise the member will be undefined.
INCISOR.motionTypes
[type: dictionary]
Object housing all defined MotionTypes. MotionTypes are used in conjunction with Motions and define a method of continuous change for numeric properties.
INCISOR.motionTypes.Pendulum
[type: MotionType]
The 'Pendulum' MotionType. This MotionType smoothly swings the value or values back and forth between the lower and upper bounds. While some MotionTypes are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
INCISOR.particleSystemDefs
[type: dictionary]
Dictionary of all registered ParticleSystemDefinitions.
INCISOR.particleSystemDefs.incr_replaceText_particleSystemsDocumentation
[type: dictionary]
INCISOR.paths
[type: Paths]
Object housing functionality manipulate paths including 'splitPath', 'getFileName', and 'getParentDirectory'.
INCISOR.pixelsObjects
[type: PixelsObjects] [requires: module - pixelsObjects]
Object housing functionality for PixelsObjects, which are RGBA bitmap images in a simple, 'data-only' format, used for basic image access and manipulation.
INCISOR.precomps
[type: dictionary]
Dictionary of Precomps
INCISOR.projectConfiguration
[type: ProjectConfiguration]
Object housing the configuration settings for this project. Many of the members of this object are customizable on a 'per configuration' basis by editing the 'ProjectSettings' file within the project. The user-customizable 'PreloadConfiguration' code is executed within this object, so members created within that code will be accessible on this object.
INCISOR.publishing
[type: Publishing] [requires: unpublished only, license - publishing]
Object housing functionality for publishing projects.
INCISOR.renderTargets
[type: dictionary]
Dictionary of all registered RenderTargets in this project. RenderTargets are objects that contain Textures to render to, as well as settings for how those textures may be resized automatically based on environmental factors such as canvas size, canvas aspect ratio, and the current asset package scale.
INCISOR.renderTargets.MainRenderTarget
[type: RenderTarget]
One of the currently defined RenderTargets.
INCISOR.globalRenderTargetResolutionScaler
[type: number] [default: 1]
Value that multiplies the resolution scale of all RenderTargets whose 'globalRenderTargetResolutionScaling' property is true.
INCISOR.mainRenderTarget
[type: RenderTarget]
The main canvas RenderTarget.
INCISOR.scenes
[type: dictionary]
Dictionary of all registered Scenes in this project. Scenes are the root SceneObjects in hierarchies. All SceneObjects are either Scenes or descendants of Scenes.
INCISOR.scenes.MainScene
[type: Scene]
One of the currently defined Scenes.
INCISOR.layers
[type: dictionary]
Dictionary of all registered Layers in this project.
INCISOR.layers.DefaultLayer
[type: Layer]
One of the currently defined Layers.
INCISOR.layers.PageLayer
[type: Layer]
One of the currently defined Layers.
INCISOR.layers.UiVisualFocusDimmerLayer
[type: Layer]
One of the currently defined Layers.
INCISOR.layers.UiVisualFocusLayer
[type: Layer]
One of the currently defined Layers.
INCISOR.mainScene
[type: Scene]
The 'MainScene' Scene.
INCISOR.layersByScene
[type: LayersByScene]
A 2D dictionary that lists the available Layers in each Scene. These dictionaries are not ordered, for the order of the Layers in a given Scene, see 'Scene.layerOrderLedger'.
INCISOR.sounds
[type: dictionary] [requires: module - sounds]
Dictionary of all registered Sounds.
INCISOR.sounds.incr_replaceText_soundsDocumentation
[type: dictionary]
INCISOR.volumeControls
[type: dictionary] [requires: module - sounds]
Dictionary of all registered VolumeControls.
INCISOR.volumeControls.incr_replaceText_volumeControlsDocumentation
[type: dictionary]
INCISOR.tweenTypes
[type: dictionary]
Object housing all defined TweenTypes. TweenTypes are used in conjunction with 'Swoopers' and define a method of numeric property interpolation between any two values or sets of values. TweenTypes can vary the timing of interpolation between two sets of values, as well as the path of the interpolation.
INCISOR.tweenTypes.Linear
[type: TweenType]
The 'Linear' TweenType. This TweenType interpolates linearly between the current value/values and the end value/values. While some TweenTypes are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
INCISOR.tweenTypes.Ease
[type: TweenType]
The 'Ease' TweenType. This TweenType interpolates between the current value/values and the end value/values smoothly, accelerating from the starting values, and decelarating as the ending values are approached. While some TweenTypes are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
INCISOR.tweenTypes.ExtremeEaseOut
[type: TweenType]
The 'ExtremeEaseOut' TweenType. This TweenType changes very slowly at first and speeds up. While some TweenTypes are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
INCISOR.tweenTypes.ExtremeEaseIn
[type: TweenType]
The 'ExtremeEaseIn' TweenType. This TweenType changes very quickly at first and slows down. While some TweenTypes are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
INCISOR.mainModifierKey
[type: string] [default: "Control"]
The name of the keyboard key that serves as the main modifier key for keyboard input. For example while editing the text in a TextBox, the nc.mainModifierKey + the "A" key will select all.
INCISOR.textures
[type: dictionary]
Dictionary of all registered Textures.
INCISOR.textures.incr_icons_sheet0
[type: Texture]
One of the currently defined Textures.
INCISOR.textures."NotoSansMono_Condensed-Medium0"
[type: Texture]
One of the currently defined Textures.
INCISOR.textures.incr_inspectorFont0
[type: Texture]
One of the currently defined Textures.
INCISOR.textures.WhiteBox
[type: Texture]
One of the currently defined Textures.
INCISOR.textures.NullFont_Char0
[type: Texture]
One of the currently defined Textures.
INCISOR.timeStamp
[type: TimeStamp] [requires: module - timeStamp]
Object housing functionality for time stamps, the Incisor® standardized format for date and time.
INCISOR.phraseIDs
[type: dictionary]
Dictionary of the phraseIDs contained in the ProjectTranscript. Using phraseIDs to populate TextBoxes and TextAssemblies will enable the text content to be dynamically populated based on the current language setting of the project.
INCISOR.phraseIDs."Hello World"
[type: string]
One of the phrases defined in the ProjectTranscript.
INCISOR.phraseIDs."Goodbye World"
[type: string]
One of the phrases defined in the ProjectTranscript.
INCISOR.phrases
[type: dictionary]
Dictionary of the phrases contained in the ProjectTranscript (listed by phraseID). Using phraseIDs to populate TextBoxes and TextAssemblies will enable the text content to be dynamically populated based on the current language setting of the project.
INCISOR.phrases."Hello World"
[type: string]
One of the phrases defined in the ProjectTranscript.
INCISOR.phrases."Goodbye World"
[type: string]
One of the phrases defined in the ProjectTranscript.
INCISOR.uiStyle
[type: UiStyle] [requires: module - extendedUi]
Object housing default TextFormats, and Colors for various Gui objects such as 'UiButton', 'DropDownMenu' and 'PopUpWindow'.
INCISOR.enableIncisorInspectorAutoPositioning
[type: boolean] [default: false] [requires: module - extendedUi]
Boolean determining if certain automatic positioning features specifically related to the Incisor Inspector are enabled. It should be noted that the Incisor Inspector uses a non-standard coordinate system with (0,0) in the upperleft corner. Automatica positioning features include: automatic placement of UiPopupWindows in the center of the screen and automatic adjustment of UiMenus to avoid them extending outside of the Inspector viewing area.
INCISOR.useNearestPixelRenderingForAllUiItems
[type: boolean] [default: true]
Boolean determining if 'useNearestPixelRendering' defaults to true for 'UI' items such as UiButton or UiText. In general, you should use 'useNearestPixelRendering' for situations when the area being rendered is the same exact resolution as the RenderTarget it's being used to; it is a means to have 'pixel perfect' TextBox rendering. If the camera is rendering a variable area or an area that doesn't match the RenderTarget being rendered to (such such as when the camera's adaptiveCameraMode is set to 'maximizeSafeZone') then 'useNearestPixelRendering' should not be used and this value should be false;
INCISOR.visualFocusObject
[type: UiVisualFocus] [requires: module - extendedUi]
Read-only property denoting which object (if any) is currently visually focused. 'VisualFocus' is a mode that focuses the end-user's attention the given SceneObject by placing it in front of a dimmer layer whenever the object is the the current 'singularFocusObject'. See 'SceneObject.configureUiVisualFocus' for more information.
INCISOR.visualFocusEnabled
[type: boolean] [default: true] [requires: module - extendedUi]
Boolean determining if the entire Visual Focus system is enabled. 'VisualFocus' is a mode that focuses the end-user's attention the given SceneObject by placing it in front of a dimmer layer whenever the object is the the current 'singularFocusObject'. See 'SceneObject.configureUiVisualFocus' for more information.
INCISOR.visualFocusDimmerAmount
[type: number] [default: .5]
Number determining how strong the visual focus dimmer is on a scale of 0 to 1.
INCISOR.uiZoom
[type: UiZoom]
Object housing functionality associated with the user interface zoom, which enables end-users to increase or decrease the overall size of text and other user interface items (when those items have uiZoom functionality enabled).
INCISOR.urlParameterIterator
[type: UrlParameterIterator] [requires: module - urlParameterIterator]
Object housing testing functionality that enables a project to refresh itself repeatedly with different url parameters. Such functionality can help with batch testing of a project's configurations or settings. To use this functionality, first call the 'UrlParameterIteration.setup' method, passing it an array of objects where each object represents the url parameters you would like the browser to refresh with. When ready to start the iteration, call 'UrlParameterIteration.start'. Then add the desired functionality per url parameter - be sure to implement what you want conditionally based on the url params (otherwise everything will happen on every refresh). When the desired tasks (testing, screen shots, etc...) have completed for each set of url parameters, call 'UrlParameterIteration.next', this will proceed to refresh with the next set of url parameters.
INCISOR.incisorExtensions_project
[type: object] [requires: unpublished only, license - extensions]
The object housing the Incisor project extensions scope. This property will be undefined if the requirements are met, or if there are no project extensions.
INCISOR.incisorExtensions_global
[type: object] [requires: unpublished only, license - extensions]
The object housing the Incisor global extensions scope. This property will be undefined if the requirements are met, or if there are no global extensions.
INCISOR.defineAppEvent(eventName, hasSingularFocusScheme, isOrdered, hasConsumableCallbacks)
[type: function] [returns: AppEvent]
Defines a new custom Incisor® AppEvent that can have callbacks added and can be triggered using 'AppEvent.trigger'.
INCISOR.defineAppEvent parameter: eventName
[type: string]
The name of the new AppEvent being defined.
INCISOR.defineAppEvent parameter: hasSingularFocusScheme
[type: boolean] [default: false] [optional]
Flag indicating if this AppEvent will have a 'singular focus scheme' which is a system that restricts callback invocation to items associated with the currently 'focused' object as determined by nc.singularFocusObject.
INCISOR.defineAppEvent parameter: isOrdered
[type: boolean] [default: false] [optional]
Flag indicating if this AppEvent will be 'ordered', which allows callbacks added to this AppEvent to be provided a callback order number, which is then used to sort the callbacks when the AppEvent is triggered.
INCISOR.defineAppEvent parameter: hasConsumableCallbacks
[type: boolean] [default: false] [optional]
Flag indicating if this AppEvent removes callbacks after one invocation.
example:
// Objective: Trigger a custom AppEvent.
// Expected Result: You will see a green square.
// create a white box GraphicObject
this.whiteBox = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "WhiteBox" );
// define a custom AppEvent and add its callback
nc.defineAppEvent( "MyCustomAppEvent" );
nc.appEvents.MyCustomAppEvent.addCallback( this, "myAppEventCallback" );
// the AppEvent callback will update the fillColor of the box
this.myAppEventCallback = function( r, g, b, a ) {
this.whiteBox.fillColor = new Color( r, g, b, a );
}
// trigger my AppEvent passing in parameters as an array (set the red and blue to zero)
nc.appEvents.MyCustomAppEvent.trigger( [0, 1, 0, 1] );
INCISOR.definePauseEvent(pauseEventName)
[type: function] [returns: PauseEvent]
Defines a new PauseEvent. The various time-based and user-interaction processes in Incisor® can be paused by calling 'nc.pause' with a PauseEvent parameter. Pausable processes can also opt out of being paused by providing a 'pauseImmunity' list during their initiation (as will be indicated in initiating method parameters). The pauseImmunity list is a list of PauseEvents that the given process will be immune to. All defined PauseEvents can be found at 'nc.pauseEvents'.
INCISOR.definePauseEvent parameter: pauseEventName
[type: string]
The name of the new PauseEvent.
INCISOR.pause(pauseEvent)
[type: function]
Pauses the various time-based and user-interaction processes that can be paused by the supplied PauseEvent. Processes that list the supplied PauseEvent in their 'pauseImmunity' will be immune to this pause.
INCISOR.pause parameter: pauseEvent
[type: PauseEvent]
The PauseEvent being triggered. Available PauseEvents can be found in 'nc.pauseEvents'.
example:
// Objective: Pause and resume motion.
// Expected Result: The white box will move up and down along the y axis for 3 seconds, then pause for 3 seconds, then resume again.
// create a GraphicObject with the white box asset
let graphic = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "Box" );
// add motion to the position of this GraphicObject along the y axis with a motion speed of 2
graphic.position.addMotion.y( -300, 300, 2 );
// create a PauseEvent
nc.definePauseEvent("BoxPause");
// wait 3 seconds, then call "pause", passing BoxPause as the PauseEvent
nc.waitThen( 3, nc, "pause", [nc.pauseEvents.BoxPause] );
// wait 6 seconds, then call "resume"
// NOTE: At this point, "resume" is paused by the BoxPause event. This is why we must also
// pass the BoxPause event as the "pauseImmunity" parameter.
nc.waitThen( 6, nc, "resume", nc.pauseEvents.BoxPause , undefined, nc.pauseEvents.BoxPause );
INCISOR.resume(pauseEvent)
[type: function]
Resumes the processes that were paused by the supplied PauseEvent. Some processes may not resume if they are still being affected by other PauseEvents.
INCISOR.resume parameter: pauseEvent
[type: PauseEvent]
The PauseEvent being resumed. Available PauseEvents can be found in 'nc.pauseEvents'.
example:
// Objective: Pause and resume motion.
// Expected Result: The white box will move up and down along the y axis for 3 seconds, then pause for 3 seconds, then resume again.
// create a GraphicObject with the white box asset
let graphic = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "Box" );
// add motion to the position of this GraphicObject along the y axis with a motion speed of 2
graphic.position.addMotion.y( -300, 300, 2 );
// create a PauseEvent
nc.definePauseEvent("BoxPause");
// wait 3 seconds, then call "pause", passing BoxPause as the PauseEvent
nc.waitThen( 3, nc, "pause", [nc.pauseEvents.BoxPause] );
// wait 6 seconds, then call "resume"
// NOTE: At this point, "resume" is paused by the BoxPause event. This is why we must also
// pass the BoxPause event as the "pauseImmunity" parameter.
nc.waitThen( 6, nc, "resume", nc.pauseEvents.BoxPause , undefined, nc.pauseEvents.BoxPause );
INCISOR.defineSpeedControl(speedControlName)
[type: function] [returns: SpeedControl]
Defines a new SpeedControl. SpeedControls can be used to control the speed of time-based sequencing processes such as Motions, Swoops, or Timelines. Applicable processes can subscribe to multiple SpeedControls; the 'speed' values of all of the SpeedControls a process subscribes to are multiplied together to determine the overall pacing of the given time-based process. All defined SpeedControls can be found at 'nc.speedControls'.
INCISOR.defineSpeedControl parameter: speedControlName
[type: string]
The name of the new SpeedControl.
INCISOR.getAllEventRecipients()
[type: function] [returns: object]
Returns a dictionary containing lists of all active callbacks per AppEvent.
INCISOR.relinquishFocus()
[type: function]
Sets nc.singularFocusObject to nc.singularFocusObject.focusFallback.
INCISOR.copyToClipboard(text)
[type: function]
Copies the given text to the clipboard.
INCISOR.copyToClipboard parameter: text
[type: string]
The text to be copied to the clipboard.
INCISOR.getClipboardText()
[type: function] [returns: string]
Retrieves text from the clipboard.
INCISOR.loadTier(tier, prioritize)
[type: function]
Initiates the process of loading all of the assets in a given loading tier. This function does not need to be called for 'auto-loaded' LoadingTiers.
INCISOR.loadTier parameter: tier
[type: number]
The desired tier for loading. For a list of available LoadingTiers, see nc.LoadingTiers.
INCISOR.loadTier parameter: prioritize
[type: boolean] [default: true] [optional]
Bool determining if the tier in question will jump to the frot of the loading queue.
INCISOR.addTierLoadedCallback(tiers, callbackOwner, callbackName, callbackArgs, callbackOrder)
[type: function]
Adds a callback that will be called once the designated tier(s) are loaded. A callback order can be provided to rank the order of the given callback.
INCISOR.addTierLoadedCallback parameter: tiers
[type: number, [number]]
The tier or tiers whose loading will trigger this callback.
INCISOR.addTierLoadedCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
INCISOR.addTierLoadedCallback parameter: callbackName
[type: string]
The name of the callback function.
INCISOR.addTierLoadedCallback parameter: callbackArgs
[type: Array, any] [optional]
Arguments for the callback function.
INCISOR.addTierLoadedCallback parameter: callbackOrder
[type: number] [default: 0] [optional]
Number designating the order the callback will be invoked relative to the other callbacks associated with this tier. A lower callbackOrder equates to an earlier callback.
INCISOR.awaitLoadedTiers(tiers)
[type: function]
An awaitable asyncronous function that delays until the specified tier(s) are loaded.
INCISOR.awaitLoadedTiers parameter: tiers
[type: number, [number]]
The tier or tiers whose loading is being awaited.
INCISOR.inheritButton(obj, graphicAsset, parent, name)
[type: function]
Adds Button functionality to the object supplied.
INCISOR.inheritButton parameter: obj
[type: object]
The object that Button functionality is being added to.
INCISOR.inheritButton parameter: graphicAsset
[type: GraphicAsset] [default: nc.graphicAssets.WhiteBox] [optional]
The GraphicAsset that the new Button will initially be set to. For a list of available GraphicAssets, see 'nc.graphicAssets'.
INCISOR.inheritButton parameter: parent
[type: SceneObject] [default: nc.mainScene] [optional]
The SceneObject that will become the new Button's parent in the Scene hierarchy.
INCISOR.inheritButton parameter: name
[type: string] [default: 'Button'] [optional]
The name of the new Button.
INCISOR.addButton(graphicAsset, parent, name)
[type: function] [returns: Button]
Adds a Button set to the provided GraphicAsset as a child of the given SceneObject.
INCISOR.addButton parameter: graphicAsset
[type: GraphicAsset] [default: nc.graphicAssets.WhiteBox] [optional]
The GraphicAsset that the new Button will initially be set to. For a list of available GraphicAssets, see 'nc.graphicAssets'.
INCISOR.addButton parameter: parent
[type: SceneObject] [default: nc.mainScene] [optional]
The SceneObject that will become the new Button's parent in the Scene hierarchy.
INCISOR.addButton parameter: name
[type: string] [default: 'Button'] [optional]
The name of the new Button.
example:
// Objective: Use Incisor to add a Button.
// Expected Result: The console should display all of the properties of the new button.
let button = nc.addButton( nc.graphicAssets.WhiteBox, nc.mainScene, "MyButton" );
console.log(button);
INCISOR.inheritOrthographicCamera(obj, parent, name)
[type: function]
Adds OrthographicCamera functionality to the object supplied.
INCISOR.inheritOrthographicCamera parameter: obj
[type: object]
The object that Camera functionality is being added to.
INCISOR.inheritOrthographicCamera parameter: parent
[type: SceneObject] [default: nc.mainScene] [optional]
The parent of the new Camera.
INCISOR.inheritOrthographicCamera parameter: name
[type: string] [optional]
The name of the new Camera.
INCISOR.addOrthographicCamera(parent, name)
[type: function] [returns: OrthographicCamera]
Adds an OrthographicCamera to the given parent.
INCISOR.addOrthographicCamera parameter: parent
[type: SceneObject] [default: nc.mainScene] [optional]
The SceneObject that will become the new OrthographicCamera's parent.
INCISOR.addOrthographicCamera parameter: name
[type: string] [default: OrthographicCamera] [optional]
The name of the new OrthographicCamera. This name must be unique among camera names.
INCISOR.getCanvasPixelResolution()
[type: function] [returns: Vector2]
Returns a Vector2 with the pixel resolution of nc.mainRenderTarget.
INCISOR.defineConstruct(name, blueprint)
[type: function] [returns: ConstructDefinition]
A means to manually create a ConstructDefinition. It should be noted that most users will not need to use this function, as Constructs are typically created in the Incisor® GUI.
INCISOR.defineConstruct parameter: name
[type: string]
The name of the new ConstructDefinition. This name must be a unique class name, must not start with digits, and must not contain special characters or spaces.
INCISOR.defineConstruct parameter: blueprint
[type: Blueprint] [optional]
Object containing the core instructions for recreating the collection of objects that will define this Construct. The function 'nc.gatherObjectBlueprint' can be used to get a Blueprint object from a pre-existing object. If this parameter is left undefined, then an empty Construct is defined.
INCISOR.gatherObjectBlueprint(sceneObject, includeRoot, includeDescendants)
[type: function]
This function can be used to collect the core information needed to define a Construct based on a group of objects whithin a Scene. Just provide a root SceneObject and information about its entire sub-hierarchy will be gathered and returned in the form of a 'Blueprint' object, which can then be used to define Constructs using 'nc.defineConstruct'. It should be noted that most users will not need to use this functionality; it is used in the Creation of Constructs, which are typically just created in the Incisor® GUI.
INCISOR.gatherObjectBlueprint parameter: sceneObject
[type: SceneObject]
The root SceneObject to gather a Blueprint for.
INCISOR.gatherObjectBlueprint parameter: includeRoot
[type: boolean] [default: true] [optional]
If true, the provided root will be included in the construct, if false the root will be omitted.
INCISOR.gatherObjectBlueprint parameter: includeDescendants
[type: boolean] [default: true] [optional]
Boolean determining if the descendants will be included in the gathered blueprint.
INCISOR.recreateObjectFromBlueprint(parent, blueprint)
[type: function] [returns: SceneObject]
Recreates the objects stored in the Blueprint, placing them in the provided parent SceneObject, and returning the newly created root-most object(s). This functionality is the foundation for Incisor® Constructs.
INCISOR.recreateObjectFromBlueprint parameter: parent
[type: SceneObject]
The SceneObject that will be the parent of the newly recreated collection of objects.
INCISOR.recreateObjectFromBlueprint parameter: blueprint
[type: Blueprint]
The blueprint containing the information about the collection of objects that will be recreated.
INCISOR.duplicateViaBlueprint(source, parent, includeDescendants)
[type: function] [returns: SceneObject]
Duplicates the given source object according to its 'blueprint', which is the serialized form of objects used by Constructs. It should be noted that this form of duplication will only capture values for standard components and properties - customizations will be lost in the process.
INCISOR.duplicateViaBlueprint parameter: source
[type: SceneObject]
The source object for the duplication.
INCISOR.duplicateViaBlueprint parameter: parent
[type: SceneObject]
The SceneObject that will become the new copy's parent.
INCISOR.duplicateViaBlueprint parameter: includeDescendants
[type: boolean] [default: true] [optional]
Boolean determining if the source object's descendants will be included in the duplicate.
INCISOR.inheritCursorInputOverrideButton(obj, graphicAsset, parent, name)
[type: function]
Adds CursorInputOverrideButton functionality to the object supplied.
INCISOR.inheritCursorInputOverrideButton parameter: obj
[type: object]
The object that CursorInputOverrideButton functionality is being added to.
INCISOR.inheritCursorInputOverrideButton parameter: graphicAsset
[type: GraphicAsset] [default: nc.graphicAssets.WhiteBox] [optional]
The GraphicAsset that the new CursorInputOverrideButton will initially be set to. For a list of available GraphicAssets, see 'nc.graphicAssets'.
INCISOR.inheritCursorInputOverrideButton parameter: parent
[type: SceneObject] [default: nc.mainScene] [optional]
The SceneObject that will become the new CursorInputOverrideButton's parent in the Scene hierarchy.
INCISOR.inheritCursorInputOverrideButton parameter: name
[type: string] [default: 'CursorInputOverrideButton'] [optional]
The name of the new CursorInputOverrideButton.
INCISOR.inheritCurve(obj, parent, name)
[type: function]
Adds Curve functionality to the object supplied.
INCISOR.inheritCurve parameter: obj
[type: object]
The object that Curve functionality is being added to.
INCISOR.inheritCurve parameter: parent
[type: SceneObject]
The SceneObject that will become the new Curve's parent in the Scene hierarchy.
INCISOR.inheritCurve parameter: name
[type: string] [default: 'Curve']
The name of the new Curve.
INCISOR.addCurve(parent, name)
[type: function]
Adds a SceneObject as a child of the given SceneObject.
INCISOR.addCurve parameter: parent
[type: SceneObject]
The SceneObject that will become the new Curve's parent in the Scene hierarchy.
INCISOR.addCurve parameter: name
[type: string] [default: 'Curve']
The name of the new Curve.
INCISOR.registerCustomAddOn(classDefinition)
[type: function] [returns: CustomAddOnDefinition]
Registers the given class definition as a CustomAddOn with the Incisor inspector.
Once registered, instances of the given object can be added to other objects using the GUI (in the Construct Editor etc...).
INCISOR.registerCustomAddOn parameter: classDefinition
[type: object]
The desired class definition to register with the Incisor inspector as a CustomAddOn. The provided class definition must inherit from a 'CustomAddOn' type such as 'CustomAddOn_SceneObject' or 'CustomAddOn_GraphicObject'.
INCISOR.registerCustomAddOnProperty(classDefinition, propertyType, propertyPath)
[type: function] [returns: RegisteredProperty]
Registers a property of the given CustomAddOn with Incisor. Registered properties are accessible for monitoring and manipulating
within the inspector. Registered properties can also be flagged as 'persistent', which enables their values to be stored in containing Constructs.
INCISOR.registerCustomAddOnProperty parameter: classDefinition
[type: object]
The class definition of the CustomAddOn for which to register a property.
INCISOR.registerCustomAddOnProperty parameter: propertyType
[type: string]
The type of the property to register. The available types can be found in constants.registeredPropertyTypes
INCISOR.registerCustomAddOnProperty parameter: propertyPath
[type: [string], string]
The path to the desired property to register in terms of member names. If the property owned directly by the CustomAddOn, the name of the property can be provided as a single string. If the property is a sub-member of a property, each accessing member should be listed in an Array, or a single 'dot-separated' string can be provided.
INCISOR.registerCustomObject(classDefinition)
[type: function] [returns: CustomObjectDefinition]
Registers the given class definition as a CustomObject with the Incisor inspector.
Once registered, instances of the given object can be added to Constructs using the GUI (in the Construct Editor etc...).
INCISOR.registerCustomObject parameter: classDefinition
[type: object]
The desired class definition to register with the Incisor inspector as a CustomObject. The provided class definition must inherit from a standard hierarchy object type such as SceneObject, GraphicObject, or Button etc...
INCISOR.registerCustomObjectProperty(classDefinition, propertyType, propertyPath)
[type: function] [returns: RegisteredProperty]
Registers a property of the given CustomObject with Incisor. Registered properties are accessible for monitoring and manipulating
within the inspector. Registered properties can also be flagged as 'persistent', which enables their values to be stored in containing Constructs.
INCISOR.registerCustomObjectProperty parameter: classDefinition
[type: object]
The class definition of the CustomObject for which to register a property.
INCISOR.registerCustomObjectProperty parameter: propertyType
[type: string]
The type of the property to register. The available types can be found in constants.registeredPropertyTypes
INCISOR.registerCustomObjectProperty parameter: propertyPath
[type: [string], string]
The path to the desired property to register in terms of member names. If the property owned directly by the CustomObject, the name of the property can be provided as a single string. If the property is a sub-member of a property, each accessing member should be listed in an Array, or a single 'dot-separated' string can be provided.
INCISOR.dispose(objectForDisposal)
[type: function]
Removes the provided object from all Incisor® registries. Send any object slated for deletion to this function to ensure that references to the object are not being kept in Incisor®'s regestries. Doing this can help prevent memory leaks.
INCISOR.dispose parameter: objectForDisposal
[type: object]
The object that will be disposed.
INCISOR.defineEffectController(name, baseType, componentNames, defaultValues, mixMode, likelyRanges, effectControllerDescription, componentDescriptions)
[type: function]
Defines a new EffectController for use in conjunction with an EffectNode. EffectControllers provide the ability to dynamically control EffectNodes and their resulting visual effects. EffectControllers are generally one of 3 base types, Vectors, numbers, and Textures. Once defined, EffectControllers will be generally available on all SceneObjects, Materials, MaterialMaster, CharacterMaterial objects; It should be noted that while these objects will have all EffectControllers as members, only the EffectControllers tied to the objects' current EffectNodes will cause any change visually. It should also be noted EffectControllers with 'mixMode=materialOnly' will not be available on SceneObjects for inheritance, and will instead only be on Material and MaterialMaster objects for direct manipulation.
INCISOR.defineEffectController parameter: name
[type: string]
The name of the new EffectController. This name must be unique, and it must not contain any javascript delimeters (no spaces, commas, periods, etc...)
INCISOR.defineEffectController parameter: baseType
[type: string]
The base type of the new EffectController. For a list of available base types, see 'nc.constants.effectControllerBaseTypes'.
INCISOR.defineEffectController parameter: componentNames
[type: [string]]
An array of names for the components of this EffectController. An example would be ['magnitude', 'brightness', 'fadeAmount']. It should be noted that EffectControllers with componentNames ["red","green","blue","alpha"] will automatically have type 'Color', and similarly componentNames ["x","y", etc...] will have the associated 'Vector' type. For non-Vector types this can be left undefined.
INCISOR.defineEffectController parameter: defaultValues
[type: [number], number, Texture]
An array of numbers (for Vector baseTypes), number (for number baseTypes), or Texture (for Texture baseTypes) that serve as the default value(s) for this EffectController's components.
INCISOR.defineEffectController parameter: mixMode
[type: string]
The means by which parent and child EffectControllers' values are blended together. Please note that a mixMode value of 'materialOnly' means that the given EffectController will only appear directly on Material and MaterialMaster objects, and therefore no mixing of values will ever take place. For a list of available mixModes, see 'nc.constants.effectControllerMixModes'.
INCISOR.defineEffectController parameter: likelyRanges
[type: [[number]]] [default: [[0,10] [optional]
A list of likely ranges for the components of this EffectController. This is used to inform the Incisor® GUI, specifically the sensativity of EffectoController 'sliders'.,[0,10]...]]
INCISOR.defineEffectController parameter: effectControllerDescription
[type: string] [default: ""] [optional]
Optional description to help populate IDE autocomplete related to this EffectController.
INCISOR.defineEffectController parameter: componentDescriptions
[type: [string], string] [default: [] [optional]
Optional list of component descriptions to help populate IDE autocomplete related to this EffectController.]
INCISOR.defineEffectNode(name, vertexNodeSupport, vertexNode, fragmentNodeSupport, fragmentNode, associatedEffectControllers, requiresDerivativesShaderExtension, requiresFragDepthShaderExtension, requiresDrawBuffersShaderExtension, requiresTextureLODShaderExtension)
[type: function] [returns: EffectNode]
Defines a new EffectNode. Defined EffectNodes are available at 'nc.effectNodes'. EffectNodes are GPU-driven visual effects assigned to SceneObjects, GraphicObjects, and ultimately Materials. Each EffectNode can be manipulated dynamically by one or more EffectControllers, which are accessable as direct members of the given SceneObject or Material. When a GraphicObject is set to a particular GraphicAsset, it's Materials adopt the GraphicAsset's EffectNode and EffectController presets by default, but they can be customized at any time.
INCISOR.defineEffectNode parameter: name
[type: string]
The name of the new EffectNode. This name must be unique among EffectNodes.
INCISOR.defineEffectNode parameter: vertexNodeSupport
[type: [string], string]
The portion of the GLSL shader code for this EffectNode above the 'vertex main'. This segment of code is where uniform and varying variables for the vertex portion of this effect are likely to be declared.
INCISOR.defineEffectNode parameter: vertexNode
[type: string]
The portion of the GLSL shader code for this EffectNode within the 'vertex main'. This segment of code is is where this effect can make its adjustments to the 'vertex' vec3.
INCISOR.defineEffectNode parameter: fragmentNodeSupport
[type: [string], string]
The portion of the GLSL shader code for this EffectNode above the 'fragment main'. This segment of code is where uniform and varying variables for the fragment portion of this effect are likely to be declared.
INCISOR.defineEffectNode parameter: fragmentNode
[type: string]
The portion of the GLSL shader code for this EffectNode within the 'fragment main'. This segment of code is is where this effect can make its adjustments to the 'fragment' vec4.
INCISOR.defineEffectNode parameter: associatedEffectControllers
[type: [EffectControllerDefinition], EffectControllerDefinition]
The array of the EffectController that this EffectNode is associated with. These EffectControllers will be the means of dynamic manipulation for this EffectNode's visual effects. See 'nc.effectControllers' for a list of available EffectControllers.
INCISOR.defineEffectNode parameter: requiresDerivativesShaderExtension
[type: boolean] [default: false] [optional]
Boolean determining if the shader of any Material with this EffectNode is compiled to support the 'FragDepth' extension.
INCISOR.defineEffectNode parameter: requiresFragDepthShaderExtension
[type: boolean] [default: false] [optional]
Boolean determining if the shader of any Material with this EffectNode is compiled to support the 'FragDepth' extension.
INCISOR.defineEffectNode parameter: requiresDrawBuffersShaderExtension
[type: boolean] [default: false] [optional]
Boolean determining if the shader of any Material with this EffectNode is compiled to support the 'DrawBuffers' extension.
INCISOR.defineEffectNode parameter: requiresTextureLODShaderExtension
[type: boolean] [default: false] [optional]
Boolean determining if the shader of any Material with this EffectNode is compiled to support the 'TextureLOD' extension.
INCISOR.defineFlowController(name)
[type: function]
Defines a new FlowController
FlowControllers provide a way to organize the general flow of state-based items in a project.
For example if your project is a game with an intro, a menu, and several levels,
you could create a FlowController named "GameFlowController" and then define and add an 'Intro' FlowState,
a 'Menu' FlowState, and 'LevelXX' FlowStates to that FlowController. Within each FlowState in the FlowController,
timed callback elements can be added to help define the sequencing within each FlowState.
Once created, FlowControllers, FlowStates, and FlowStateElements can be accessed via 'nc.flows'.
This class is not meant to be instantiated or provided directly to 'FlowController.addFlowState', rather it is meant
to be a class for user-defined FlowStates to extend.
Use 'nc.flows' to access the newly defined FlowController.
INCISOR.defineFlowController parameter: name
[type: string]
The name of the new FlowController
INCISOR.defineGeometry(name, createBox)
[type: function] [returns: GeometryEditor]
Defines a new square 100x100 Geometry, and returns a GeometryEditor object for further customization.
INCISOR.defineGeometry parameter: name
[type: string]
The name of the new Geometry being defined. This name must be unique among Geometries.
INCISOR.defineGeometry parameter: createBox
[type: boolean] [default: true]
Whether to initialize the geometry with a 100x100 box with positon and uv attributes.
INCISOR.editGeometry(geometry, callbackOwner, callbackName, callbackArgs)
[type: function] [returns: GeometryEditor]
Asyncronously retrieves a GeometryEditor to enable the editing of the Geometry provided. Please note that before you attempt to do any editing, the source Geometry must be loaded; you must either asyncronously await this function call, or provide a callback, which will be called once the souece Geometry is loaded. The first parameter of the callback will be the desired GeometryEditor.
INCISOR.editGeometry parameter: geometry
[type: Geometry]
The source Geometry to be edited.
INCISOR.editGeometry parameter: callbackOwner
[type: object] [optional]
The object owning the callback that will be called when the source Geometry loads.
INCISOR.editGeometry parameter: callbackName
[type: string] [optional]
The name of the callback that will be called when the source Geometry loads.
INCISOR.editGeometry parameter: callbackArgs
[type: Array, any] [optional]
The arguments for the callback that will be called when the source Geometry loads.
INCISOR.defineGraphicAssetFromPixelsObject(name, pixelsObject, includeNormals)
[type: function] [returns: GraphicAsset]
Defines a new GraphicAsset from a supplied PixelsObject. See 'nc.graphicAssets' for a list of all available GraphicAssets.
INCISOR.defineGraphicAssetFromPixelsObject parameter: name
[type: string]
The name of the new GraphicAsset. This name must be unique among registered GraphicAssets, Geometries, and Textures.
INCISOR.defineGraphicAssetFromPixelsObject parameter: pixelsObject
[type: PixelsObject]
The PixelsObject that will be the source for this new GraphicAsset.
INCISOR.defineGraphicAssetFromPixelsObject parameter: includeNormals
[type: boolean] [default: false] [optional]
Boolean determining if the vertex data in the geometry of the new GraphicAsset will have the 'normals' attribute.
INCISOR.defineGraphicAssetFromRenderTarget(name, renderTarget, disconnectFromRenderTarget, includeNormals)
[type: function] [returns: GraphicAsset]
Defines a new GraphicAsset based on the RenderTarget supplied. Unless otherwise specified, this GraphicAsset will have a dynamic connection to the RenderTarget, so that if the RenderTarget is rendered to, GraphicObjects set to this new GraphicAsset will reflect new contents of the RenderTarget. See 'nc.graphicAssets' for a list of all available GraphicAssets.
INCISOR.defineGraphicAssetFromRenderTarget parameter: name
[type: string]
The name of the new GraphicAsset. This name must be unique among registered GraphicAssets, Geometries, and Textures.
INCISOR.defineGraphicAssetFromRenderTarget parameter: renderTarget
[type: RenderTarget]
The RenderTarget that will be the source for this new GraphicAsset.
INCISOR.defineGraphicAssetFromRenderTarget parameter: disconnectFromRenderTarget
[type: boolean] [default: false] [optional]
Boolean determining if the new GraphicAsset will maintain a dynamic connection to the supplied RenderTarget.
INCISOR.defineGraphicAssetFromRenderTarget parameter: includeNormals
[type: boolean] [default: false] [optional]
Boolean determining if the vertex data in the geometry of the new GraphicAsset will have the 'normals' attribute.
INCISOR.defineGraphicAssetFromTextureAndGeometry(name, texture, geometry)
[type: function] [returns: GraphicAsset]
Defines a new GraphicAsset based on the Texture and Geometry supplied. See 'nc.graphicAssets' for a list of all available GraphicAssets.
INCISOR.defineGraphicAssetFromTextureAndGeometry parameter: name
[type: string]
The name of the new GraphicAsset. This name must be unique among registered GraphicAssets.
INCISOR.defineGraphicAssetFromTextureAndGeometry parameter: texture
[type: Texture]
The Texture that will be the source Texture for this new GraphicAsset.
INCISOR.defineGraphicAssetFromTextureAndGeometry parameter: geometry
[type: Geometry]
The Geometry that will be the source Geometry for this new GraphicAsset.
INCISOR.inheritGraphicObject(obj, graphicAsset, parent, name)
[type: function]
Adds GraphicObject functionality to the object supplied.
INCISOR.inheritGraphicObject parameter: obj
[type: object]
The object that GraphicObject functionality is being added to.
INCISOR.inheritGraphicObject parameter: graphicAsset
[type: GraphicAsset] [default: nc.graphicAssets.WhiteBox] [optional]
The GraphicAsset that the new GraphicObject will initially be set to. For a list of available GraphicAssets, see 'nc.graphicAssets'.
INCISOR.inheritGraphicObject parameter: parent
[type: SceneObject] [default: nc.mainScene] [optional]
The SceneObject that will become the new GraphicObject's parent in the Scene hierarchy.
INCISOR.inheritGraphicObject parameter: name
[type: string] [default: 'GraphicObject'] [optional]
The name of the new GraphicObject.
INCISOR.addGraphicObject(graphicAsset, parent, name)
[type: function] [returns: GraphicObject]
Adds a GraphicObject set to the provided GraphicAsset as a child of the given SceneObject.
INCISOR.addGraphicObject parameter: graphicAsset
[type: GraphicAsset] [default: nc.graphicAssets.WhiteBox] [optional]
The GraphicAsset that the new GraphicObject will initially be set to. For a list of available GraphicAssets, see 'nc.graphicAssets'.
INCISOR.addGraphicObject parameter: parent
[type: SceneObject] [default: nc.mainScene] [optional]
The SceneObject that will become the new GraphicObject's parent in the Scene hierarchy.
INCISOR.addGraphicObject parameter: name
[type: string] [default: 'GraphicObject'] [optional]
The name of the new GraphicObject.
example:
// Objective: Use Incisor to add a GraphicObject, rotate it, change its color and move its position.
// Expected Result: You should see a blue, diamond shaped box, moved up and left of center.
let graphicObject = nc.addGraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "MyGraphicObject" );
// rotate 45 degrees around the z axis to create a "diamond" shape
graphicObject.rotation.z = 45;
// set the red and green channels to zero to make the box blue
graphicObject.colorMultiply.red = 0;
graphicObject.colorMultiply.green = 0;
// move the box up and to the left
graphicObject.position.x = -500;
graphicObject.position.y = 500;
INCISOR.defineMaskGroup(maskGroupName)
[type: function] [returns: MaskGroup]
Defines a new MaskGroup. MaskGroups can be used to selectively render partial areas of GraphicObjects. Once a MaskGroup is defined, GraphicObjects can be made into 'masks', which results in their shape contributing to the MaskGroup area. GraphicObjects can also be made into 'masked', which results in them only rendering within the designated MaskGroup area. Please note that the masking area is calculated off of the full-fill Geometry of the 'mask' GraphicObjects; the transperancy of pixels within a 'mask' GraphicObject does not make any difference to masking.
INCISOR.defineMaskGroup parameter: maskGroupName
[type: string]
The name of the new MaskGroup. This must be a unique name among MaskGroups.
example:
// Objective: Use a mask to reveal only a portion of the phrase "Hello World."
// Expected Result: You will see the word "World." on screen.
// define "MyMask"
let maskGroup = nc.defineMaskGroup( "MyMask" );
// create a TextBox
let textBox = nc.addTextBox( nc.mainScene );
textBox.string = "Hello World.";
textBox.masking.makeMasked( nc.maskGroups.MyMask ); // mask it with "MyMask"
// create a GraphicObject rectangle and position it to cover the word "World."
this.masker = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "Masker" );
this.masker.scale.x = 2; // rectangle
this.masker.position.x = 75; // position
this.masker.masking.makeMask( nc.maskGroups.MyMask ); // make it a masker for "MyMask"
INCISOR.inheritLayoutStack(obj, parent, name)
[type: function]
Adds LayoutStack functionality to the object supplied.
INCISOR.inheritLayoutStack parameter: obj
[type: object]
The object that LayoutStack functionality is being added to.
INCISOR.inheritLayoutStack parameter: parent
[type: SceneObject] [optional]
The SceneObject that will become the new LayoutStack's parent in the Scene hierarchy.
INCISOR.inheritLayoutStack parameter: name
[type: string] [default: 'LayoutStack'] [optional]
The name of the new LayoutStack.
INCISOR.addLayoutStack(parent, name)
[type: function] [returns: LayoutStack]
Adds a LayoutStack as a child of the given SceneObject.
INCISOR.addLayoutStack parameter: parent
[type: SceneObject] [optional]
The SceneObject that will be the new LayoutStack's parent.
INCISOR.addLayoutStack parameter: name
[type: string] [default: 'LayoutStack'] [optional]
The name of the new LayoutStack.
example:
// Objective: Use a LayoutStack to vertically align elements.
// Expected Result: You will see 3 elements stacked vertically.
// create a TextAssembly
let text = new TextAssembly( nc.mainScene, "MyText" );
text.string = "With Incisor, you need only build it once.";
// create a white box GraphicObject
let whiteBox = new GraphicObject( nc.graphicAssets.whiteBox, nc.mainScene, "MyWhiteBox" );
// create a link
let link = new TextBox( nc.mainScene, "MyButton" );
link.string = "Click Here";
link.colorMultiply = new Color( 0, 0, 1, 1 );
link.scale.x = .5;
link.scale.y = .5;
// add a LayoutStack to the main Scene and add 3 elements to it
let layoutStack = nc.addLayoutStack( nc.mainScene, "MyLayoutStack" );
layoutStack.addElements( [text, whiteBox, link ] );
layoutStack.isVertical = true; // set vertical alignment
INCISOR.inheritLazyUpdater(obj, updateCallbackOwner, updateCallbackName, updateCallbackArgs)
[type: function]
Adds LazyUpdater functionality to the object supplied.
INCISOR.inheritLazyUpdater parameter: obj
[type: object]
The object that LazyUpdater functionality is being added to.
INCISOR.inheritLazyUpdater parameter: updateCallbackOwner
[type: object]
The object owning the callback function being managed by this LazyUpdater.
INCISOR.inheritLazyUpdater parameter: updateCallbackName
[type: string]
The name of the callback function being managed by this LazyUpdater.
INCISOR.inheritLazyUpdater parameter: updateCallbackArgs
[type: Array, any] [optional]
Arguments for the callback function.
INCISOR.inheritMaterial(obj)
[type: function]
Adds Material functionality to the object supplied.
INCISOR.inheritMaterial parameter: obj
[type: object]
The object that Material functionality is being added to.
INCISOR.inheritMatrix4(obj)
[type: function]
Adds Matrix4 functionality to the object supplied.
INCISOR.inheritMatrix4 parameter: obj
[type: object]
The object that Martix4 functionality is being added to.
INCISOR.defineMotionType(name, motionFunction, motionControllerNames, motionControllerDefaultValues, description, controllerDescriptions)
[type: function] [returns: MotionType]
Defines a new MotionType. MotionTypes are used in conjunction with 'Motions' and define a method of continuous change for numeric properties. The MotionType 'Pendulum' is automatically defined, which defines a smooth sinusoidal oscillation between the lower and upper bounds. All defined MotionTypes can be found at 'nc.motionTypes'.
INCISOR.defineMotionType parameter: name
[type: string]
The name of the new MotionType.
INCISOR.defineMotionType parameter: motionFunction
[type: function]
The function controlling the continuous change of the numeric properties being affected by the Motion using this MotionType. This function should be implemented to take a single 'Motion' parameter, using it's 'progress', 'lowerBound', 'upperBound', 'motionSpeed', and 'motionArgs' members to calculate and return an array of current values.
INCISOR.defineMotionType parameter: motionControllerNames
[type: [string]] [optional]
The names of optional controllers that can be used to dynamically affect the nature of the motion type.
INCISOR.defineMotionType parameter: motionControllerDefaultValues
[type: [number]] [optional]
The default values of optional controllers that can be used to dynamically affect the nature of the motion type.
INCISOR.defineMotionType parameter: description
[type: string] [optional]
The description of the MotionType - this will appear in the autocomplete documentation.
INCISOR.defineMotionType parameter: controllerDescriptions
[type: [string]] [optional]
The descriptions of the MotionType controllers - these will appear in the autocomplete documentation.
example:
// Objective: Define a custom MotionType.
// Expected Result: The white box will move continuously in a circular motion.
function moveInCircleFunction(motion) {
let progress = motion.progress;
// Calculate circle center and radius.
let centerX = (motion.lowerBounds[0]+motion.upperBounds[0])*.5;
let centerY = (motion.lowerBounds[1]+motion.upperBounds[1])*.5;
let radiusX = motion.upperBounds[0]-centerX;
let radiusY = motion.upperBounds[1]-centerY;
// Apply circle math.
motion.currentValues[0]=centerX+radiusX*Math.cos(progress*Math.PI);
motion.currentValues[1]=centerY+radiusY*Math.sin(progress*Math.PI);
motion.currentValues[2]=0;
}
// Define 'MoveInCircle' Motion
nc.defineMotionType(
"MoveInCircle",
moveInCircleFunction,
undefined,
undefined,
"This MotionType moves x and y components in a circle."
);
// Create a GraphicObject.
let graphicObject = new GraphicObject();
// Add a motion to the GraphicObject's position using the 'MoveInCircle' TweenType. A 'Motion' object is returned and can be manipulted.
let motion = graphicObject.position.addMotion.each([-300,-100,0],[300,100,10],1,nc.motionTypes.MoveInCircle);
INCISOR.addMotion(propertyOwners, propertyNames, lowerBounds, upperBounds, motionSpeed, motionType, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Motion]
Adds a motion defining a continuous change a given numeric property or set of properties, and returns a Motion object, which can be used to control the motion dynamically.
INCISOR.addMotion parameter: propertyOwners
[type: object, [object]]
The object or array of objects owning the numeric properties to add motion to.
INCISOR.addMotion parameter: propertyNames
[type: string, [string]]
The name or array of names of the numeric properties to add motion to.
INCISOR.addMotion parameter: lowerBounds
[type: number, [number]]
The lower bounds for the motion being added.
INCISOR.addMotion parameter: upperBounds
[type: number, [number]]
The upper bounds for the motion being added.
INCISOR.addMotion parameter: motionSpeed
[type: number] [default: 1] [optional]
The speed factor for the added motion.
INCISOR.addMotion parameter: motionType
[type: MotionType] [default: nc.motionTypes.Pendulum] [optional]
The MotionType, determining the nature of the motion being added.
INCISOR.addMotion parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Motion will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
INCISOR.addMotion parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Motion is affected by.
INCISOR.addMotion parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the motion.
INCISOR.addMotion parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the motion.
example:
// Objective: Add motion to the white box along the x axis.
// Expected Result: The white box should continuously move back and forth.
let whiteSquare = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "WhiteSquare" );
// add motion to the "x" property of the position of the white square
nc.addMotion( whiteSquare.position, "x", -500, 500, .5 );
INCISOR.defineParticleSystem(name)
[type: function] [returns: ParticleSystemDefinition]
Defines a new ParticleSystemDefinition. This can then be used to instantiate a new ParticleSystem. Multiple ParticleSystemDefinitions that use the same ParticleSystemDefinition will share the Geometry and EffectNode created by the ParticleSystemDefinition. Therefore, creation of additional ParticleSystemDefinitions that use the same ParticleSystemDefinition incur much less memory usage and initialization time compared to multiple ParticleSystemDefinitions that each use their own ParticleSystemDefinition.
INCISOR.defineParticleSystem parameter: name
[type: string]
The name of the ParticleSystemDefinition.
INCISOR.addParticleSystem(particleSystemDefinition, parent, name, pauseImmunity, speedControl)
[type: function] [returns: ParticleSystem]
Adds a ParticleSystem set to the provided ParticleSystemDefinition as a child of the given SceneObject.
INCISOR.addParticleSystem parameter: particleSystemDefinition
[type: ParticleSystemDefinition] [default: nc.particleSystemDefs.MainParticleSystem] [optional]
The definition used to build this ParticleSystem. If left undefined, then 'MainParticleSystem' will be chosen - if 'MainParticleSystem' is not yet defined, it will automatically be defined and then used as the default.
INCISOR.addParticleSystem parameter: parent
[type: SceneObject] [default: nc.mainScene] [optional]
The SceneObject that will become the new ParticleSystem's parent in the Scene hierarchy.
INCISOR.addParticleSystem parameter: name
[type: string] [default: 'ParticleSystem'] [optional]
The name of the new ParticleSystem.
INCISOR.addParticleSystem parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this ParticleSystem will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
INCISOR.addParticleSystem parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this ParticleSystem is affected by.
example:
// Objective: Add a ParticleSystem.
// Expected Result: You will see white triangles continuously "bursting" out from the center of the screen.
// add a ParticleSystem using the predefined "BurstWithGravity" ParticleSystemDefinition
let particles = nc.addParticleSystem( nc.particleSystemDefs.BurstWithGravity, nc.mainScene, "MyParticles" );
particles.playbackController.play();
INCISOR.inheritParticleSystemRamp1(obj)
[type: function]
Adds ParticleSystemRamp1 functionality to the object supplied.
INCISOR.inheritParticleSystemRamp1 parameter: obj
[type: object]
The object that ParticleSystemRamp1 functionality is being added to.
INCISOR.inheritParticleSystemRamp2(obj)
[type: function]
Adds ParticleSystemRamp2 functionality to the object supplied.
INCISOR.inheritParticleSystemRamp2 parameter: obj
[type: object]
The object that ParticleSystemRamp2 functionality is being added to.
INCISOR.inheritParticleSystemRamp3(obj)
[type: function]
Adds ParticleSystemRamp3 functionality to the object supplied.
INCISOR.inheritParticleSystemRamp3 parameter: obj
[type: object]
The object that ParticleSystemRamp3 functionality is being added to.
INCISOR.inheritParticleSystemRamp4(obj)
[type: function]
Adds ParticleSystemRamp4 functionality to the object supplied.
INCISOR.inheritParticleSystemRamp4 parameter: obj
[type: object]
The object that ParticleSystemRamp4 functionality is being added to.
INCISOR.inheritSceneObject(obj, parent, name)
[type: function]
Adds SceneObject functionality to the object supplied.
INCISOR.inheritSceneObject parameter: obj
[type: object]
The object that SceneObject functionality is being added to.
INCISOR.inheritSceneObject parameter: parent
[type: SceneObject] [optional]
The SceneObject that will become the new SceneObject's parent in the Scene hierarchy.
INCISOR.inheritSceneObject parameter: name
[type: string] [default: 'SceneObject'] [optional]
The name of the new SceneObject.
INCISOR.definePrecomp(name, coreWidth, coreHeight, autoRender)
[type: function] [returns: Precomp]
Defines a new Precomp with the given name.
INCISOR.definePrecomp parameter: name
[type: string]
The name of the new Precomp. This name must be unique among Precomps, GraphicAssets, Geometries, and Textures.
INCISOR.definePrecomp parameter: coreWidth
[type: number]
The number informing the initial coreViewWidth of the Precomp's Camera, and the initial coreWidth of the Precomp's RenderTarget.
INCISOR.definePrecomp parameter: coreHeight
[type: number]
The number informing the initial coreViewHeight of the Precomp's Camera, and the initial coreHeight of the Precomp's RenderTarget.
INCISOR.definePrecomp parameter: autoRender
[type: boolean]
The initial 'autoRender' setting for the Precomp's Camera. It should be noted that if autoRender is set to false, an internal callback will automatically render this Precomp once when its content is loaded.
INCISOR.inheritRenderTarget(obj, name, coreWidth, coreHeight)
[type: function]
Adds RenderTarget functionality to the supplied object.
INCISOR.inheritRenderTarget parameter: obj
[type: object]
The object to give RenderTarget funcionality to.
INCISOR.inheritRenderTarget parameter: name
[type: string]
The name given to the RenderTarget. This name must be unique.
INCISOR.inheritRenderTarget parameter: coreWidth
[type: number]
The base width value of this RenderTarget, prior to the application of any automatic resolution or aspect ratio adjustments that can occur.
INCISOR.inheritRenderTarget parameter: coreHeight
[type: number]
The base height value of this RenderTarget, prior to the application of any automatic resolution or aspect ratio adjustments that can occur.
INCISOR.sanitizeNameForCode(name)
[type: function] [returns: string]
Sanitizes the provided name to make it suitable for code by removing any leading digits, spaces, or special characters.
INCISOR.sanitizeNameForCode parameter: name
[type: string]
The name to be sanitized.
INCISOR.getAncestors(sceneObject)
[type: function] [returns: [SceneObject]]
Returns a list of all of the ancesters of the given SceneObject. Ancesters consist of the SceneObject's parent, and that parent's parent, etc...
INCISOR.getAncestors parameter: sceneObject
[type: SceneObject]
The SceneObject whose ancestors will be listed.
INCISOR.getDescendants(sceneObject, enabledOnly, includeEnclosedScenes)
[type: function] [returns: [SceneObject]]
Returns a list of all of the descendants of the given SceneObject. Descendants consist of the SceneObject's children, and their children, etc...
INCISOR.getDescendants parameter: sceneObject
[type: SceneObject]
The SceneObject whose descendants will be listed.
INCISOR.getDescendants parameter: enabledOnly
[type: boolean] [default: true]
Boolean determining if only enabled SceneObjects are added to the returned list.
INCISOR.getDescendants parameter: includeEnclosedScenes
[type: boolean]
Boolean determining if sub-descendants of ScrollingPanels' Scenes will be included in the returned list. [DAFAULT: false]
INCISOR.addSceneObject(parent, name)
[type: function] [returns: SceneObject]
Adds a SceneObject as a child of the given SceneObject.
INCISOR.addSceneObject parameter: parent
[type: SceneObject] [optional]
The SceneObject that will be the new SceneObject's parent.
INCISOR.addSceneObject parameter: name
[type: string] [default: 'SceneObject'] [optional]
The name of the new SceneObject.
example:
// Objective: Add a SceneObject with a graphic and rotate it.
// Expected Result: The white box has rotated 45 degrees into a diamond shape.
// Create a SceneObject using the SceneObject constructor. This will add "MySceneObject" to the main scene.
let mySceneObject = nc.addSceneObject( nc.mainScene, "MySceneObject" );
// Add a GraphicObject to the SceneObject using the GraphicObject constructor.
// Note: To use a custom graphic, add your image file to the assets directory and access it using nc.graphicAssets['MyImage']
new GraphicObject( nc.graphicAssets.WhiteBox, mySceneObject, "MyGraphicObject" );
// Rotate the SceneObject 45 degrees around the z axis.
mySceneObject.rotation.z = 45;
INCISOR.assessCumulativeLoadingTierRequirements(sceneObject, ignoreCachedAssessment)
[type: function] [returns: [number]]
Returns the list of LoadingTiers that must be loaded for the given SceneObject, its descendants, and all Textures and Geometries to be fully loaded.
INCISOR.assessCumulativeLoadingTierRequirements parameter: sceneObject
[type: SceneObject]
The SceneObject whose LoadingTier will be assessed.
INCISOR.assessCumulativeLoadingTierRequirements parameter: ignoreCachedAssessment
[type: boolean] [default: false] [optional]
Boolean determining if any cached assessments will be ignored, forcing an entirely new assessment to be made.
INCISOR.inheritScene(obj, name)
[type: function]
Adds Scene functionality to the object supplied.
INCISOR.inheritScene parameter: obj
[type: object]
The object that Scene functionality is being added to.
INCISOR.inheritScene parameter: name
[type: string]
The name of the new Scene.
INCISOR.defineLayer(name, scene, placeBehindThisLayer)
[type: function]
Defines a new Layer within a Scene.
INCISOR.defineLayer parameter: name
[type: string]
The name of the new Layer.
INCISOR.defineLayer parameter: scene
[type: Scene] [default: nc.mainScene] [optional]
The Scene in which to define a new layer.
INCISOR.defineLayer parameter: placeBehindThisLayer
[type: Layer] [default: nc.layers.DefaultLayer] [optional]
Supply this optional Layer, and the newly defined Layer will be populated behind the provided Layer.
INCISOR.addScene(name)
[type: function] [returns: Scene]
Adds a Scene to the project.
INCISOR.addScene parameter: name
[type: string] [default: 'Scene'] [optional]
The name of the new Scene. The name of the Scene must be unique.
INCISOR.saveScreenShot(path, isPathRelative)
[type: function] [returns: string]
Saves a screen shot of the project, and returns the path of the new screen shot.
INCISOR.saveScreenShot parameter: path
[type: string]
The path to the screenshot. If left undefined, a timestamped screen shot will be placed in the directory indicated by 'ProjectSettings.screenShotDestination'.
INCISOR.saveScreenShot parameter: isPathRelative
[type: boolean]
Boolean determining if the screen shot's path is relative to the project.
INCISOR.inheritScrollingPanel(obj, parent, name)
[type: function]
Adds ScrollingPanel functionality to the object supplied.
INCISOR.inheritScrollingPanel parameter: obj
[type: object]
The object that ScrollingPanel functionality is being added to.
INCISOR.inheritScrollingPanel parameter: parent
[type: SceneObject] [optional]
The SceneObject that will become the new ScrollingPanel's parent in the Scene hierarchy.
INCISOR.inheritScrollingPanel parameter: name
[type: string] [default: 'ScrollingPanel'] [optional]
The name of the new ScrollingPanel.
INCISOR.defineSyncedLoopingTrackGroup(name, includedSounds)
[type: function]
Defines a new group of sounds that will stay synced while looping. Sounds in HTML5 run on a separate thread from the main javascript thread, and as a result there can be small delays between the instructions to play sounds, and when the sounds actually play. These discrepancies can lead to difficulty with keeping multiple looping tracks in sync. This function creates a group of sounds whose instructions are linked in a way that keeps them in sync, regardless of pausing/resuming, changes to volume, or lazy-loaded sounds starting mid-stream. [REQUIREMENT: module - sounds]
INCISOR.defineSyncedLoopingTrackGroup parameter: name
[type: string]
The name of the new SyncedLoopingTrackGroup. This name must be unique among SyncedLoopingTrackGroups.
INCISOR.defineSyncedLoopingTrackGroup parameter: includedSounds
[type: [Sound]]
Array of Sounds to include in the SyncedLoopingTrackGroup.
INCISOR.defineVolumeControl(name)
[type: function] [returns: VolumeControl]
Defines a new VolumeControl. VolumeControls are a way to control the volumes of groups of sounds, much like a 'audio bus'. To make a particular Sound subscribe to a VolumeControl, add the VolumeControl to the Sound's 'volumeControl' array. [REQUIREMENT: module - sounds]
INCISOR.defineVolumeControl parameter: name
[type: string]
The name of the new VolumeControl. This name must be unique among VolumeControls.
INCISOR.inheritSupervisor(obj, owner)
[type: function]
Adds Supervisor functionality to the object supplied.
INCISOR.inheritSupervisor parameter: obj
[type: object]
The object that Supervisor functionality is being added to.
INCISOR.inheritSupervisor parameter: owner
[type: SceneObject]
The SceneObject owning the visual components associated with the Supervisor.
INCISOR.defineTweenType(name, tweenFunction, tweenControllerNames, tweenControllerDefaultValues, description, controllerDescriptions)
[type: function] [returns: TweenType]
Defines a new TweenType. TweenTypes are used in conjunction with Swoopers and define a method of interpolation between any two values or sets of values. The TweenType 'Linear' is automatically defined, and it defines a perfectly even interpolation between the startValues and endValues. TweenTypes can vary the timing of interpolation between two sets of values, as well as the path of the interpolation. All defined TweenTypes can be found at 'nc.tweenTypes'.
INCISOR.defineTweenType parameter: name
[type: string]
The name of the new TweenType.
INCISOR.defineTweenType parameter: tweenFunction
[type: function]
The function controlling the interpolation between values. This function should be implemented to take a single 'Swooper' parameter, using it's 'progress', 'startValues', 'endValues', and 'tweenArgs' members to calculate and set its 'currentValues' property.
INCISOR.defineTweenType parameter: tweenControllerNames
[type: [string]] [optional]
The names of optional controllers that can be used to dynamically affect the nature of the motion for this TweenType.
INCISOR.defineTweenType parameter: tweenControllerDefaultValues
[type: [number]] [optional]
The default values of th optional controllers that can be used to dynamically affect the nature of the motion for this TweenType.
INCISOR.defineTweenType parameter: description
[type: string] [optional]
The description of the TweenType - this will appear in the autocomplete documentation.
INCISOR.defineTweenType parameter: controllerDescriptions
[type: [string]] [optional]
The descriptions of the TweenType controllers - these will appear in the autocomplete documentation.
example:
// Objective: Define a custom TweenType.
// Expected Result: The white box will zigzag while moving up along the y axis.
// create a white box
let graphic = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "Box" );
// define a TweenType function. Use the given swooper progress
// to update the box's position as it completes its swoop
let myTweenFunction = function( swooper ) {
let progress = swooper.progress;
let updatedX = swooper.currentValues[0] ? swooper.currentValues[0] : 0;
let updatedY = swooper.endValues[1] * progress;
if ( progress < .20 ) {
updatedX += 10 * progress;
} else if ( progress >= .20 && progress < .40 ) {
updatedX -= 8 * progress;
} else if ( progress >= .40 && progress < .60 ) {
updatedX += 6 * progress;
} else if ( progress >= .60 && progress < .80 ) {
updatedX -= 4 * progress;
} else {
updatedX += 2 * progress;
}
swooper.currentValues = [ updatedX, updatedY, 0 ];
}
// define the TweenType with our custom function and swoop the box's position
let myTweenType = nc.defineTweenType( "MyTweenType", myTweenFunction );
graphic.position.swoop.each( [0,500,0], 10, myTweenType );
INCISOR.swoopValue(propertyOwner, propertyName, endValue, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs, pauseImmunity, speedControl, updaterCallbackOwner, updaterCallbackName)
[type: function] [returns: Swooper]
Swoops (interpolates) a given numeric property from its current value to a designated end value over a duration.
INCISOR.swoopValue parameter: propertyOwner
[type: object]
The object owning the numeric property to be swooped.
INCISOR.swoopValue parameter: propertyName
[type: string]
The name of the numeric property to be swooped.
INCISOR.swoopValue parameter: endValue
[type: number]
The ending value for the numeric property being swooped.
INCISOR.swoopValue parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation.
INCISOR.swoopValue parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
INCISOR.swoopValue parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
INCISOR.swoopValue parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
INCISOR.swoopValue parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
INCISOR.swoopValue parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
INCISOR.swoopValue parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
INCISOR.swoopValue parameter: updaterCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the swooping process.
INCISOR.swoopValue parameter: updaterCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the swooping process.
example:
// Objective: Adjust the motion speed of a "bouncing" white box.
// Expected Result: The white box will bounce, gradually slowing down over a period of 5 seconds, then it will gradually speed back up over a period of 5 seconds.
// Create a GraphicObject using the white box GraphicAsset and add it to the main Scene.
let myGraphicObject = new GraphicObject( nc.graphicAssets.whiteBox, nc.mainScene, "MyGraphicObject" );
// Give the box motion along the y axis. Set the speed to 2.
myGraphicObject.position.addMotion.y(-300,300,2);
// Swoop the 'speed' property of the MainSpeedControl down to .05 over a period of 5 seconds and provide callback arguments to swoop the 'speed' property again back up to speed 1 over a period of 10 seconds.
nc.swoopValue(
nc.speedControls.MainSpeedControl,
"speed",
.05,
5,
undefined,
nc,
"swoopValue",
[nc.speedControls.MainSpeedControl, "speed", 1, 10]
);
INCISOR.swoopValues(propertyOwners, propertyNames, endValues, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs, pauseImmunity, speedControl, updaterCallbackOwner, updaterCallbackName)
[type: function] [returns: Swooper]
Swoops (interpolates) a given set of numeric properties from their current values to a designated set of end values over a duration.
INCISOR.swoopValues parameter: propertyOwners
[type: [object]]
The object or objects owning the numeric properties to be swooped.
INCISOR.swoopValues parameter: propertyNames
[type: [string]]
The names of the numeric property to be swooped.
INCISOR.swoopValues parameter: endValues
[type: [number]]
The ending values for the numeric properties being swooped.
INCISOR.swoopValues parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation.
INCISOR.swoopValues parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
INCISOR.swoopValues parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
INCISOR.swoopValues parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
INCISOR.swoopValues parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
INCISOR.swoopValues parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
INCISOR.swoopValues parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
INCISOR.swoopValues parameter: updaterCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the swooping process.
INCISOR.swoopValues parameter: updaterCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the swooping process.
INCISOR.inheritTextAssembly(obj, parent, name)
[type: function]
Adds TextAssembly functionality to the object supplied.
INCISOR.inheritTextAssembly parameter: obj
[type: object]
The object that TextAssembly functionality is being added to.
INCISOR.inheritTextAssembly parameter: parent
[type: SceneObject] [optional]
The SceneObject that will become the new TextAssembly's parent in the Scene hierarchy.
INCISOR.inheritTextAssembly parameter: name
[type: string] [optional]
The name of the new TextAssembly.
INCISOR.addTextAssembly(parent, name)
[type: function] [returns: TextAssembly]
Adds a TextAssembly as a child of the given SceneObject.
INCISOR.addTextAssembly parameter: parent
[type: SceneObject] [default: nc.mainScene] [optional]
The SceneObject that will become the new TextAssembly's parent in the Scene hierarchy.
INCISOR.addTextAssembly parameter: name
[type: string] [default: 'TextBox'] [optional]
The name of the new TextAssembly.
example:
// Objective: Add a TextAssembly.
// Expected Result: You will see the text "Incisor - Build It Once." on screen.
let textAssembly = nc.addTextAssembly( nc.mainScene );
textAssembly.string = "Incisor - Build It Once."
INCISOR.inheritTextBox(obj, parent, name)
[type: function]
Adds TextBox functionality to the object supplied.
INCISOR.inheritTextBox parameter: obj
[type: object]
The object that TextBox functionality is being added to.
INCISOR.inheritTextBox parameter: parent
[type: SceneObject] [optional]
The SceneObject that will become the new TextBox's parent in the Scene hierarchy.
INCISOR.inheritTextBox parameter: name
[type: string] [optional]
The name of the new TextBox.
INCISOR.addTextBox(parent, name)
[type: function] [returns: TextBox]
Adds a TextBox as a child of the given SceneObject.
INCISOR.addTextBox parameter: parent
[type: SceneObject] [default: nc.mainScene] [optional]
The SceneObject that will become the new TextBox's parent in the Scene hierarchy.
INCISOR.addTextBox parameter: name
[type: string] [default: 'TextBox'] [optional]
The name of the new TextBox.
example:
// Objective: Add a TextBox.
// Expected Result: You will see the text "Incisor - Build It Once." on screen.
let textBox = nc.addTextBox( nc.mainScene );
textBox.string = "Incisor - Build It Once."
INCISOR.inheritTextFormat(obj, fontName, characterScaleX, characterScaleY, kerning, verticalShift, lineHeightMultiplier)
[type: function]
Adds TextFormat functionality to the object supplied.
INCISOR.inheritTextFormat parameter: obj
[type: object]
The object that TextFormat functionality is being added to.
INCISOR.inheritTextFormat parameter: fontName
[type: string] [default: "MainFont"] [optional]
The name of the font that characters with this TextFormat will use.
INCISOR.inheritTextFormat parameter: characterScaleX
[type: number] [default: 1] [optional]
The x-axis scale multiplier for the characters that use this TextFormat.
INCISOR.inheritTextFormat parameter: characterScaleY
[type: number] [default: 1] [optional]
The y-axis scale multiplier for the characters that use this TextFormat.
INCISOR.inheritTextFormat parameter: kerning
[type: number] [default: 0] [optional]
Number representing an added or reduced spacing between the characters that use this TextFormat
INCISOR.inheritTextFormat parameter: verticalShift
[type: number] [default: 0] [optional]
Number representing a veritcal offset that will be applied to the characters that use this TextForamt.
INCISOR.inheritTextFormat parameter: lineHeightMultiplier
[type: number] [default: 1] [optional]
Number that multiplies the effective layout height of the characters that use this TextFormat.
INCISOR.defineTexture(name, pixelsObject)
[type: function] [returns: Texture]
Defines a new Texture from a supplied PixelsObject. For a list of all available Textures, see 'nc.textures'.
INCISOR.defineTexture parameter: name
[type: string]
The name of the new Texture. This name must be unique among registered Textures.
INCISOR.defineTexture parameter: pixelsObject
[type: PixelsObject]
The PixelsObject that will be the source for this new Texture.
INCISOR.getPhrase(phraseID, dynamicValues)
[type: function] [returns: string]
Retrieves the given phrase from the ProjectTranscript.
This function is similar to using 'nc.phrases' to fetch phrases, but additionaly it includes a parameter
that can be used to populate dynamic values in phrases with dynamic value tags (i.e. '{value:myDynamicValue}').
To populate a dynamic value in a phrase containing a dynamic value tag, include a dictionary with the dynamic
values in the 'dynamicValues' parameter (i.e. {myDynamicValue:1000}).
INCISOR.getPhrase parameter: phraseID
[type: string]
The ID of the phrase to be fetched. A dictionary of phraseIDs can be found at 'nc.phraseIDs'.
INCISOR.getPhrase parameter: dynamicValues
[type: object] [optional]
Optional dictionary of dynamic values to be populated within the phrase.
INCISOR.inheritUiBooleanSupervisor_checkbox(obj, parent, name)
[type: function]
Adds UiBooleanSupervisor_checkbox functionality to the object supplied. [REQUIREMENT: module - extendedUi]
INCISOR.inheritUiBooleanSupervisor_checkbox parameter: obj
[type: object]
The object that UiBooleanSupervisor_checkbox functionality is being added to.
INCISOR.inheritUiBooleanSupervisor_checkbox parameter: parent
[type: SceneObject] [optional]
The SceneObject that will become the new UiBooleanSupervisor_checkbox's parent in the Scene hierarchy.
INCISOR.inheritUiBooleanSupervisor_checkbox parameter: name
[type: string] [default: 'UiBooleanSupervisor_checkbox'] [optional]
The name of the new UiBooleanSupervisor_checkbox.
INCISOR.inheritUiButton(obj, parent, name)
[type: function]
Adds UiButton functionality to the object supplied. [REQUIREMENT: module - extendedUi]
INCISOR.inheritUiButton parameter: obj
[type: object]
The object that UiButton functionality is being added to.
INCISOR.inheritUiButton parameter: parent
[type: SceneObject] [optional]
The SceneObject that will become the new UiButton's parent in the Scene hierarchy.
INCISOR.inheritUiButton parameter: name
[type: string] [default: 'UiButton'] [optional]
The name of the new UiButton.
INCISOR.inheritUiCollapsibleStack(obj, parent, name)
[type: function]
Adds UiCollapsibleStack functionality to the object supplied. [REQUIREMENT: module - extendedUi]
INCISOR.inheritUiCollapsibleStack parameter: obj
[type: object]
The object that UiCollapsibleStack functionality is being added to.
INCISOR.inheritUiCollapsibleStack parameter: parent
[type: SceneObject] [optional]
The SceneObject that will become the new UiCollapsibleStack's parent in the Scene hierarchy.
INCISOR.inheritUiCollapsibleStack parameter: name
[type: string] [default: 'UiCollapsibleStack'] [optional]
The name of the new UiCollapsibleStack.
INCISOR.inheritUiDropDownButton(obj, parent, name)
[type: function]
Adds UiDropDownMenu functionality to the object supplied. [REQUIREMENT: module - extendedUi]
INCISOR.inheritUiDropDownButton parameter: obj
[type: object]
The object that UiDropDownMenu functionality is being added to.
INCISOR.inheritUiDropDownButton parameter: parent
[type: SceneObject] [optional]
The SceneObject that will become the new UiDropDownMenu's parent in the Scene hierarchy.
INCISOR.inheritUiDropDownButton parameter: name
[type: string] [default: 'UiDropDownMenu'] [optional]
The name of the new UiDropDownMenu.
INCISOR.inheritUiGraphicButton(obj, parent, name)
[type: function]
Adds UiGraphicButton functionality to the object supplied. [REQUIREMENT: module - extendedUi]
INCISOR.inheritUiGraphicButton parameter: obj
[type: object]
The object that UiGraphicButton functionality is being added to.
INCISOR.inheritUiGraphicButton parameter: parent
[type: SceneObject] [optional]
The SceneObject that will become the new UiGraphicButton's parent in the Scene hierarchy.
INCISOR.inheritUiGraphicButton parameter: name
[type: string] [default: 'UiGraphicButton'] [optional]
The name of the new UiGraphicButton.
INCISOR.inheritUiLinkButton(obj, parent, name)
[type: function]
Adds UiLinkButton functionality to the object supplied. [REQUIREMENT: module - extendedUi]
INCISOR.inheritUiLinkButton parameter: obj
[type: object]
The object that UiLinkButton functionality is being added to.
INCISOR.inheritUiLinkButton parameter: parent
[type: SceneObject] [optional]
The SceneObject that will become the new UiLinkButton's parent in the Scene hierarchy.
INCISOR.inheritUiLinkButton parameter: name
[type: string] [default: 'UiLinkButton'] [optional]
The name of the new UiLinkButton.
INCISOR.inheritUiMenu(obj, parent, name)
[type: function]
Adds UiMenu functionality to the object supplied. [REQUIREMENT: module - extendedUi]
INCISOR.inheritUiMenu parameter: obj
[type: object]
The object that UiMenu functionality is being added to.
INCISOR.inheritUiMenu parameter: parent
[type: SceneObject] [optional]
The SceneObject that will become the new UiMenu's parent in the Scene hierarchy.
INCISOR.inheritUiMenu parameter: name
[type: string] [default: 'UiMenu'] [optional]
The name of the new UiMenu.
INCISOR.inheritUiNumberSupervisor_textField(obj, parent, name)
[type: function]
Adds UiNumberSupervisor_textField functionality to the object supplied. [REQUIREMENT: module - extendedUi]
INCISOR.inheritUiNumberSupervisor_textField parameter: obj
[type: object]
The object that UiNumberSupervisor_textField functionality is being added to.
INCISOR.inheritUiNumberSupervisor_textField parameter: parent
[type: SceneObject] [optional]
The SceneObject that will become the new UiNumberSupervisor_textField's parent in the Scene hierarchy.
INCISOR.inheritUiNumberSupervisor_textField parameter: name
[type: string] [default: 'UiNumberSupervisor_textField'] [optional]
The name of the new UiNumberSupervisor_textField.
INCISOR.inheritUiPopupWindow(obj, parent, name)
[type: function]
Adds UiPopupWindow functionality to the object supplied. [REQUIREMENT: module - extendedUi]
INCISOR.inheritUiPopupWindow parameter: obj
[type: object]
The object that UiPopupWindow functionality is being added to.
INCISOR.inheritUiPopupWindow parameter: parent
[type: SceneObject] [optional]
The SceneObject that will become the new UiPopupWindow's parent in the Scene hierarchy.
INCISOR.inheritUiPopupWindow parameter: name
[type: string] [default: 'UiPopupWindow'] [optional]
The name of the new UiPopupWindow.
INCISOR.inheritUiStringSupervisor_menu(obj, parent, name)
[type: function]
Adds UiStringSupervisor_menu functionality to the object supplied. [REQUIREMENT: module - extendedUi]
INCISOR.inheritUiStringSupervisor_menu parameter: obj
[type: object]
The object that UiStringSupervisor_menu functionality is being added to.
INCISOR.inheritUiStringSupervisor_menu parameter: parent
[type: SceneObject] [optional]
The SceneObject that will become the new UiStringSupervisor_menu's parent in the Scene hierarchy.
INCISOR.inheritUiStringSupervisor_menu parameter: name
[type: string] [default: 'UiStringSupervisor_menu'] [optional]
The name of the new UiStringSupervisor_menu.
INCISOR.inheritUiStringSupervisor_textField(obj, parent, name)
[type: function]
Adds UiStringSupervisor_textField functionality to the object supplied. [REQUIREMENT: module - extendedUi]
INCISOR.inheritUiStringSupervisor_textField parameter: obj
[type: object]
The object that UiStringSupervisor_textField functionality is being added to.
INCISOR.inheritUiStringSupervisor_textField parameter: parent
[type: SceneObject] [optional]
The SceneObject that will become the new UiStringSupervisor_textField's parent in the Scene hierarchy.
INCISOR.inheritUiStringSupervisor_textField parameter: name
[type: string] [default: 'UiStringSupervisor_textField'] [optional]
The name of the new UiStringSupervisor_textField.
INCISOR.inheritUiTextField(obj, parent, name)
[type: function]
Adds UiTextField functionality to the object supplied. [REQUIREMENT: module - extendedUi]
INCISOR.inheritUiTextField parameter: obj
[type: object]
The object that UiTextField functionality is being added to.
INCISOR.inheritUiTextField parameter: parent
[type: SceneObject] [optional]
The SceneObject that will become the new UiTextField's parent in the Scene hierarchy.
INCISOR.inheritUiTextField parameter: name
[type: string] [default: 'UiTextField'] [optional]
The name of the new UiTextField.
INCISOR.inheritUiText(obj, parent, name)
[type: function]
Adds UiText functionality to the object supplied. [REQUIREMENT: module - extendedUi]
INCISOR.inheritUiText parameter: obj
[type: object]
The object that UiText functionality is being added to.
INCISOR.inheritUiText parameter: parent
[type: SceneObject] [optional]
The SceneObject that will become the new UiText's parent in the Scene hierarchy.
INCISOR.inheritUiText parameter: name
[type: string] [default: 'UiText'] [optional]
The name of the new UiText.
INCISOR.inheritUiVectorSupervisor_textField(obj, parent, name)
[type: function]
Adds inheritUiVectorSupervisor_textField functionality to the object supplied. [REQUIREMENT: module - extendedUi]
INCISOR.inheritUiVectorSupervisor_textField parameter: obj
[type: object]
The object that inheritUiVectorSupervisor_textField functionality is being added to.
INCISOR.inheritUiVectorSupervisor_textField parameter: parent
[type: SceneObject] [optional]
The SceneObject that will become the new inheritUiVectorSupervisor_textField's parent in the Scene hierarchy.
INCISOR.inheritUiVectorSupervisor_textField parameter: name
[type: string] [default: 'inheritUiVectorSupervisor_textField'] [optional]
The name of the new inheritUiVectorSupervisor_textField.
INCISOR.inheritVector4(obj, x, y, z, w)
[type: function]
Adds Vector4 functionality to the supplied object.
INCISOR.inheritVector4 parameter: obj
[type: object]
The object to give Vector4 functionality to.
INCISOR.inheritVector4 parameter: x
[type: number] [default: 0] [optional]
The value for the first component.
INCISOR.inheritVector4 parameter: y
[type: number] [default: 0] [optional]
The value for the second component.
INCISOR.inheritVector4 parameter: z
[type: number] [default: 0] [optional]
The value for the third component.
INCISOR.inheritVector4 parameter: w
[type: number] [default: 0] [optional]
The value for the forth component.
INCISOR.inheritVector3(obj, x, y, z)
[type: function]
Adds Vector3 functionality to the supplied object.
INCISOR.inheritVector3 parameter: obj
[type: object]
The object to give Vector3 functionality to.
INCISOR.inheritVector3 parameter: x
[type: number] [default: 0] [optional]
The value for the first component.
INCISOR.inheritVector3 parameter: y
[type: number] [default: 0] [optional]
The value for the second component.
INCISOR.inheritVector3 parameter: z
[type: number] [default: 0] [optional]
The value for the third component.
INCISOR.inheritVector2(obj, x, y)
[type: function]
Adds Vector2 functionality to the supplied object.
INCISOR.inheritVector2 parameter: obj
[type: object]
The object to give Vector2 functionality to.
INCISOR.inheritVector2 parameter: x
[type: number] [default: 0] [optional]
The value for the first component.
INCISOR.inheritVector2 parameter: y
[type: number] [default: 0] [optional]
The value for the second component.
INCISOR.inheritVector1(obj, x)
[type: function]
Adds Vector1 functionality to the supplied object.
INCISOR.inheritVector1 parameter: obj
[type: object]
The object to give Vector1 functionality to.
INCISOR.inheritVector1 parameter: x
[type: number] [default: 0] [optional]
The value for the first component.
INCISOR.waitThen(duration, callbackOwner, callbackName, callbackArgs, name, pauseImmunity, speedControl)
[type: function]
Sets up a WaitThen (from an internal pool), invoking the given callback after the specified delay. Since the WaitThen being used here is internal, the object itself cannot be referenced; to stop a pooled WaitThen, call 'nc.stopAllWaitThensByName' or 'nc.stopAllWaitThensByCallback'. [REQUIREMENT: module - waitThens]
INCISOR.waitThen parameter: duration
[type: number]
Seconds before the callback will occur.
INCISOR.waitThen parameter: callbackOwner
[type: object]
The object owning the callback function that is called when the WaitThen completes.
INCISOR.waitThen parameter: callbackName
[type: string]
The name of the function that is called when the WaitThen completes.
INCISOR.waitThen parameter: callbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the WaitThen completes.
INCISOR.waitThen parameter: name
[type: string] [default: "WaitThen"] [optional]
The name of this WaitThen.
INCISOR.waitThen parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this WaitThen will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
INCISOR.waitThen parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this WaitThen is affected by.
example:
// Objective: Use a waitThen function
// Expected Result: The screen will show "Wait for it..." for 3 seconds then "Incisor!" will appear.
this.textBox = new TextBox( nc.mainScene );
this.textBox.string = "Wait for it...";
// call waitThen with a duration of 3 seconds
nc.waitThen( 3, this, "waitThenCallback" );
this.waitThenCallback = function() {
this.textBox.string = "Incisor!";
}
INCISOR.stopAllWaitThensByName(name, performCallback)
[type: function]
Stops all currently active WaitThens whose name matches the name given. [REQUIREMENT: module - waitThens]
INCISOR.stopAllWaitThensByName parameter: name
[type: string]
The name of the WaitThens to stop.
INCISOR.stopAllWaitThensByName parameter: performCallback
[type: boolean] [default: false] [optional]
Boolean determining if the callback function will be called immediately, or if it will be skipped entirely.
INCISOR.stopAllWaitThensByCallback(callbackOwner, callbackName, performCallback)
[type: function]
Stops all currently active WaitThens whose callback info matches the given callback info. [REQUIREMENT: module - waitThens]
INCISOR.stopAllWaitThensByCallback parameter: callbackOwner
[type: object]
The owner of the callback associated with the WaitThens to stop.
INCISOR.stopAllWaitThensByCallback parameter: callbackName
[type: string]
The name of the callback associated with the WaitThens to stop.
INCISOR.stopAllWaitThensByCallback parameter: performCallback
[type: boolean] [default: false] [optional]
Boolean determining if the callback function will be called immediately, or if it will be skipped entirely.
INCISOR.inheritWaitThen(obj, name)
[type: function]
Adds WaitThen functionality to the supplied object. [REQUIREMENT: module - waitThens]
INCISOR.inheritWaitThen parameter: obj
[type: object]
The object to give WaitThen functionality to.
INCISOR.inheritWaitThen parameter: name
[type: string]
The name of the new WaitThen object.
INCISOR. Welcome to Incisor!
[type: information]
Incisor® is a comprehensive platform that enables developers and designers to build high-quality interactive software and gaming products. The platform consists of JavaScript or TypeScript APIs, a customizable GUI, and other tools bundled together into a single application. Incisor® can be used to create extremely lightweight apps that operate on any target device or EGM - all from a single codebase. With Incisor®, your team can Build It Once.
The primary driving force behind Incisor® is making the development of commercial-grade software more collaborative, efficient, flexible, and generally straightforward. Whether your focus is on highly optimized products downloadable at a fraction of the size without sacrificing quality, or creating 4k resolution products for the casino floor, Incisor® is the only solution. The platform incorporates countless efficiencies into both the production process and the published result, enabling not only better products, but better development
----------------------------------------------------------
Section 3: AppEvent
----------------------------------------------------------
AppEvent
[type: class] [NON-INSTANTIABLE]
Object housing functionality for a system of method callbacks that are triggered by a given type of event. There are AppEvents for automatically recurring events such as the 'fixedUpdate' and 'screenUpdate', as well as user-input driven events such as keyboard and mouse events. Access Incisor®'s AppEvents via 'nc.appEvents', and use them to add custom functionality that responds to these events.
AppEvent.type
[type: string]
Type identifier
AppEvent.name
[type: string]
Name of AppEvent
example:
// Objective: Get the name of an AppEvent.
// Expected Result: The console should read "myAppEvent name keyboardEvent".
// Get an instance of the keyboardEvent AppEvent.
let myAppEvent = nc.appEvents.keyboardEvent;
console.log("myAppEvent name", myAppEvent.name);
AppEvent.hasSingularFocusScheme
[type: boolean] [default: false]
Readonly flag indicating if this AppEvent has a 'singular focus scheme' which is a system that restricts callback invocation to items associated with the currently 'focused' object as determined by nc.singularFocusObject.
AppEvent.isOrdered
[type: boolean] [default: false]
Readonly flag indicating if this AppEvent is 'ordered', which allows callbacks added to this AppEvent to be provided a callback order number, which is then used to sort the callbacks when the AppEvent is triggered. Built-in AppEvents with this flag true include start, lateFixedUpdate, and lateScreenUpdate.
AppEvent.hasConsumableCallbacks
[type: boolean] [default: false]
Readonly flag indicating if this AppEvent removes callbacks after one invocation.
AppEvent.addCallback(callbackOwner, callbackName, callbackArgs, pauseImmunity, singularFocusRequirements, callbackOrder)
[type: function]
Adds the provided function to the list of functions called with the associated AppEvent occurs.
AppEvent.addCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
AppEvent.addCallback parameter: callbackName
[type: string]
The name of the callback function.
AppEvent.addCallback parameter: callbackArgs
[type: [any], any] [optional]
Extra parameters for the callback function. It should be noted that some AppEvents are triggered with 'event-wide' args. In this case, these extra args are appended to the event-wide args.
AppEvent.addCallback parameter: pauseImmunity
[type: [PauseEvent], PauseEvent] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this AppEvent callback will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
AppEvent.addCallback parameter: singularFocusRequirements
[type: [object], object] [default: undefined] [optional]
If this AppEvent's 'hasSingularFocusScheme' property is true, supplying this object or Array of objects is a way of requiring the correct focus context for this callback to occur. If left undefined, the callback will be invoked with any triggering event. If supplied, one of the objects in the singularFocusRequirements must be 'in focus' for the callback to be invoked.
AppEvent.addCallback parameter: callbackOrder
[type: number] [default: 0] [optional]
If this AppEvent's 'isOrdered' property is true, this number will be used to sort the callbacks before they are invoked. An early number corresponds to the callback being called earlier.
example:
// Objective: Add a callback to an AppEvent.
// Action: Press a key on the keyboard. For this example, press the letter 'a'.
// Expected Result: The console should have 2 log messages as follows:
// callback type: keydown a
// callback type: keyup a
// Add a callback function.
this.myCallback = function(args) {
console.log('callback type:', args.type, args.key);
}
// Get an instance of the keyboardEvent AppEvent.
let myAppEvent = nc.appEvents.keyboardEvent;
// Add the callback.
myAppEvent.addCallback( this, "myCallback" );
AppEvent.removeCallback(callbackOwner, callbackName)
[type: function]
Removes the provided function from the list of functions called with the associated AppEvent occurs.
AppEvent.removeCallback parameter: callbackOwner
[type: object]
The object owning the callback function to be removed.
AppEvent.removeCallback parameter: callbackName
[type: string]
The name of the callback function to be removed.
example:
// Objective: Remove a callback from an AppEvent.
// Actions:
// 1. Press a key on the keyboard. For this example, press the letter 'a'.
// 1. Expected Result: The console should have 2 log messages as follows:
// callback type: keydown a
// callback type: keyup a
//
// 2. Click the white box to remove the AppEvent.
// 2. Expected Result: Upon clicking the white box, the console should read "removing the callback". You will no longer see console log messages upon pressing the keyboard.
// Add a callback function and name it 'myEventCallback'.
this.myEventCallback = function(args) {
console.log('callback type:', args.type, args.key);
}
// Get an instance of the keyboardEvent AppEvent.
let myAppEvent = nc.appEvents.keyboardEvent;
// Add the callback.
myAppEvent.addCallback( this, "myEventCallback" );
// Create a button to use to remove the callback. Use the WhiteBox GraphicAsset.
this.removeButton = nc.addButton( nc.graphicAssets.WhiteBox, nc.mainScene, "RemoveButton" );
// Create a callback function that handles the click of the white box and executes removeCallback(). Name the callback function "myButtonCallback".
this.myButtonCallback = function(args) {
console.log('removing the callback');
// Inside this press callback, remove the callback
myAppEvent.removeCallback( this, "myEventCallback" );
}
// Add the PressCallback to handle the clicking of the white box
this.removeButton.addPressCallback( this, "myButtonCallback" );
AppEvent.getRecipients()
[type: function] [returns: [object]]
Returns an Array listing all of the callbacks currently connected to this AppEvent. The returned Array lists objects containing the callbackOwner, callbackName, and paused state for each callback.
example:
// Objective: List all of the callbacks currently connected to this AppEvent.
// Expected Result: The console should have 2 log messages as follows:
// recipient myCallback1
// recipient myCallback2
// recipient myCallback3
// Make 3 callbacks.
this.myCallback1 = function(args) {
console.log('myCallback1 callback type:', args.type, args.key);
}
this.myCallback2 = function(args) {
console.log('myCallback2 callback type:', args.type, args.key);
}
this.myCallback3 = function(args) {
console.log('myCallback3 callback type:', args.type, args.key);
}
// Get an instance of the keyboardEvent AppEvent.
let myAppEvent = nc.appEvents.keyboardEvent;
// Add all 3 callbacks to this AppEvent.
myAppEvent.addCallback( this, "myCallback1" );
myAppEvent.addCallback( this, "myCallback2" );
myAppEvent.addCallback( this, "myCallback3" );
// Iterate and console log the array of recipients.
let recipients = myAppEvent.getRecipients();
for ( let r of recipients ) {
console.log('recipient', r.callbackName);
}
AppEvent.trigger(callbackArgs)
[type: function]
Method that 'Triggers' the AppEvent, invoking all of the callback functions that have been added to it.
AppEvent.trigger parameter: callbackArgs
[type: Array, any] [optional]
Parameter or Array of parameters that will be sent to this AppEvent's callback functions. It should be noted that if an Array is supplied, the individual members of the Array will be sent to callback functions as individual parameters.
AppEvent.asyncTrigger(callbackArgs)
[type: function]
Method that 'Triggers' the AppEvent, invoking all of the callback functions that have been added to it, and asyncronously awaiting each of them.
AppEvent.asyncTrigger parameter: callbackArgs
[type: Array, any] [optional]
Parameter or Array of parameters that will be sent to this AppEvent's callback functions. It should be noted that if an Array is supplied, the individual members of the Array will be sent to callback functions as individual parameters.
----------------------------------------------------------
Section 4: PauseEvent
----------------------------------------------------------
PauseEvent
[type: class] [NON-INSTANTIABLE]
A PauseEvent can be used as a parameter in 'nc.pause' and 'nc.resume' to pause and resume various time-based and user-interaction processes. Pausable processes react to pausing or resuming with PauseEvents unless those processes have a given PauseEvent as part of their designated 'pauseImmunity', which can determined in the parameters of a pausable-process-initiating method. Use 'nc.definePauseEvent' to create a new PauseEvent.
PauseEvent.type
[type: string]
Type identifier
PauseEvent.name
[type: string]
Name of PauseEvent
example:
// Objective: Get the name of an AppEvent.
// Expected Result: The console should read "myAppEvent name keyboardEvent".
// Get an instance of the keyboardEvent AppEvent.
let myAppEvent = nc.appEvents.keyboardEvent;
console.log("myAppEvent name", myAppEvent.name);
----------------------------------------------------------
Section 5: SpeedControl
----------------------------------------------------------
SpeedControl
[type: class] [NON-INSTANTIABLE]
SpeedControls can be used to control the speed of time-based sequencing processes such as Motions, Swoops, or Timelines. Applicable processes can subscribe to multiple SpeedControls; the 'speed' values of all of the SpeedControls a process subscribes to are multiplied together to determine the overall pacing of the given time-based process. Use 'nc.defineSpeedControl' to create a new SpeedControl.
SpeedControl.type
[type: string]
Type identifier
SpeedControl.name
[type: string]
Name of SpeedControl
example:
// Objective: Get the name of an AppEvent.
// Expected Result: The console should read "myAppEvent name keyboardEvent".
// Get an instance of the keyboardEvent AppEvent.
let myAppEvent = nc.appEvents.keyboardEvent;
console.log("myAppEvent name", myAppEvent.name);
SpeedControl.speed
[type: number] [default: 1]
The speed value. This value multiplies the speed of processes that subscribe to this SpeedControl
example:
// Objective: Adjust the motion speed of a "bouncing" white box.
// Expected Result: The white box will bounce, gradually slowing down over a period of 5 seconds, then it will gradually speed back up over a period of 5 seconds.
// Create a GraphicObject using the white box GraphicAsset and add it to the main Scene.
let myGraphicObject = new GraphicObject( nc.graphicAssets.whiteBox, nc.mainScene, "MyGraphicObject" );
// Give the box motion along the y axis. Set the speed to 2.
myGraphicObject.position.addMotion.y(-300,300,2);
// Swoop the 'speed' property of the MainSpeedControl down to .05 over a period of 5 seconds and provide callback arguments to swoop the 'speed' property again back up to speed 1 over a period of 10 seconds.
nc.swoopValue(
nc.speedControls.MainSpeedControl,
"speed",
.05,
5,
undefined,
nc,
"swoopValue",
[nc.speedControls.MainSpeedControl, "speed", 1, 10]
);
----------------------------------------------------------
Section 6: FocusChangeInfo
----------------------------------------------------------
FocusChangeInfo
[type: class] [NON-INSTANTIABLE]
Object containing information about a change to the 'nc.singularFocusObject' value. An instance of this object is sent as a first parameter to all callbacks registered with the nc.appEvents.focusChange AppEvent.
FocusChangeInfo.objectLosingFocus
[type: object]
A reference to the previous nc.singularFocusObject.
example:
// Objective: Add a callback to the focusChange AppEvent.
// Expected Result: After waiting 5 seconds, the console should have 3 log messages as follows:
// changing focus to Scene2
// object gaining focus Scene2
// object losing focus Scene1
// Create 2 scenes, "Scene1" and "Scene2"
this.scene1 = new Scene("Scene1");
this.scene2 = new Scene("Scene2");
// Set the singular focus to "Scene1"
nc.singularFocusObject = this.scene1;
// Create a callback to handle the focus change. Name is "focusChangeCallback".
this.focusChangeCallback = function(args) {
console.log("object gaining focus", args.objectGainingFocus.name);
console.log("object losing focus", args.objectLosingFocus.name);
}
// Get an instance of the focusChange AppEvent and add the focus change callback.
this.focusChangeEvent = nc.appEvents.focusChange;
this.focusChangeEvent.addCallback( this, "focusChangeCallback" );
// Create a focus changer that will change the singular focus.
this.focusChanger = function(args) {
console.log("changing focus to Scene2");
nc.singularFocusObject = this.scene2;
}
// Use nc.waitThen() to wait 5 seconds before executing the focus changer.
nc.waitThen( 5, this, "focusChanger" );
FocusChangeInfo.objectGainingFocus
[type: object]
A reference to the new nc.singularFocusObject.
example:
// Objective: Add a callback to the focusChange AppEvent.
// Expected Result: After waiting 5 seconds, the console should have 3 log messages as follows:
// changing focus to Scene2
// object gaining focus Scene2
// object losing focus Scene1
// Create 2 scenes, "Scene1" and "Scene2"
this.scene1 = new Scene("Scene1");
this.scene2 = new Scene("Scene2");
// Set the singular focus to "Scene1"
nc.singularFocusObject = this.scene1;
// Create a callback to handle the focus change. Name is "focusChangeCallback".
this.focusChangeCallback = function(args) {
console.log("object gaining focus", args.objectGainingFocus.name);
console.log("object losing focus", args.objectLosingFocus.name);
}
// Get an instance of the focusChange AppEvent and add the focus change callback.
this.focusChangeEvent = nc.appEvents.focusChange;
this.focusChangeEvent.addCallback( this, "focusChangeCallback" );
// Create a focus changer that will change the singular focus.
this.focusChanger = function(args) {
console.log("changing focus to Scene2");
nc.singularFocusObject = this.scene2;
}
// Use nc.waitThen() to wait 5 seconds before executing the focus changer.
nc.waitThen( 5, this, "focusChanger" );
----------------------------------------------------------
Section 7: AssetComponent
----------------------------------------------------------
AssetComponent
[type: class] [NON-INSTANTIABLE]
The base object defining the fundamental content builing-blocks for Incisor® such as Textures, Geometry, and Sounds.
AssetComponent.type
[type: string]
Type identifier
AssetComponent.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
AssetComponent.name
[type: string]
The AssetComponent's name. This must be unique among AssetComponents of its type.
AssetComponent.isLoaded
[type: boolean]
Boolean indicating if this AssetComponent is currently loaded.
AssetComponent.loadingTierRequirements
[type: [number]]
The LoadingTier that this AssetComponent belongs too. LoadingTiers are a means to organize AssetComponents into separately downloadable groups.
AssetComponent.duplicateSource
[type: string] [default: undefined]
String indicating the source of this AssetComponent if it is a duplicate. Incisor® automatically detects when two or more AssetComponents are identical, ensuring that only one copy of the associated data is loaded to reduce the loaded size of the project. Those AssetComponents that are duplicates are marked by indicating the name of the source of their data. This member is undefined for AssetComponents that are not duplicates.
----------------------------------------------------------
Section 8: LoadingTierDefinition
----------------------------------------------------------
LoadingTierDefinition
[type: class] [NON-INSTANTIABLE]
Object with information about a loading tier. Loading tiers are a means to organize AssetComponents into separately downloadable groups.
LoadingTierDefinition.type
[type: string]
Type identifier.
LoadingTierDefinition.loadingTier
[type: number]
The loading tier number.
LoadingTierDefinition.isAutoLoaded
[type: boolean]
Bool determining if this loading tier is automatically loaded on startup.
LoadingTierDefinition.incrementalContentProcessing
[type: boolean]
Bool determining if the processing of the data in this loading tier is processed incrementally. This setting can be used to minimize performance hits caused when asset data is 'lazy-loaded' during the end-user experience; When true, the processing of assets within a tier is spread out over multiple screen updates.
LoadingTierDefinition.assetDataFileSizeLimitKB
[type: number]
A limit on the size of the published asset data files within this loading tier. This setting can be used to break up the loading of asset data in order to help minimize performance hits caused when asset data is 'lazy-loaded' during the end-user experience; It should be noted that this is a soft-limit; individual assetComponents whose data is larger than this limit will result in oversized asset data files.
LoadingTierDefinition.spriteSheetDimensionLimit
[type: number]
A limit on the dimensions of sprite sheets within this loading tier. It should be noted that this is a soft-limit; individual GraphicAssets whose dimensions are larger than this limit will result in oversized sprite sheet files.
LoadingTierDefinition.isLoaded
[type: boolean]
Bool indicating if all of the assets in this loading tier have been loaded.
LoadingTierDefinition.isLoading
[type: boolean]
Bool indicating if this LoadingTier is in the process of loading or is queued to load.
----------------------------------------------------------
Section 9: Button
----------------------------------------------------------
Button
[type: class] [extends: GraphicObject]
Buttons are specialized GraphicObjects that can provide callbacks for cursor interactions. Buttons adhere to layering - only the frontmost Button receives cursor input.
Button.buttonActive
[type: boolean] [default: true]
Flag that determines if this Button responds to cursor interaction. If false, this Button acts no differently than a GraphicObject.
Button.rolloverFlag
[type: boolean]
Flag that reports if the cursor is currently directly over this Button. It should be noted that Buttons adhere to layering - only the frontmost active Button receives input.
Button.buttonDown
[type: boolean]
Flag that reports if the Button is currently being 'pressed'.
Button.pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity]
The PauseEvent or Array of PauseEvents that this Button will be immune to. Set the value to [] to create callbacks with no immunity. This property defaults to the value currently in nc.defaultPauseImmunity, which can be changed at any time.
Button.addCursorMoveCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback for when the cursor is moved over this Button.
Button.addCursorMoveCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.addCursorMoveCallback parameter: callbackName
[type: string]
The name of the callback function.
Button.addCursorMoveCallback parameter: callbackArgs
[type: Array, any] [optional]
Arguments for the callback function. Please note that the callback-triggering browser-generated event, and the viewing Camera will automatically be prepended to this list of arguments, so the callback implementation must be written to receive those as its first two parameters.
example:
// Objective: Add a CursorMoveCallback to a Button.
// Action: Move your mouse pointer in and out of the white box.
// Expected Result: As you move your mouse pointer inside the box it will flash different colors.
// Create a button using the Button constructor.
this.button = new Button( nc.graphicAssets.WhiteBox, nc.mainScene, "MyButton" );
// Add a reference to a callback function passing the owner of the function and the function name.
this.button.addCursorMoveCallback( this, "myCallback", ["myArgs0", "myArgs1"] );
// Add a callback function. Your first 2 parameters will always be the browser event and the camera.
this.myCallback = function( event, camera, callbackArgs0, callbackArgs1 ) {
console.log('callback:', event.type, camera.name, callbackArgs0, callbackArgs1);
this.button.fillColor.red = Math.random();
this.button.fillColor.blue = Math.random();
this.button.fillColor.green = Math.random();
}
Button.removeCursorMoveCallback(callbackOwner, callbackName)
[type: function]
Removes the callback for when the cursor is moved over this Button.
Button.removeCursorMoveCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.removeCursorMoveCallback parameter: callbackName
[type: string]
The name of the callback function.
Button.simulateCursorMoveCallback(simulatedEvent, simulatedCamera)
[type: function]
Manually triggers the 'cursorMove' callback for this Button.
Button.simulateCursorMoveCallback parameter: simulatedEvent
[type: object] [optional]
Event object that can be supplied in place of the authentic browser-generated event that occurs when the callback is triggered naturally.
Button.simulateCursorMoveCallback parameter: simulatedCamera
[type: object] [optional]
The Camera that will be supplied to the callback as the 'triggering' Camera.
Button.addCursorInCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback for when the cursor is moved into this Button's bounds.
Button.addCursorInCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.addCursorInCallback parameter: callbackName
[type: string]
The name of the callback function.
Button.addCursorInCallback parameter: callbackArgs
[type: Array, any] [optional]
Arguments for the callback function. Please note that the callback-triggering browser-generated event, and the viewing Camera will automatically be prepended to this list of arguments, so the callback implementation must be written to receive those as its first two parameters.
example:
// Objective: Add a CursorInCallback and CursorOutCallback to a Button.
// Action: Move your mouse pointer in and out of the box.
// Expected Result: When you move your mouse pointer into the box, the box becomes blue. When you move it out, it will become red.
// Create a button using the Button constructor.
this.button = new Button( nc.graphicAssets.WhiteBox, nc.mainScene, "MyButton" );
// Add a reference to a callback function passing the owner of the function and the function name.
this.button.addCursorInCallback( this, "myInCallback", ["myArgs0", "myArgs1"] );
this.button.addCursorOutCallback( this, "myOutCallback", ["myArgs0", "myArgs1", "myArgs2"] );
// Add callback functions. Your first 2 parameters will always be the browser event and the camera.
this.myInCallback = function( event, camera, callbackArgs0, callbackArgs1 ) {
console.log('callback:', event.type, camera.name, callbackArgs0, callbackArgs1);
this.button.fillColor.red = 0;
this.button.fillColor.blue = 1;
this.button.fillColor.green = 0;
}
this.myOutCallback = function( event, camera, callbackArgs0, callbackArgs1, callbackArgs2 ) {
console.log('callback:', event.type, camera.name, callbackArgs0, callbackArgs1, callbackArgs2);
this.button.fillColor.red = 1;
this.button.fillColor.blue = 0;
this.button.fillColor.green = 0;
}
Button.removeCursorInCallback(callbackOwner, callbackName)
[type: function]
Removes the callback for when the cursor is moved into this Button's bounds.
Button.removeCursorInCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.removeCursorInCallback parameter: callbackName
[type: string]
The name of the callback function.
example:
// Objective: Remove a CursorInCallback from a Button.
// Actions:
// 1. Move your mouse pointer in and out of the white box.
// 1. Expected Result: The console should read "action: mousemove" each time your mouse enters the white box.
// 2. Click the white triangle to remove the CursorInCallback.
// 2. Expected Result: Upon clicking the white triangle, the console should read "removing the callback". Moving the mouse in and out of the white box no longer generates any console messages
// Create a button to use to remove the callback. Use the WhiteTriangle GraphicAsset.
this.removeCallbackButton = nc.addButton( nc.graphicAssets.WhiteTriangle, nc.mainScene, "RemoveCallbackButton" );
// Move the white triangle to the right 200 world units.
this.removeCallbackButton.position.x = 200;
// Create a callback function that handles the click of the white triangle and executes removeCursorInCallback()
this.myRemovePressCallback = function(args) {
console.log('removing the callback');
// Inside this press callback, remove the CursorInCallback
this.button.removeCursorInCallback( this, "myActionCallback" );
}
// Add the PressCallback to handle the clicking of the white triangle
this.removeCallbackButton.addPressCallback( this, "myRemovePressCallback" );
// Create a button using the "nc" factory method.
this.button = nc.addButton( nc.graphicAssets.WhiteBox, nc.mainScene, "MyButton" );
// Create a callback function.
this.myActionCallback = function(args) {
console.log('action:', args.type);
}
// Add a CursorInCallback
this.button.addCursorInCallback( this, "myActionCallback" );
Button.simulateCursorInCallback(simulatedEvent, simulatedCamera)
[type: function]
Manually triggers the 'cursorIn' callback for this Button.
Button.simulateCursorInCallback parameter: simulatedEvent
[type: object] [optional]
Event object that can be supplied in place of the authentic browser-generated event that occurs when the callback is triggered naturally.
Button.simulateCursorInCallback parameter: simulatedCamera
[type: object] [optional]
The Camera that will be supplied to the callback as the 'triggering' Camera.
Button.addCursorOutCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback for when the cursor is moved out of this Button's bounds.
Button.addCursorOutCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.addCursorOutCallback parameter: callbackName
[type: string]
The name of the callback function.
Button.addCursorOutCallback parameter: callbackArgs
[type: Array, any] [optional]
Arguments for the callback function. Please note that the callback-triggering browser-generated event, and the viewing Camera will automatically be prepended to this list of arguments, so the callback implementation must be written to receive those as its first two parameters.
example:
// Objective: Add a CursorInCallback and CursorOutCallback to a Button.
// Action: Move your mouse pointer in and out of the box.
// Expected Result: When you move your mouse pointer into the box, the box becomes blue. When you move it out, it will become red.
// Create a button using the Button constructor.
this.button = new Button( nc.graphicAssets.WhiteBox, nc.mainScene, "MyButton" );
// Add a reference to a callback function passing the owner of the function and the function name.
this.button.addCursorInCallback( this, "myInCallback", ["myArgs0", "myArgs1"] );
this.button.addCursorOutCallback( this, "myOutCallback", ["myArgs0", "myArgs1", "myArgs2"] );
// Add callback functions. Your first 2 parameters will always be the browser event and the camera.
this.myInCallback = function( event, camera, callbackArgs0, callbackArgs1 ) {
console.log('callback:', event.type, camera.name, callbackArgs0, callbackArgs1);
this.button.fillColor.red = 0;
this.button.fillColor.blue = 1;
this.button.fillColor.green = 0;
}
this.myOutCallback = function( event, camera, callbackArgs0, callbackArgs1, callbackArgs2 ) {
console.log('callback:', event.type, camera.name, callbackArgs0, callbackArgs1, callbackArgs2);
this.button.fillColor.red = 1;
this.button.fillColor.blue = 0;
this.button.fillColor.green = 0;
}
Button.removeCursorOutCallback(callbackOwner, callbackName)
[type: function]
Removes the callback for when the cursor is moved out of this Button's bounds.
Button.removeCursorOutCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.removeCursorOutCallback parameter: callbackName
[type: string]
The name of the callback function.
Button.simulateCursorOutCallback(simulatedEvent, simulatedCamera)
[type: function]
Manually triggers the 'cursorOut' callback for this Button.
Button.simulateCursorOutCallback parameter: simulatedEvent
[type: object] [optional]
Event object that can be supplied in place of the authentic browser-generated event that occurs when the callback is triggered naturally.
Button.simulateCursorOutCallback parameter: simulatedCamera
[type: object] [optional]
The Camera that will be supplied to the callback as the 'triggering' Camera.
Button.addDragCallback(callbackOwner, callbackName, callbackArgs, allowInOutAndMove, requireDragInitiationThreshold)
[type: function]
Adds a callback for when this Button is dragged.
Button.addDragCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.addDragCallback parameter: callbackName
[type: string]
The name of the callback function.
Button.addDragCallback parameter: callbackArgs
[type: Array, any] [optional]
Arguments for the callback function. Please note that the callback-triggering browser-generated event, and the viewing Camera will automatically be prepended to this list of arguments, so the callback implementation must be written to receive those as its first two parameters.
Button.addDragCallback parameter: allowInOutAndMove
[type: boolean] [default: false] [optional]
Boolean determining if other buttons will receive cursorIn, cursorOut, and cursorMove events while this Button is being dragged.
Button.addDragCallback parameter: requireDragInitiationThreshold
[type: boolean] [default: true] [optional]
Boolean determining if the cursor must be dragged by a minimum threshold before 'drag' callbacks start to happen. See 'Camera.mouseDragInitiationThreshold' and 'Camera.touchDragInitiationThreshold' for more information.
example:
// Objective: Add a DragCallback and a DropCallback to a Button.
// Action: Drag the box.
// Expected Result: As you are dragging the box it will be white. When you drop it, it will turn red.
// Create a button using the Button constructor.
this.button = new Button( nc.graphicAssets.WhiteBox, nc.mainScene, "MyButton" );
// Add callbacks, passing the owner of the function and the function name.
this.button.addDragCallback( this, "myDragCallback", ["myArgs0", "myArgs1"] );
this.button.addDropCallback( this, "myDropCallback", ["myArgs0", "myArgs1"] );
// Add both callback functions. Your first 2 parameters will always be the browser event and the camera.
this.myDragCallback = function( event, camera, callbackArgs0, callbackArgs1 ) {
console.log('drag callback:', event.type, camera.name, callbackArgs0, callbackArgs1);
this.button.fillColor.green = 1;
this.button.fillColor.blue = 1;
this.button.position.x = nc.mainCamera.getCursorPosition().x;
this.button.position.y = nc.mainCamera.getCursorPosition().y;
}
// Your first 2 parameters will always be the browser event and the camera. For a DropCallback you will receive 2 additional arguments, the dragged button and the button being dropped onto.
this.myDropCallback = function( event, camera, draggedButton, dropTargetButton, callbackArgs0, callbackArgs1 ) {
console.log('drop callback:', event.type, camera.name, draggedButton.name, dropTargetButton.name, callbackArgs0, callbackArgs1);
this.button.fillColor.green = 0;
this.button.fillColor.blue = 0;
}
Button.removeDragCallback(callbackOwner, callbackName)
[type: function]
Removes the callback for when this Button is dragged.
Button.removeDragCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.removeDragCallback parameter: callbackName
[type: string]
The name of the callback function.
Button.simulateDragCallback(simulatedEvent, simulatedCamera)
[type: function]
Manually triggers the 'drag' callback for this Button.
Button.simulateDragCallback parameter: simulatedEvent
[type: object] [optional]
Event object that can be supplied in place of the authentic browser-generated event that occurs when the callback is triggered naturally.
Button.simulateDragCallback parameter: simulatedCamera
[type: object] [optional]
The Camera that will be supplied to the callback as the 'triggering' Camera.
Button.addDropCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback for when this Button is dropped (after being dragged). Please note that the Button must have a drag callback in order for any drop callbacks to occur.
Button.addDropCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.addDropCallback parameter: callbackName
[type: string]
The name of the callback function.
Button.addDropCallback parameter: callbackArgs
[type: Array, any] [optional]
Arguments for the callback function. Please note that the callback-triggering browser-generated event, the viewing Camera, the dragged Button, and the Button being dropped onto (if any) will automatically be prepended to this list of arguments, so the callback implementation must plan to receive those as its first four parameters.
example:
// Objective: Add a DragCallback and a DropCallback to a Button.
// Action: Drag the box.
// Expected Result: As you are dragging the box it will be white. When you drop it, it will turn red.
// Create a button using the Button constructor.
this.button = new Button( nc.graphicAssets.WhiteBox, nc.mainScene, "MyButton" );
// Add callbacks, passing the owner of the function and the function name.
this.button.addDragCallback( this, "myDragCallback", ["myArgs0", "myArgs1"] );
this.button.addDropCallback( this, "myDropCallback", ["myArgs0", "myArgs1"] );
// Add both callback functions. Your first 2 parameters will always be the browser event and the camera.
this.myDragCallback = function( event, camera, callbackArgs0, callbackArgs1 ) {
console.log('drag callback:', event.type, camera.name, callbackArgs0, callbackArgs1);
this.button.fillColor.green = 1;
this.button.fillColor.blue = 1;
this.button.position.x = nc.mainCamera.getCursorPosition().x;
this.button.position.y = nc.mainCamera.getCursorPosition().y;
}
// Your first 2 parameters will always be the browser event and the camera. For a DropCallback you will receive 2 additional arguments, the dragged button and the button being dropped onto.
this.myDropCallback = function( event, camera, draggedButton, dropTargetButton, callbackArgs0, callbackArgs1 ) {
console.log('drop callback:', event.type, camera.name, draggedButton.name, dropTargetButton.name, callbackArgs0, callbackArgs1);
this.button.fillColor.green = 0;
this.button.fillColor.blue = 0;
}
Button.removeDropCallback(callbackOwner, callbackName)
[type: function]
Removes the callback for when this Button is dropped (after being dragged).
Button.removeDropCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.removeDropCallback parameter: callbackName
[type: string]
The name of the callback function.
Button.simulateDropCallback(simulatedEvent, simulatedCamera, simulatedDropRecipient)
[type: function]
Manually triggers the 'drop' callback for this Button.
Button.simulateDropCallback parameter: simulatedEvent
[type: object] [optional]
Event object that can be supplied in place of the authentic browser-generated event that occurs when the callback is triggered naturally.
Button.simulateDropCallback parameter: simulatedCamera
[type: object] [optional]
The Camera that will be supplied to the callback as the 'triggering' Camera.
Button.simulateDropCallback parameter: simulatedDropRecipient
[type: Button] [optional]
Button acting as the Button that is being dropped onto.
Button.addPressCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback for when this Button is pressed down.
Button.addPressCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.addPressCallback parameter: callbackName
[type: string]
The name of the callback function.
Button.addPressCallback parameter: callbackArgs
[type: Array, any] [optional]
Arguments for the callback function. Please note that the callback-triggering browser-generated event, and the viewing Camera will automatically be prepended to this list of arguments, so the callback implementation must be written to receive those as its first two parameters.
example:
// Objective: Add a PressCallback and a ReleaseCallback to a Button.
// Action: Press and release the button to change its color.
// Expected Result: Each time you are pressing the button it will be red. When you release it, it will turn back to green.
// Create a button using the Button constructor.
this.button = new Button( nc.graphicAssets.WhiteBox, nc.mainScene, "MyButton" );
// Initially, make the button green.
this.button.fillColor.red = 0;
this.button.fillColor.blue = 0;
// Add callbacks, passing the owner of the function and the function name.
this.button.addPressCallback( this, "myPressCallback", ["myArgs0", "myArgs1"] );
this.button.addReleaseCallback( this, "myReleaseCallback", ["myArgs0", "myArgs1"] );
// Add callback functions. Your first 2 parameters will always be the browser event and the camera.
this.myPressCallback = function( event, camera, callbackArgs0, callbackArgs1 ) {
console.log('callback:', event.type, camera.name, callbackArgs0, callbackArgs1);
this.button.fillColor.red = 1;
this.button.fillColor.green = 0;
}
this.myReleaseCallback = function( event, camera, callbackArgs0, callbackArgs1 ) {
console.log('callback:', event.type, camera.name, callbackArgs0, callbackArgs1);
this.button.fillColor.red = 0;
this.button.fillColor.green = 1;
}
Button.removePressCallback(callbackOwner, callbackName)
[type: function]
Removes the callback for when this Button is pressed down.
Button.removePressCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.removePressCallback parameter: callbackName
[type: string]
The name of the callback function.
Button.simulatePressCallback(simulatedEvent, simulatedCamera)
[type: function]
Manually triggers the 'press' callback for this Button.
Button.simulatePressCallback parameter: simulatedEvent
[type: object] [optional]
Event object that can be supplied in place of the authentic browser-generated event that occurs when the callback is triggered naturally.
Button.simulatePressCallback parameter: simulatedCamera
[type: object] [optional]
The Camera that will be supplied to the callback as the 'triggering' Camera.
Button.addReleaseCallback(callbackOwner, callbackName, callbackArgs, releaseRequiresInitialPress)
[type: function]
Adds a callback for when this Button is released.
Button.addReleaseCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.addReleaseCallback parameter: callbackName
[type: string]
The name of the callback function.
Button.addReleaseCallback parameter: callbackArgs
[type: Array, any] [optional]
Arguments for the callback function. Please note that the callback-triggering browser-generated event, and the viewing Camera will automatically be prepended to this list of arguments, so the callback implementation must be written to receive those as its first two parameters.
Button.addReleaseCallback parameter: releaseRequiresInitialPress
[type: boolean] [default: true] [optional]
If true, the Button must be pressed before being released in order for the callback to occur.
example:
// Objective: Add a PressCallback and a ReleaseCallback to a Button.
// Action: Press and release the button to change its color.
// Expected Result: Each time you are pressing the button it will be red. When you release it, it will turn back to green.
// Create a button using the Button constructor.
this.button = new Button( nc.graphicAssets.WhiteBox, nc.mainScene, "MyButton" );
// Initially, make the button green.
this.button.fillColor.red = 0;
this.button.fillColor.blue = 0;
// Add callbacks, passing the owner of the function and the function name.
this.button.addPressCallback( this, "myPressCallback", ["myArgs0", "myArgs1"] );
this.button.addReleaseCallback( this, "myReleaseCallback", ["myArgs0", "myArgs1"] );
// Add callback functions. Your first 2 parameters will always be the browser event and the camera.
this.myPressCallback = function( event, camera, callbackArgs0, callbackArgs1 ) {
console.log('callback:', event.type, camera.name, callbackArgs0, callbackArgs1);
this.button.fillColor.red = 1;
this.button.fillColor.green = 0;
}
this.myReleaseCallback = function( event, camera, callbackArgs0, callbackArgs1 ) {
console.log('callback:', event.type, camera.name, callbackArgs0, callbackArgs1);
this.button.fillColor.red = 0;
this.button.fillColor.green = 1;
}
Button.removeReleaseCallback(callbackOwner, callbackName)
[type: function]
Removes the callback for when this Button is released.
Button.removeReleaseCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.removeReleaseCallback parameter: callbackName
[type: string]
The name of the callback function.
Button.simulateReleaseCallback(simulatedEvent, simulatedCamera)
[type: function]
Manually triggers the 'release' callback for this Button.
Button.simulateReleaseCallback parameter: simulatedEvent
[type: object] [optional]
Event object that can be supplied in place of the authentic browser-generated event that occurs when the callback is triggered naturally.
Button.simulateReleaseCallback parameter: simulatedCamera
[type: object] [optional]
The Camera that will be supplied to the callback as the 'triggering' Camera.
Button.addDoubleTapCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback for when this Button is tapped twice in fast succession. See 'nc.multiTapInterval' to adjust the multi-tap speed.
Button.addDoubleTapCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.addDoubleTapCallback parameter: callbackName
[type: string]
The name of the callback function.
Button.addDoubleTapCallback parameter: callbackArgs
[type: Array, any] [optional]
Arguments for the callback function. Please note that the callback-triggering browser-generated event, and the viewing Camera will automatically be prepended to this list of arguments, so the callback implementation must be written to receive those as its first two parameters.
example:
// Objective: Add a DoubleTapCallback to a Button.
// Action: Double tap the box.
// Expected Result: Each time you double tap the box it expands to 4 times its original size or contracts back to its original size.
// Create a button using the Button constructor.
this.button = new Button( nc.graphicAssets.WhiteBox, nc.mainScene, "MyButton" );
// Add a callback, passing the owner of the function and the function name.
this.button.addDoubleTapCallback( this, "myCallback", ["myArgs0", "myArgs1"] );
// Add a callback function. Your first 2 parameters will always be the browser event and the camera.
this.myCallback = function( event, camera, callbackArgs0, callbackArgs1 ) {
console.log('callback:', event.type, camera.name, callbackArgs0, callbackArgs1);
if ( this.button.scale.x == 1 ) {
this.button.scale.x = 4;
this.button.scale.y = 4;
} else {
this.button.scale.x = 1;
this.button.scale.y = 1;
}
}
Button.removeDoubleTapCallback(callbackOwner, callbackName)
[type: function]
Removes the callback for when this Button is tapped twice in fast succession.
Button.removeDoubleTapCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.removeDoubleTapCallback parameter: callbackName
[type: string]
The name of the callback function.
Button.simulateDoubleTapCallback(simulatedEvent, simulatedCamera)
[type: function]
Manually triggers the 'doubleTap' callback for this Button.
Button.simulateDoubleTapCallback parameter: simulatedEvent
[type: object] [optional]
Event object that can be supplied in place of the authentic browser-generated event that occurs when the callback is triggered naturally.
Button.simulateDoubleTapCallback parameter: simulatedCamera
[type: object] [optional]
The Camera that will be supplied to the callback as the 'triggering' Camera.
Button.addTripleTapCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback for when this Button is tapped three times in fast succession. See 'nc.multiTapInterval' to adjust the multi-tap speed.
Button.addTripleTapCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.addTripleTapCallback parameter: callbackName
[type: string]
The name of the callback function.
Button.addTripleTapCallback parameter: callbackArgs
[type: Array, any] [optional]
Arguments for the callback function. Please note that the callback-triggering browser-generated event, and the viewing Camera will automatically be prepended to this list of arguments, so the callback implementation must be written to receive those as its first two parameters.
example:
// Objective: Add a TripleTapCallback to a Button.
// Action: Triple tap the box.
// Expected Result: Each time you triple tap the box it expands to 4 times its original size or contracts back to its original size.
// Create a button using the Button constructor.
this.button = new Button( nc.graphicAssets.WhiteBox, nc.mainScene, "MyButton" );
// Add a callback, passing the owner of the function and the function name.
this.button.addTripleTapCallback( this, "myCallback", ["myArgs0", "myArgs1"] );
// Add a callback function. Your first 2 parameters will always be the browser event and the camera.
this.myCallback = function( event, camera, callbackArgs0, callbackArgs1 ) {
console.log('callback:', event.type, camera.name, callbackArgs0, callbackArgs1);
if ( this.button.scale.x == 1 ) {
this.button.scale.x = 4;
this.button.scale.y = 4;
} else {
this.button.scale.x = 1;
this.button.scale.y = 1;
}
}
Button.removeTripleTapCallback(callbackOwner, callbackName)
[type: function]
Removes the callback for when this Button is tapped three times in fast succession.
Button.removeTripleTapCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.removeTripleTapCallback parameter: callbackName
[type: string]
The name of the callback function.
Button.simulateTripleTapCallback(simulatedEvent, simulatedCamera)
[type: function]
Manually triggers the 'tripleTap' callback for this Button.
Button.simulateTripleTapCallback parameter: simulatedEvent
[type: object] [optional]
Event object that can be supplied in place of the authentic browser-generated event that occurs when the callback is triggered naturally.
Button.simulateTripleTapCallback parameter: simulatedCamera
[type: object] [optional]
The Camera that will be supplied to the callback as the 'triggering' Camera.
Button.addScrollCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback for when the cursor 'scroll' occurs over this Button. Invoke the 'preventDefault' method on the event sent to the callback to prevent browser-level scrolling functionality.
Button.addScrollCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.addScrollCallback parameter: callbackName
[type: string]
The name of the callback function.
Button.addScrollCallback parameter: callbackArgs
[type: Array, any] [optional]
Arguments for the callback function. Please note that the callback-triggering browser-generated event, and the viewing Camera will automatically be prepended to this list of arguments, so the callback implementation must be written to receive those as its first two parameters.
example:
// Objective: Add a ScrollCallback to a Button.
// Action: Mouse wheel up and down over the white box.
// Expected Result: As you mouse wheel up, the box expands. As you wheel down, it contacts.
// Create a button using the Button constructor.
this.button = new Button( nc.graphicAssets.WhiteBox, nc.mainScene, "MyButton" );
// Add a callback, passing the owner of the function and the function name.
this.button.addScrollCallback( this, "myCallback", ["myArgs0", "myArgs1"] );
// Add a callback function. Your first 2 parameters will always be the browser event and the camera.
this.myCallback = function( event, camera, callbackArgs0, callbackArgs1 ) {
console.log('callback:', event.name, camera.name, callbackArgs0, callbackArgs1);
// Use the event to get the delta of the mouse wheel
if ( event.wheelDelta > 0 ) {
// "zoom in" no greater than 5 x original size
if ( this.button.scale.x <= 5 ) {
this.button.scale.x = this.button.scale.x + .1;
this.button.scale.y = this.button.scale.y + .1;
}
} else {
// zoom out no smaller than .05 original size
if ( this.button.scale.x >= 0.5 ) {
this.button.scale.x = this.button.scale.x - .1;
this.button.scale.y = this.button.scale.y - .1;
}
}
}
Button.removeScrollCallback(callbackOwner, callbackName)
[type: function]
Removes the callback for when the cursor 'scroll' occurs over this Button.
Button.removeScrollCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.removeScrollCallback parameter: callbackName
[type: string]
The name of the callback function.
Button.simulateScrollCallback(simulatedEvent, simulatedCamera)
[type: function]
Manually triggers the 'scroll' callback for this Button.
Button.simulateScrollCallback parameter: simulatedEvent
[type: object] [optional]
Event object that can be supplied in place of the authentic browser-generated event that occurs when the callback is triggered naturally.
Button.simulateScrollCallback parameter: simulatedCamera
[type: object] [optional]
The Camera that will be supplied to the callback as the 'triggering' Camera.
Button.addContextMenuCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback for when the in-browser context menu is activated over this Button. Invoke the 'preventDefault' method on the event sent to the callback to prevent built-in browser context menu from appearing.
Button.addContextMenuCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.addContextMenuCallback parameter: callbackName
[type: string]
The name of the callback function.
Button.addContextMenuCallback parameter: callbackArgs
[type: Array, any] [optional]
Arguments for the callback function. Please note that the callback-triggering browser-generated event, and the viewing Camera will automatically be prepended to this list of arguments, so the callback implementation must be written to receive those as its first two parameters.
example:
// Objective: Add a ContextMenuCallback to a Button.
// Action: Bring the mouse into the white box and right click your mouse.
// Expected Result: The console should read "callback: contextmenu MainCamera myArgs0 myArgs1".
// Create a button using the Button constructor.
this.button = new Button( nc.graphicAssets.WhiteBox, nc.mainScene, "MyButton" );
// Add a reference to a callback function passing the owner of the function and the function name.
this.button.addContextMenuCallback( this, "myCallback", ["myArgs0", "myArgs1"] );
// Add a callback function. Your first 2 parameters will always be the browser event and the camera.
this.myCallback = function( event, camera, callbackArgs0, callbackArgs1 ) {
console.log('callback:', event.type, camera.name, callbackArgs0, callbackArgs1);
}
Button.removeContextMenuCallback(callbackOwner, callbackName)
[type: function]
Removes the callback for when the in-browser context menu is activated over this Button.
Button.removeContextMenuCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Button.removeContextMenuCallback parameter: callbackName
[type: string]
The name of the callback function.
Button.simulateContextMenuCallback(simulatedEvent, simulatedCamera)
[type: function]
Manually triggers the 'contextMenu' callback for this Button.
Button.simulateContextMenuCallback parameter: simulatedEvent
[type: object] [optional]
Event object that can be supplied in place of the authentic browser-generated event that occurs when the callback is triggered naturally.
Button.simulateContextMenuCallback parameter: simulatedCamera
[type: object] [optional]
The Camera that will be supplied to the callback as the 'triggering' Camera.
----------------------------------------------------------
Section 10: Camera
----------------------------------------------------------
Camera
[type: class] [extends: SceneObject] [NON-INSTANTIABLE]
A Camera is a specialized SceneObject with the ability to render the Scene that contains it to a RenderTarget.
Camera.autoRender
[type: boolean] [default: true]
Boolean determining if this Camera is automatically rendered with every screen update.
Camera.autoRenderOrder
[type: number] [default: 0]
Number determining this Camera's order in the list of automatically rendered Cameras. Higher numbers correspond to earlier render order.
Camera.backgroundColor
[type: Color] [default: Color(0,0,0,0)]
Color determining the background color (aka the 'clear color') of this Camera. Please note that the 'MainCamera' defaults to [0.1,0.08,0.08,1], while all other cameras default to [0,0,0,0]. These values can be changed at any time.
Camera.cursorInteractive
[type: boolean] [default: false]
Boolean determining if this camera will be used in conjunction with a cursor for Buttons or other cursor activity. Cameras are responsible for relating the cursor's screen position to a position within the Scene and this flag informs the Camera of that requirement. To optimize your project, ensure that this property is only set to true when cursor interactivity (Buttons etc...) in the Scene that this Camera is rendering.
Camera.adaptiveCameraMode
[type: string]
Property determining the 'adaptive camera mode' of this Camera. Adaptive camera modes can put a Camera into a state where it reacts to the shape it's RenderTarget, extending or contracting the view area of the Camera as the shape if it's RenderTarget changes. The adaptive camera modes are as follows: 'none' - the view width and height of the camera do not change, regardless of the size and shape of the Camera's RenderTarget. 'unitsMatchPixels' - the camera bounds will consistently be updated, matching the view width and height (in world units) of the Camera with the current render resolution of the Camera's RenderTarget. 'maximizeSafeZone' - the camera bounds will consistently be updated, ensuring that the core view area (as defined by coreViewWidth and coreViewHeight) is rendered as large as it can be on the Camera's RenderTarget. [DEFUALT: constants.adaptiveCameraModes.none]
Camera.clearsColor
[type: boolean]
Boolean determining if the color buffer is cleared in this Camera's RenderTarget prior to rendering. [DEFUALT: true]
Camera.clearsDepth
[type: boolean]
Boolean determining if the depth buffer is cleared in this Camera's RenderTarget prior to rendering. [DEFUALT: true]
Camera.clearsStencil
[type: boolean]
Boolean determining if the stencil buffer is cleared in this Camera's RenderTarget prior to rendering. [DEFUALT: true]
Camera.renderTarget
[type: RenderTarget]
The RenderTarget this Camera will render to when Camera.render is invoked. [DEFUALT: undefined]
Camera.cursorInputOverride()
[type: function, CursorInputOverrideButton]
This property provides means to override the automated setting of this Camera's cursorViewPosition. This is most commonly deployed when a RenderTarget used within a primary Scene serves as a 'window' into a secondary Scene that requires cursor interaction - this property would be used to map the cursor interaction through the window into the secondary screen. This property can be used two ways: 1. Define a CursorInputOverrideButton and set this property to that object. When you do this, the button serves as a 'cursor mapping surface', where the edges of the CursorInputOverrideButton correspond to the edges of the secondary Camera's view area. 2. Set this property to a function that remaps the cursorViewPosition manually. This method can be used to further customize the setting of this Camera's cursorViewPosition. If implemented, the first parameter of the function should take the triggering browser-generated cursor event, and the second parameter will be a Vector2 holding the default-calculated cursorViewPosition. The function should use those parameters as input, generate the desired remapped values, and call 'setCursorViewPosition' on the camera accordingly. [DEFUALT: undefined]
Camera.touchDragInitiationThreshold
[type: number] [default: 0.05]
Proportion of the Camera's view area that a touch-based cursor drag must travel in order to initiate a Button 'drag'. While using a touch-based device, tapping the screen often produces a tiny unintentional cursor drag. This value creates a threshold; if the cursor moves less than this portion of the Camera's view area during a screen touch, no Button 'drag' occurs.
Camera.mouseDragInitiationThreshold
[type: number] [default: 0.005]
Proportion of the Camera's view area that a mouse-based cursor drag must travel in order to initiate a Button 'drag'. While using a mouse, clicking sometimes produces a tiny un-intentional cursor drag. This value creates a threshold; if the cursor moves less than this portion of the Camera's view area during a click, no Button 'drag' occurs.
Camera.isCurrentlyRendering
[type: boolean]
Boolean denoting if the Camera is currently in the process of rendering. This property can be queried prior to any potentially recursive 'Camera.render' calls to prevent an infinite self-invocation scenario.
Camera.timelineRenderDriver
[type: Timeline] [default: undefined]
Optional TimelineManager that can drive this camera's rendering. This property defaults to undefined, but when it is set to a given TimelineManager the Camera will render continuously as long as one or more Timeline with non-zero influence is playing. If the 'generatesPrecomp' setting for a given Construct is true, and if that Construct has one or more Timelines, then the associate Precomp Camera's 'timelineRenderDriver' value is automatically set to the Construct instance's TimelineManager. This enables Construct-generated Precomps to render while timelines are playing, and rest while timelines are not playing.
Camera.render(skipRenderPreparations)
[type: function]
Renders the contents of the Scene within the Camera's view area to the RenderTarget.
Camera.render parameter: skipRenderPreparations
[type: boolean] [default: false] [optional]
Boolean that, if true, tells the rendering process to skip render preparations for efficiency. This flag is best used with secondary Cameras that render Scenes that have already been rendered once in their current state (as the preparations would have already been completed).
Camera.setCursorViewPosition(x, y, z, simulateCursorMoveEvent)
[type: function]
Updates the Camera's cursor view position to the given x and y coordinates. Camera view coordinates operate with bounds from -.5 to .5, where -.5 is the left/bottom edge of the view plane, and .5 is the right/top edge. The cursor view position is used to calculate cursor interaction with Buttons etc.
Camera.setCursorViewPosition parameter: x
[type: number]
The x position for the cursor in terms of Camera view coordinates [-.5,.5]
Camera.setCursorViewPosition parameter: y
[type: number]
The y position for the cursor in terms of Camera view coordinates [-.5,.5]
Camera.setCursorViewPosition parameter: z
[type: number]
The z position for the cursor in terms of Camera view coordinates [-.5,.5] (where .5 is the near side of the frustum)
Camera.setCursorViewPosition parameter: simulateCursorMoveEvent
[type: boolean] [default: false]
Boolean indicating if the "simulateCursorMoveEvent" will automatically be called. If true it should be noted that the associated call to 'simulateCursorMoveEvent' will use the default param 'updateScene=true', which could result in an extra performance cost per invocation.
Camera.getCursorViewPosition(returnVector3)
[type: function] [returns: Vector3]
Returns a Vector3 with the cursor position in terms of Camera view coordinates. Camera view coordinates operate with bounds from -.5 to .5, where -.5 is the left/bottom/far edge of the frustum, and .5 is the right/top/near edge.
Camera.getCursorViewPosition parameter: returnVector3
[type: Vector3] [optional]
Optional Vector3 that can be supplied to avoid the generation of a new Vector3 object for efficiency.
Camera.setCursorPosition(x, y, z, simulateCursorMoveEvent)
[type: function]
Updates the Camera's cursor position from a given world position. The cursor position is used to calculate cursor interaction with Buttons etc.
Camera.setCursorPosition parameter: x
[type: number]
The x position for the cursor in terms of world coordinates
Camera.setCursorPosition parameter: y
[type: number]
The y position for the cursor in terms of world coordinates
Camera.setCursorPosition parameter: z
[type: number]
The z position for the cursor in terms of world coordinates
Camera.setCursorPosition parameter: simulateCursorMoveEvent
[type: boolean] [default: false]
Boolean indicating if the 'simulateCursorMoveEvent' will automatically be called. If true it should be noted that the associated call to 'simulateCursorMoveEvent' will use the default param 'updateScene=true', which could result in an extra performance cost per invocation.
Camera.getCursorPosition(returnVector3)
[type: function] [returns: Vector3]
Returns a Vector3 with the cursor position in terms of world coordinates. The cursor position is used to calculate cursor interaction with Buttons etc.
Camera.getCursorPosition parameter: returnVector3
[type: Vector3] [optional]
Optional Vector3 that can be supplied to avoid the generation of a new Vector3 object for efficiency.
Camera.performManualCursorRolloverCheck()
[type: function]
Manually checks this Camera's cursor position, triggering any appropriate 'cursorIn' or 'cursorOut' callbacks for the appropriate Buttons. This function can be used to ensure that 'cursorIn' or 'cursorOut' callbacks are triggered even when there is no originating cursor event; for example, if Buttons are moving themselves, and a new Button moves under the cursor, invoking this function would evaluate the cursor and button positions and ultimately trigger the 'cursorIn' callback for the new Button.
Camera.simulateCursorMoveEvent(updateScene)
[type: function]
Simulates a 'cursorMove' AppEvent at the current cursor position. Please note that either setCursorViewPosition or setCursorPosition will need to called to actually change the position of the cursor, as this method is only responsible for triggering the cursorMove-related Button callbacks. You can reposition the cursor AND get cursorMove-related Button callbacks by calling setCursorViewPosition or setCursorPosition with paramater simulateCursorMoveEvent=true. Also, please note this Camera must render once before the cursorPosition will intersect with any Buttons.
Camera.simulateCursorMoveEvent parameter: updateScene
[type: boolean] [default: true] [optional]
Boolean determining if the Scene will be manually updated prior to the simulated AppEvent; this ensures that the most recent Scene changes (changes within the current screenUpdate) affecting Button detection are accounted for, but can result in an extra cost to performance per invocation, so should not be overly used.
Camera.simulateCursorPressEvent(updateScene)
[type: function]
Simulates a 'cursorPress' AppEvent at the current cursor position. Call setCursorViewPosition or setCursorPosition prior to calling this function to change the cursor position if needed. Please note this Camera must render once before the cursorPosition will intersect with any Buttons.
Camera.simulateCursorPressEvent parameter: updateScene
[type: boolean] [default: true] [optional]
Boolean determining if the Scene will be manually updated prior to the simulated AppEvent; this ensures that the most recent Scene changes (changes within the current screenUpdate) affecting Button detection are accounted for, but can result in an extra cost to performance per invocation, so should not be overly used.
Camera.simulateCursorReleaseEvent(updateScene)
[type: function]
Simulates a 'cursorRelease' AppEvent at the current cursor position. Call setCursorViewPosition or setCursorPosition prior to calling this function to change the cursor position if needed. Please note this Camera must render once before the cursorPosition will intersect with any Buttons.
Camera.simulateCursorReleaseEvent parameter: updateScene
[type: boolean] [default: true] [optional]
Boolean determining if the Scene will be manually updated prior to the simulated AppEvent; this ensures that the most recent Scene changes (changes within the current screenUpdate) affecting Button detection are accounted for, but can result in an extra cost to performance per invocation, so should not be overly used.
Camera.simulateCursorScrollEvent(updateScene)
[type: function]
Simulates a 'cursorScroll' AppEvent at the current cursor position. Call setCursorViewPosition or setCursorPosition prior to calling this function to change the cursor position if needed. Please note this Camera must render once before the cursorPosition will intersect with any Buttons.
Camera.simulateCursorScrollEvent parameter: updateScene
[type: boolean] [default: true] [optional]
Boolean determining if the Scene will be manually updated prior to the simulated AppEvent; this ensures that the most recent Scene changes (changes within the current screenUpdate) affecting Button detection are accounted for, but can result in an extra cost to performance per invocation, so should not be overly used.
Camera.simulateContextMenuEvent(updateScene)
[type: function]
Simulates a 'contextMenu' AppEvent at the current cursor position. Call setCursorViewPosition or setCursorPosition prior to calling this function to change the cursor position if needed. Please note this Camera must render once before the cursorPosition will intersect with any Buttons. Also, it should be noted that this method is not capable of producing the browser's actual context menu, it is only a means to trigger the Incisor®-level AppEvents and callbacks that such an event would produce.
Camera.simulateContextMenuEvent parameter: updateScene
[type: boolean] [default: true] [optional]
Boolean determining if the Scene will be manually updated prior to the simulated AppEvent; this ensures that the most recent Scene changes (changes within the current screenUpdate) affecting Button detection are accounted for, but can result in an extra cost to performance per invocation, so should not be overly used.
Camera.getIntersections(viewPosition, sceneObjects, intersectionsArray)
[type: function] [returns: [Intersection]]
The means to determine which SceneObject (if any) intersect with a given position within the Camera's view.
Camera.getIntersections parameter: viewPosition
[type: Vector2] [default: Camera.getViewPosition()] [optional]
The position within the Camera's view space [-.5,.5]x[-.5,.5] to use when determining if any SceneObjects intersect.
Camera.getIntersections parameter: sceneObjects
[type: [SceneObject]] [default: Scene.getDescendants()] [optional]
The list of SceneObjects to test for intersection.
Camera.getIntersections parameter: intersectionsArray
[type: Array] [optional]
Optional array that can be provided as an optimization to avoid the creation of a new array.
Camera.clear(clearColor, clearDepth, clearStencil)
[type: function]
Clears the connected RenderTarget's buffers as specified.
Camera.clear parameter: clearColor
[type: boolean] [default: true] [optional]
Boolean indicating if the color buffer should be cleared from the attached RenderTarget.
Camera.clear parameter: clearDepth
[type: boolean] [default: true] [optional]
Boolean indicating if the depth buffer should be cleared from the attached RenderTarget.
Camera.clear parameter: clearStencil
[type: boolean] [default: true] [optional]
Boolean indicating if the clearStencil buffer should be cleared from the attached RenderTarget.
----------------------------------------------------------
Section 11: OrthographicCamera
----------------------------------------------------------
OrthographicCamera
[type: class] [extends: Camera]
An OrthographicCamera is a camera that renders orthographically, with no perspective.
OrthographicCamera.coreViewWidth
[type: number] [default: 500]
The base width of the camera view area (frustum) in 'world units'. This number may not match the actual view width for certain settings of the 'adaptiveCameraMode' property.
OrthographicCamera.coreViewHeight
[type: number] [default: 500]
The base height of the camera view area (frustum) in 'world units'. This number may not match the actual view height for certain settings of the 'adaptiveCameraMode' property.
OrthographicCamera.viewDepth
[type: number] [default: 2000]
The depth of the camera view area (frustum) in 'world units'.
OrthographicCamera.getCurrentViewDimensions()
[type: function] [returns: Vector3]
Returns a Vector3 containing current dimensions of this Camera's current view area, inclusive of any changes brought about by its adaptiveCameraMode.
----------------------------------------------------------
Section 12: Intersection
----------------------------------------------------------
Intersection
[type: class] [NON-INSTANTIABLE]
Class holding the information about an intersection between a point in a Camera's view and a SceneObject in the Scene. Objects of this type are returned from the Camera.getIntersections method.
Intersection.sceneObject
[type: SceneObject]
The SceneObject that is intersected.
Intersection.intersectionPosition
[type: Vector3]
The global position of the intersection within the given Scene.
----------------------------------------------------------
Section 13: Code
----------------------------------------------------------
Code
[type: class] [NON-INSTANTIABLE]
Object housing tools for pre-process manipulation of code such as including files and conditional code. An instance of this object can be refrenced globally by the name of 'CODE'.
Code.includeIf___published
[type: object]
Conditional code opener. Use this tag at the beginning of a section of code that will only be included when the project is published.
Code.includeEnd___published
[type: object]
Conditional code closer. Use this tag at the end of a section of code that will only be included when the project is published.
example:
console.log('this is always happening');
CODE.includeIf___published;
console.log('this is only happening when the project is published');
CODE.includeEnd___published;
Code.includeIf___unpublished
[type: object]
Conditional code opener. Use this tag at the beginning of a section of code that will only be included when the project is not published.
example:
console.log('this is always happening');
CODE.includeIf___unpublished;
console.log('this is only happening when the project is not published');
CODE.includeEnd___unpublished;
Code.includeEnd___unpublished
[type: object]
Conditional code closer. Use this tag at the end of a section of code that will only be included when the project is not published.
example:
console.log('this is always happening');
CODE.includeIf___unpublished;
console.log('this is only happening when the project is not published');
CODE.includeEnd___unpublished;
Code.preserve___begin
[type: object]
Preservation opener. Use this tag at the beginning of a block of code to exempt it from all forms of code formatting including minification, whitespace removal, and comment removal.
Code.preserve___end
[type: object]
Preservation closer. Use this tag at the end of a block of code to exempt it from all forms of code formatting including minification, whitespace removal, and comment removal.
Code.runBeforeInit___begin
[type: object]
A code tag that denotes the beginning of a 'runBeforeInit' block. Generally, code written within Incisor® is completely object-oriented, and as such all code execution must originate from within class objects. In other words, if you open up a new javascript file, and type "nc.addGraphicObject();", you would get an error pointing out that 'nc' doesn't exist, since that code is running in a class-declaration scope. To get that code to execute properly, you would either need to included in a class function that is ultimately called as a result of the ProjectMain.init function, OR you can include that code in a 'runBeforeInit' block, which actually moves the code so that it will be executed right before the invocation of ProjectMain.init. It should be noted that 'runBeforeInit' blocks also exist for code assets, as well as Incisor® extensions, and have a similar effect - moving blocks of code to the same scope as the entry-points for those contexts.
example:
CODE.runBeforeInit___begin;
// since this code is inside of a 'runBeforeInit' block, it will be run right before ProjectMain.init, and all standard classes will have access to the 'whiteBox' var.
var whiteBox = nc.addGraphicObject();
CODE.runBeforeInit___end;
Code.runBeforeInit___end
[type: object]
A code tag that denotes the end of a 'runBeforeInit' block. Generally, code written within Incisor® is completely object-oriented, and as such all code execution must originate from within class objects. In other words, if you open up a new javascript file, and type "nc.addGraphicObject();", you would get an error pointing out that 'nc' doesn't exist, since that code is running in a class-declaration scope. To get that code to execute properly, you would either need to included in a class function that is ultimately called as a result of the ProjectMain.init function, OR you can include that code in a 'runBeforeInit' block, which actually moves the code so that it will be executed right before the invocation of ProjectMain.init. It should be noted that 'runBeforeInit' blocks also exist for code assets, as well as Incisor® extensions, and have a similar effect - moving blocks of code to the same scope as the entry-points for those contexts.
example:
CODE.runBeforeInit___begin;
// since this code is inside of a 'runBeforeInit' block, it will be run right before ProjectMain.init, and all standard classes will have access to the 'whiteBox' var.
var whiteBox = nc.addGraphicObject();
CODE.runBeforeInit___end;
Code.includeIf___MyConditionalCodeTag
[type: object]
Conditional code opener. Use this tag at the beginning of a section of code that will only be included when the associated conditional code tag is enabled in the given configuration.
example:
console.log('this is always happening');
this.includeIf___MyConditionalCodeTag;
console.log('this is only happening when the MyConditionalCodeTag tag is included in the conditionalCodeTagsIncluded array for the current configuration.');
this.includeEnd___MyConditionalCodeTag;
Code.includeEnd___MyConditionalCodeTag
[type: object]
Conditional code closer. Use this tag at the end of a section of code that will only be included when the associated conditional code tag is enabled in the given configuration.
example:
console.log('this is always happening');
this.includeIf___MyConditionalCodeTag;
console.log('this is only happening when the MyConditionalCodeTag tag is included in the conditionalCodeTagsIncluded array for the current configuration.');
this.includeEnd___MyConditionalCodeTag;
Code.includeFile()
[type: function]
Function that inserts Javascript code from another file at the location of the function call.
----------------------------------------------------------
Section 14: Constants
----------------------------------------------------------
Constants
[type: class] [NON-INSTANTIABLE]
Object housing predefined constant values for various Incisor® options and modes.
Constants.wrapModes
[type: dictionary]
The available options for texture wrap modes.
Constants.wrapModes.clamp
[type: string]
Constants.wrapModes.repeat
[type: string]
Constants.wrapModes.mirroredRepeat
[type: string]
Constants.textureDownscalingModes
[type: dictionary]
The available options for texture down-scaling modes.
Constants.textureDownscalingModes.linear
[type: string]
Constants.textureDownscalingModes.nearest
[type: string]
Constants.textureDownscalingModes.discreteMipmapNearest
[type: string]
Constants.textureDownscalingModes.discreteMipmapLinear
[type: string]
Constants.textureDownscalingModes.mipmapLinear
[type: string]
Constants.textureUpscalingModes
[type: dictionary]
The available options for texture up-scaling modes.
Constants.textureUpscalingModes.linear
[type: string]
Constants.textureUpscalingModes.nearest
[type: string]
Constants.adaptiveCameraModes
[type: dictionary]
The available options for adaptive camera modes.
Constants.adaptiveCameraModes.none
[type: string]
Constants.adaptiveCameraModes.maximizeSafeZone
[type: string]
Constants.adaptiveCameraModes.unitsMatchPixels
[type: string]
Constants.effectControllerBaseTypes
[type: dictionary]
The available options for EffectController base types.
Constants.effectControllerBaseTypes.Vector4
[type: string]
Constants.effectControllerBaseTypes.Vector3
[type: string]
Constants.effectControllerBaseTypes.Vector2
[type: string]
Constants.effectControllerBaseTypes.number
[type: string]
Constants.effectControllerBaseTypes.Texture
[type: string]
Constants.effectControllerBaseTypes.Matrix4
[type: string]
Constants.effectControllerBaseTypes.Matrix4Array
[type: string]
Constants.effectControllerMixModes
[type: dictionary]
The available options for EffectController mix modes.
Constants.effectControllerMixModes.addition
[type: string]
Constants.effectControllerMixModes.multiplication
[type: string]
Constants.effectControllerMixModes.materialOnly
[type: string]
Constants.blendingModes
[type: dictionary]
The available options for material blending modes.
Constants.blendingModes.standard
[type: string]
Constants.blendingModes.add
[type: string]
Constants.blendingModes.multiply
[type: string]
Constants.justifications
[type: dictionary]
The available options for layout justifications.
Constants.justifications.left
[type: string]
Constants.justifications.right
[type: string]
Constants.justifications.center
[type: string]
Constants.justifications.top
[type: string]
Constants.justifications.bottom
[type: string]
Constants.geometryAttributeNumberTypes
[type: dictionary]
The available options for Geometry attribute number types.
Constants.geometryAttributeNumberTypes.Int8
[type: string]
Constants.geometryAttributeNumberTypes.UInt8
[type: string]
Constants.geometryAttributeNumberTypes.Int16
[type: string]
Constants.geometryAttributeNumberTypes.UInt16
[type: string]
Constants.geometryAttributeNumberTypes.Int32
[type: string]
Constants.geometryAttributeNumberTypes.UInt32
[type: string]
Constants.geometryAttributeNumberTypes.Float32
[type: string]
Constants.geometryAttributeNumberTypes.Float64
[type: string]
Constants.textBoxEditingModes
[type: dictionary]
The available options textBox editing modes.
Constants.textBoxEditingModes.none
[type: string]
Constants.textBoxEditingModes.selectable
[type: string]
Constants.textBoxEditingModes.selecting
[type: string]
Constants.textBoxEditingModes.editable
[type: string]
Constants.textBoxEditingModes.editing
[type: string]
Constants.playbackStates
[type: dictionary]
The available playback states for PlaybackControllers.
Constants.playbackStates.stopped
[type: string]
Constants.playbackStates.paused
[type: string]
Constants.playbackStates.playing
[type: string]
Constants.particleSystemEmitterShapes
[type: dictionary]
The available types of ParticleSystemDefinition shapes
Constants.particleSystemEmitterShapes.rectangle
[type: string]
Constants.particleSystemEmitterShapes.circleUniform
[type: string]
Constants.particleSystemEmitterShapes.circleCenter
[type: string]
Constants.particleSystemEmitterShapes.point
[type: string]
Constants.particleSystemEmitterShapes.custom
[type: string]
Constants.particleSystemRampInterpolationTypes
[type: dictionary]
The available ParticleSystemDefinition ramp interpolation types.
Constants.particleSystemRampInterpolationTypes.linear
[type: string]
Constants.particleSystemRampInterpolationTypes.smoothStep
[type: string]
Constants.particleSystemRampInterpolationTypes.catmullRom
[type: string]
Constants.particleSystemRampInputTypes
[type: dictionary]
The available types of input for ParticleSystemDefinition ramps.
Constants.particleSystemRampInputTypes.emissionTime
[type: string]
Constants.particleSystemRampInputTypes.ageRatio
[type: string]
Constants.pdfUnderlineTypes
[type: dictionary]
The styles of underlining available within the Pdf object.
Constants.pdfUnderlineTypes.single
[type: string]
Constants.pdfUnderlineTypes.dash
[type: string]
Constants.pdfUnderlineTypes.dotDash
[type: string]
Constants.pdfUnderlineTypes.dotDotDash
[type: string]
Constants.pdfUnderlineTypes.words
[type: string]
Constants.pdfHeightRuleTypes
[type: dictionary]
The options avaiable within the Pdf object for fitting items within a designated area height.
Constants.pdfHeightRuleTypes.autoFit
[type: string]
Constants.pdfHeightRuleTypes.exactly
[type: string]
Constants.pdfHeightRuleTypes.atLeast
[type: string]
Constants.maskingTypes
[type: dictionary]
Options for masking - either being masked, or doing the masking.
Constants.maskingTypes.mask
[type: string]
Constants.maskingTypes.masked
[type: string]
Constants.registeredPropertyTypes
[type: dictionary]
The property types available to be registered within a CutsomObject or CustomAddOn.
Constants.registeredPropertyTypes.number
[type: string]
Constants.registeredPropertyTypes.string
[type: string]
Constants.registeredPropertyTypes.boolean
[type: string]
Constants.registeredPropertyTypes.function
[type: string]
Constants.curvePointBezierHandleTypes
[type: dictionary]
The types of CurvePoint bezier handles that are available to be used within Curves.
Constants.curvePointBezierHandleTypes.independent
[type: string]
The left and right handles can be moved independently, allowing for sharp discontinuities in the tangent of the Curve.
Constants.curvePointBezierHandleTypes.aligned
[type: string]
The left and right handles are always colinear with the position.
Constants.curvePointBezierHandleTypes.symmetric
[type: string]
The left and right handles are always colinear with the position, and both handles are the same distance from the position.
Constants.curveTypes
[type: dictionary]
The available curve types.
Constants.curveTypes.bezier
[type: string]
Each CurvePoint has left and right handles, allowing for manual control of the Curve's tangent, including sharp discontinuities. The Curve passes through all CurvePoints.
Constants.curveTypes.hermite
[type: string]
Each CurvePoint has a right handle, allowing for manual control of the Curve's tangent and enforcing a smoothly continuous tangent. The Curve passes through all CurvePoints.
Constants.curveTypes.cardinal
[type: string]
Each CurvePoint has no handles, and the Curve's tangent is automatically computed based on the surrounding CurvePoints, producing a smoothly continuous tangent. The Curve starts at the second CurvePoint and ends at the second to last CurvePoint, and passes through all intermediate CurvePoints. At least 4 CurvePoints are required.
Constants.curveTypes.basis
[type: string]
Also known as a B-spline. Each CurvePoint has no handles, and the Curve's tangent is automatically computed based on the surrounding CurvePoints. The Curve starts at the second CurvePoint and ends at the second to last CurvePoint. The curve will not necessarily pass through any of the CurvePoints, but will exhibit smoothly continuous tangent and acceleration when using 'evaluateT'. At least 4 CurvePoints are required.
Constants.slotReelStates
[type: dictionary]
Dictionary of available 'reelState' values within the SlotReel.
Constants.slotReelStates.stopped
[type: string]
For when the SlotReel is stopped.
Constants.slotReelStates.windup
[type: string]
For when the SlotReel is winding up before it spins.
Constants.slotReelStates.spinFree
[type: string]
For when the SlotReel freely spinning.
Constants.slotReelStates.stopping
[type: string]
For when the SlotReel begins to stop, spinning until the symbols in the stopping window are encountered.
Constants.slotReelStates.stopImminent
[type: string]
This state occurs when the final stopping symbols are active on the SlotReel, and they just need to travel into their final position.
Constants.slotReelStates.bounce
[type: string]
Right before the SlotReel spin is over, and the symbols are bouncing around to simulate a physical recoil action.
----------------------------------------------------------
Section 15: ConstructDefinition
----------------------------------------------------------
ConstructDefinition
[type: class] [NON-INSTANTIABLE]
ConstructDefinitions house the defining attributes of Constructs. To create an instance of a given Construct, use 'nc.myConstruct.add()'.
ConstructDefinition.type
[type: string]
Type identifier.
ConstructDefinition.name
[type: string]
The name of the ConstructDefinition.
ConstructDefinition.blueprint
[type: Blueprint]
Object defining the Construct's composition and layout.
ConstructDefinition.unitsPerPixel
[type: [number]]
Array of numbers that multiply all of the positions and scales related to this Construct.
ConstructDefinition.add(parent, name)
[type: function]
Adds an instance of this Construct to the given parent.
ConstructDefinition.add parameter: parent
[type: SceneObject] [default: nc.mainScene] [optional]
The SceneObject that will be the parent of the newly added Construct instance.
ConstructDefinition.add parameter: name
[type: string] [optional]
The name of the newly added Construct instance. If left undefined, this propery will default to the name of the Construct.
ConstructDefinition.getPortableObject()
[type: function]
Returns an object version of the ConstructDefinition equivalent to the '.construct' file that defines this Construct.
----------------------------------------------------------
Section 16: Blueprint
----------------------------------------------------------
Blueprint
[type: class]
Object that stores information about a collection of SceneObjects that can be recreated later. This object is the foundation for Incisor® Constructs.
----------------------------------------------------------
Section 17: Construct
----------------------------------------------------------
Construct
[type: class] [extends: SceneObject] [NON-INSTANTIABLE]
Constructs are collections of different types of SceneObjects that can be built, arranged, and animated from within the Incisor® GUI. For a list of available ConstructDefinitions, see 'nc.constructDefs'.
Construct.constructDefinition
[type: ConstructDefinition]
The ConstructDefinition associated with this Construct. Once a Construct is instantiated, this value cannot change.
----------------------------------------------------------
Section 18: CursorInputOverrideButton
----------------------------------------------------------
CursorInputOverrideButton
[type: class] [extends: Button]
CursorInputOverrideButtons are specialized Buttons that serve as 'cursor input remapping surfaces'. These objects can be connected to Cameras (via Camera.cursorInputOverride), and serve as the means to map cursor input from an outer Scene into an inner Scene. When connected, the moving the cursor around the inside edge of the CursorInputOverrideButton will map the cursor to the inner edge of the Camera's viewing area within the Scene that the Camera is rendering. This only applies to Cameras whose 'cursorInteractive' property is set to true.
CursorInputOverrideButton.allowExtendedDrag
[type: boolean] [default: false]
Flag determining if items within the inner scene can be dragged outside of the bounds of the viewing camera.
----------------------------------------------------------
Section 19: Curve
----------------------------------------------------------
Curve
[type: class]
A Curve is a path defined by CurvePoints. The value of 'curveType' determines how the CurvePoints are interpreted to form the path.
Curve.curveType
[type: string] [default: "bezier"]
The type of spline defining this Curve. See 'constants.curveTypes' for a list of available values.
Curve.cardinalTension
[type: number] [default: 0.5]
When curveType is set to 'cardinal', this controls the curvature of the Curve. 0 produces straight lines between CurvePoints. 0.5 produces a Catmull-Rom spline.
Curve.points
[type: [CurvePoint]]
The list of CurvePoints that define the curve shape. Each value of 'curveType' causes this list of CurvePoints to produce a different curve.
Curve.evaluateT(t, positionResult, tangentResult, normalResult, rotationResult, velocityResult)
[type: function]
Evaluates the Curve at the given T value, which spans the entire curve in the range 0-1. Note that this typically does not progress with a constant speed, but is faster than evaluating a given distance with evaluateDistance.
Curve.evaluateT parameter: t
[type: number]
The T value to evaluate, mapped to the range 0-1 along the length of the curve.
Curve.evaluateT parameter: positionResult
[type: Vector3]
The resulting position expressed in the local space of the curve.
Curve.evaluateT parameter: tangentResult
[type: Vector3] [optional]
The resulting tangent expressed in the local space of the curve. This corresponds to the velocity of a point following the curve via evaluateT, and is not normalized.
Curve.evaluateT parameter: normalResult
[type: Vector3] [optional]
The resulting normal expressed in the local space of the curce. This vector is orthogonal to the tangent and is normalized.
Curve.evaluateT parameter: rotationResult
[type: Vector3] [optional]
The resulting rotation that corresponds to the tangent and normal vectors.
Curve.evaluateT parameter: velocityResult
[type: Vector3] [optional]
The resulting velocity expressed in the local space of the curve. If a point were to follow this curve via linearly increasing t values, this would be the velocity of the point at this position. Also known as the Curve's derivative.
Curve.evaluateDistance(distance, positionResult, tangentResult, normalResult, rotationResult, velocityResult)
[type: function]
Evaluates the Curve at the given distance value, which spans the curve's length. Note that this allows progression at a constant speed, but is slower than evaluating a given T value with evaluateT.
Curve.evaluateDistance parameter: distance
[type: number]
The distance to evaluate along the arc length of the curve.
Curve.evaluateDistance parameter: positionResult
[type: Vector3]
The resulting position expressed in the local space of the curve.
Curve.evaluateDistance parameter: tangentResult
[type: Vector3] [optional]
The resulting tangent expressed in the local space of the curve. This corresponds to the velocity of a point following the curve via evaluateT, and is not normalized.
Curve.evaluateDistance parameter: normalResult
[type: Vector3] [optional]
The resulting normal expressed in the local space of the curce. This vector is orthogonal to the tangent and is normalized.
Curve.evaluateDistance parameter: rotationResult
[type: Vector3] [optional]
The resulting rotation that corresponds to the tangent and normal vectors.
Curve.evaluateDistance parameter: velocityResult
[type: Vector3] [optional]
The resulting velocity expressed in the local space of the curve. If a point were to follow this curve via linearly increasing t values, this would be the velocity of the point at this position. Also known as the Curve's derivative.
Curve.updatePoints()
[type: function]
If ControlPoints are added to or removed from the points array, the curve will not be updated. This function foces the curve to reevaluate the points.
Curve.addCurveChangeCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback that will be called when the curve shape changes. This includes changes to the CurvePoints, and changes to the curveType and cardinalTension.
Curve.addCurveChangeCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Curve.addCurveChangeCallback parameter: callbackName
[type: string]
The name of the callback function.
Curve.addCurveChangeCallback parameter: callbackArgs
[type: Array, any] [optional]
Arguments for the callback function. Please note that the Curve object will be prepended to the list of callback parameters.
Curve.removeCurveChangeCallback(callbackOwner, callbackName)
[type: function]
Removes the callback for when the curve shape changes.
Curve.removeCurveChangeCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
Curve.removeCurveChangeCallback parameter: callbackName
[type: string]
The name of the callback function.
Curve.addPoint()
[type: function] [returns: CurvePoint]
Adds a new CurvePoint to the points array.
Curve.getLength()
[type: function] [returns: number]
Returns the total arc of the curve.
----------------------------------------------------------
Section 20: CurvePoint
----------------------------------------------------------
CurvePoint
[type: class] [NON-INSTANTIABLE]
A CurvePoint is a point used to define a Curve's shape.
CurvePoint.position
[type: Vector3] [default: new Vector3(0,0,0)]
The position of the CurvePoint in the local space of the Curve.
CurvePoint.leftHandle
[type: Vector3] [default: new Vector3(-100,0,0)]
The left handle of the CurvePoint, expressed with respect to the CurvePoint's position. If the Curve's curveType is not 'bezier' or the CurvePoint is the first in the points array, this is undefined.
CurvePoint.rightHandle
[type: Vector3] [default: new Vector3(100,0,0)]
The right handle of the CurvePoint, expressed with respect to the CurvePoint's position. If the Curve's curveType is not 'bezier' or 'hermite' or the CurvePoint is the last in the points array, this is undefined.
CurvePoint.bezierHandleType
[type: string] [default: "aligned"]
The behavior of this CurvePoint when the Curve's curveType is "bezier" and one of the handles is moved. When a handle moves, "aligned" will ensure that the other handle remains colinear with the position and moved handle. "symmetric" will ensure that the other handle remains colinear with the position and moved handle, and matches the moved handles distance from the position.
CurvePoint.clone()
[type: function] [returns: number]
Returns a unique copy of this CurvePoint.
----------------------------------------------------------
Section 21: CustomAddOnDefinition
----------------------------------------------------------
CustomAddOnDefinition
[type: class] [NON-INSTANTIABLE]
Object housing information about the CustomAddOns currently registered in this project.
CustomAddOnDefinition.name
[type: string]
The name of the CustomAddOn.
CustomAddOnDefinition.baseType
[type: string]
The the name base type of the given CustomAddOn definition. Every registered CustomAddOn must extend one of the CustomAddOn types (i.e. CustomAddOn_SceneObject, CustomAddOn_GraphicObject, etc...), and this value denotes which of those types were extended to to create this particular CustomAddOn.
CustomAddOnDefinition.acceptableOwner
[type: string]
The name of the type that is required as an owner. For example, if the CustomAddOn extended CustomAddOn_Button, then the 'acceptableOnwer' value would be 'Button' and this CustomAddOn can only be added to objects that extend the Button type.
CustomAddOnDefinition.properties
[type: [object]]
Array of objects that containing information about the registered properties for this CustomAddOn. Registered properties are accessible for monitoring and manipulating within the inspector. Registered properties can also be flagged as 'persistent', which enables their values to be stored in containing Constructs. To register a property for a CustomAddOn call 'nc.registerCustomAddOnProperty'. If this CustomAddOn has no registered properties, then this member will be undefined.
CustomAddOnDefinition.classDefinition
[type: object]
The class definition for this CustomAddOn.
----------------------------------------------------------
Section 22: RegisteredProperty
----------------------------------------------------------
RegisteredProperty
[type: class] [NON-INSTANTIABLE]
Object housing information about the CustomAddOns currently registered in this project.
RegisteredProperty.type
[type: string]
The type of the RegisteredProperty.
RegisteredProperty.propertyPath
[type: [string]]
The path from given CustomAddOn instance to the property.
RegisteredProperty.isPersistent
[type: boolean] [default: true]
Flag determining if the registered property's value should be stored in an owning Construct. To make the values of this property persistent within Constructs, set this flag to true.
RegisteredProperty.validationList
[type: [any]] [default: undefined]
If this property is of type 'number' or 'string', then an Array of the given type can be provided so that the values appear in a drop-down list in the inspector, thus ensuring that only the given values are available to be selected within the GUI.
RegisteredProperty.validationCallbackOwner
[type: object] [default: undefined]
If this property is of type 'number' or 'string', and a validation list has not been provided, then a function callback can be provided for a method which accepts the property value and returns a sanitized version of the value. This property is the owner of that callback.
RegisteredProperty.validationCallbackName
[type: string] [default: undefined]
If this property is of type 'number' or 'string', and a validation list has not been provided, then a function callback can be provided for a method which accepts the property value and returns a sanitized version of the value. This property is the name of that callback.
RegisteredProperty.validationCallbackArgs
[type: string] [default: undefined]
If this property is of type 'number' or 'string', and a validation list has not been provided, then a function callback can be provided for a method which accepts the property value and returns a sanitized version of the value. This property represents the parameters for that callback.
RegisteredProperty.dragMultiplier
[type: number] [default: 1]
If this property is of type 'number', then this number can control how sensative the property's supervisor is with regards to the cursor-drag interactivity.
----------------------------------------------------------
Section 23: CustomAddOn_SceneObject
----------------------------------------------------------
CustomAddOn_SceneObject
[type: class] [NON-INSTANTIABLE]
CustomAddOns are objects containing modular user-defined functionality that can be added to different types of SceneObjects in the GUI. The type of the particular CustomAddOn determines what type of SceneObject it can be added to. For example, a CustomAddOn_SceneObject can be added to all objects that inherit from SceneObject, while a CustomAddOn_Button can only be added to objects that inherit from Button. To add a CustomAddOn in code, simply create a new instance of the CustomAddOn, passing the owning object as the parameter. To make a CustomAddOn available in the Incisor inspector build a class that extends one of the CustomAddOn types within a 'codeAsset' file, then call 'nc.registerCustomAddOn' in a 'runBeforeInit' block to register the new CustomAddOn type with the GUI. Once a CustomAddOn is added to another object, it can be found in that object's 'customAddOns' member, which is a dictionary of CustomAddOns.
CustomAddOn_SceneObject.type
[type: string]
Type identifier.
CustomAddOn_SceneObject.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
CustomAddOn_SceneObject.name
[type: string]
The name of the CustomAddOn - this will automatically be set to match the name of the class definition.
CustomAddOn_SceneObject.owner
[type: SceneObject]
The owner of this CustomAddOn. This is the object that this CustomAddOn is meant to add its functionality to.
CustomAddOn_SceneObject.addDisposalCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback for when this CustomAddOn is disposed. It should be noted that this CustomAddOn will be automatically disposed if the owning object is disposed.
CustomAddOn_SceneObject.addDisposalCallback parameter: callbackOwner
[type: object]
The object owning the callback that occurs when this CustomAddOn is disposed.
CustomAddOn_SceneObject.addDisposalCallback parameter: callbackName
[type: string]
The name of the callback that occurs when this CustomAddOn is disposed.
CustomAddOn_SceneObject.addDisposalCallback parameter: callbackArgs
[type: Array, any] [optional]
Parameters for this callback.
CustomAddOn_SceneObject.removeDisposalCallback(callbackOwner, callbackName)
[type: function]
Removes a callback for when this CustomAddOn is disposed.
CustomAddOn_SceneObject.removeDisposalCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
CustomAddOn_SceneObject.removeDisposalCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
CustomAddOn_SceneObject.dispose()
[type: function]
Removes this CustomAddOn from its owner and performs any registered disposal callbacks.
It should be noted that this CustomAddOn will be automatically disposed if the owning object is disposed.
----------------------------------------------------------
Section 24: CustomAddOn_GraphicObject
----------------------------------------------------------
CustomAddOn_GraphicObject
[type: class] [NON-INSTANTIABLE]
CustomAddOns are objects containing modular user-defined functionality that can be added to different types of SceneObjects in the GUI. The type of the particular CustomAddOn determines what type of SceneObject it can be added to. For example, a CustomAddOn_SceneObject can be added to all objects that inherit from SceneObject, while a CustomAddOn_Button can only be added to objects that inherit from Button. To add a CustomAddOn in code, simply create a new instance of the CustomAddOn, passing the owning object as the parameter. To make a CustomAddOn available in the Incisor inspector build a class that extends one of the CustomAddOn types within a 'codeAsset' file, then call 'nc.registerCustomAddOn' in a 'runBeforeInit' block to register the new CustomAddOn type with the GUI. Once a CustomAddOn is added to another object, it can be found in that object's 'customAddOns' member, which is a dictionary of CustomAddOns.
CustomAddOn_GraphicObject.type
[type: string]
Type identifier.
CustomAddOn_GraphicObject.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
CustomAddOn_GraphicObject.name
[type: string]
The name of the CustomAddOn - this will automatically be set to match the name of the class definition.
CustomAddOn_GraphicObject.owner
[type: GraphicObject]
The owner of this CustomAddOn. This is the object that this CustomAddOn is meant to add its functionality to.
CustomAddOn_GraphicObject.addDisposalCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback for when this CustomAddOn is disposed. It should be noted that this CustomAddOn will be automatically disposed if the owning object is disposed.
CustomAddOn_GraphicObject.addDisposalCallback parameter: callbackOwner
[type: object]
The object owning the callback that occurs when this CustomAddOn is disposed.
CustomAddOn_GraphicObject.addDisposalCallback parameter: callbackName
[type: string]
The name of the callback that occurs when this CustomAddOn is disposed.
CustomAddOn_GraphicObject.addDisposalCallback parameter: callbackArgs
[type: Array, any] [optional]
Parameters for this callback.
CustomAddOn_GraphicObject.removeDisposalCallback(callbackOwner, callbackName)
[type: function]
Removes a callback for when this CustomAddOn is disposed.
CustomAddOn_GraphicObject.removeDisposalCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
CustomAddOn_GraphicObject.removeDisposalCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
CustomAddOn_GraphicObject.dispose()
[type: function]
Removes this CustomAddOn from its owner and performs any registered disposal callbacks.
It should be noted that this CustomAddOn will be automatically disposed if the owning object is disposed.
----------------------------------------------------------
Section 25: CustomAddOn_Button
----------------------------------------------------------
CustomAddOn_Button
[type: class] [NON-INSTANTIABLE]
CustomAddOns are objects containing modular user-defined functionality that can be added to different types of SceneObjects in the GUI. The type of the particular CustomAddOn determines what type of SceneObject it can be added to. For example, a CustomAddOn_SceneObject can be added to all objects that inherit from SceneObject, while a CustomAddOn_Button can only be added to objects that inherit from Button. To add a CustomAddOn in code, simply create a new instance of the CustomAddOn, passing the owning object as the parameter. To make a CustomAddOn available in the Incisor inspector build a class that extends one of the CustomAddOn types within a 'codeAsset' file, then call 'nc.registerCustomAddOn' in a 'runBeforeInit' block to register the new CustomAddOn type with the GUI. Once a CustomAddOn is added to another object, it can be found in that object's 'customAddOns' member, which is a dictionary of CustomAddOns.
CustomAddOn_Button.type
[type: string]
Type identifier.
CustomAddOn_Button.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
CustomAddOn_Button.name
[type: string]
The name of the CustomAddOn - this will automatically be set to match the name of the class definition.
CustomAddOn_Button.owner
[type: Button]
The owner of this CustomAddOn. This is the object that this CustomAddOn is meant to add its functionality to.
CustomAddOn_Button.addDisposalCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback for when this CustomAddOn is disposed. It should be noted that this CustomAddOn will be automatically disposed if the owning object is disposed.
CustomAddOn_Button.addDisposalCallback parameter: callbackOwner
[type: object]
The object owning the callback that occurs when this CustomAddOn is disposed.
CustomAddOn_Button.addDisposalCallback parameter: callbackName
[type: string]
The name of the callback that occurs when this CustomAddOn is disposed.
CustomAddOn_Button.addDisposalCallback parameter: callbackArgs
[type: Array, any] [optional]
Parameters for this callback.
CustomAddOn_Button.removeDisposalCallback(callbackOwner, callbackName)
[type: function]
Removes a callback for when this CustomAddOn is disposed.
CustomAddOn_Button.removeDisposalCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
CustomAddOn_Button.removeDisposalCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
CustomAddOn_Button.dispose()
[type: function]
Removes this CustomAddOn from its owner and performs any registered disposal callbacks.
It should be noted that this CustomAddOn will be automatically disposed if the owning object is disposed.
----------------------------------------------------------
Section 26: CustomAddOn_TextBox
----------------------------------------------------------
CustomAddOn_TextBox
[type: class] [NON-INSTANTIABLE]
CustomAddOns are objects containing modular user-defined functionality that can be added to different types of SceneObjects in the GUI. The type of the particular CustomAddOn determines what type of SceneObject it can be added to. For example, a CustomAddOn_SceneObject can be added to all objects that inherit from SceneObject, while a CustomAddOn_Button can only be added to objects that inherit from Button. To add a CustomAddOn in code, simply create a new instance of the CustomAddOn, passing the owning object as the parameter. To make a CustomAddOn available in the Incisor inspector build a class that extends one of the CustomAddOn types within a 'codeAsset' file, then call 'nc.registerCustomAddOn' in a 'runBeforeInit' block to register the new CustomAddOn type with the GUI. Once a CustomAddOn is added to another object, it can be found in that object's 'customAddOns' member, which is a dictionary of CustomAddOns.
CustomAddOn_TextBox.type
[type: string]
Type identifier.
CustomAddOn_TextBox.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
CustomAddOn_TextBox.name
[type: string]
The name of the CustomAddOn - this will automatically be set to match the name of the class definition.
CustomAddOn_TextBox.owner
[type: TextBox]
The owner of this CustomAddOn. This is the object that this CustomAddOn is meant to add its functionality to.
CustomAddOn_TextBox.addDisposalCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback for when this CustomAddOn is disposed. It should be noted that this CustomAddOn will be automatically disposed if the owning object is disposed.
CustomAddOn_TextBox.addDisposalCallback parameter: callbackOwner
[type: object]
The object owning the callback that occurs when this CustomAddOn is disposed.
CustomAddOn_TextBox.addDisposalCallback parameter: callbackName
[type: string]
The name of the callback that occurs when this CustomAddOn is disposed.
CustomAddOn_TextBox.addDisposalCallback parameter: callbackArgs
[type: Array, any] [optional]
Parameters for this callback.
CustomAddOn_TextBox.removeDisposalCallback(callbackOwner, callbackName)
[type: function]
Removes a callback for when this CustomAddOn is disposed.
CustomAddOn_TextBox.removeDisposalCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
CustomAddOn_TextBox.removeDisposalCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
CustomAddOn_TextBox.dispose()
[type: function]
Removes this CustomAddOn from its owner and performs any registered disposal callbacks.
It should be noted that this CustomAddOn will be automatically disposed if the owning object is disposed.
----------------------------------------------------------
Section 27: CustomAddOn_TextAssembly
----------------------------------------------------------
CustomAddOn_TextAssembly
[type: class] [NON-INSTANTIABLE]
CustomAddOns are objects containing modular user-defined functionality that can be added to different types of SceneObjects in the GUI. The type of the particular CustomAddOn determines what type of SceneObject it can be added to. For example, a CustomAddOn_SceneObject can be added to all objects that inherit from SceneObject, while a CustomAddOn_Button can only be added to objects that inherit from Button. To add a CustomAddOn in code, simply create a new instance of the CustomAddOn, passing the owning object as the parameter. To make a CustomAddOn available in the Incisor inspector build a class that extends one of the CustomAddOn types within a 'codeAsset' file, then call 'nc.registerCustomAddOn' in a 'runBeforeInit' block to register the new CustomAddOn type with the GUI. Once a CustomAddOn is added to another object, it can be found in that object's 'customAddOns' member, which is a dictionary of CustomAddOns.
CustomAddOn_TextAssembly.type
[type: string]
Type identifier.
CustomAddOn_TextAssembly.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
CustomAddOn_TextAssembly.name
[type: string]
The name of the CustomAddOn - this will automatically be set to match the name of the class definition.
CustomAddOn_TextAssembly.owner
[type: TextAssembly]
The owner of this CustomAddOn. This is the object that this CustomAddOn is meant to add its functionality to.
CustomAddOn_TextAssembly.addDisposalCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback for when this CustomAddOn is disposed. It should be noted that this CustomAddOn will be automatically disposed if the owning object is disposed.
CustomAddOn_TextAssembly.addDisposalCallback parameter: callbackOwner
[type: object]
The object owning the callback that occurs when this CustomAddOn is disposed.
CustomAddOn_TextAssembly.addDisposalCallback parameter: callbackName
[type: string]
The name of the callback that occurs when this CustomAddOn is disposed.
CustomAddOn_TextAssembly.addDisposalCallback parameter: callbackArgs
[type: Array, any] [optional]
Parameters for this callback.
CustomAddOn_TextAssembly.removeDisposalCallback(callbackOwner, callbackName)
[type: function]
Removes a callback for when this CustomAddOn is disposed.
CustomAddOn_TextAssembly.removeDisposalCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
CustomAddOn_TextAssembly.removeDisposalCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
CustomAddOn_TextAssembly.dispose()
[type: function]
Removes this CustomAddOn from its owner and performs any registered disposal callbacks.
It should be noted that this CustomAddOn will be automatically disposed if the owning object is disposed.
----------------------------------------------------------
Section 28: CustomAddOn_ParticleSystem
----------------------------------------------------------
CustomAddOn_ParticleSystem
[type: class] [NON-INSTANTIABLE]
CustomAddOns are objects containing modular user-defined functionality that can be added to different types of SceneObjects in the GUI. The type of the particular CustomAddOn determines what type of SceneObject it can be added to. For example, a CustomAddOn_SceneObject can be added to all objects that inherit from SceneObject, while a CustomAddOn_Button can only be added to objects that inherit from Button. To add a CustomAddOn in code, simply create a new instance of the CustomAddOn, passing the owning object as the parameter. To make a CustomAddOn available in the Incisor inspector build a class that extends one of the CustomAddOn types within a 'codeAsset' file, then call 'nc.registerCustomAddOn' in a 'runBeforeInit' block to register the new CustomAddOn type with the GUI. Once a CustomAddOn is added to another object, it can be found in that object's 'customAddOns' member, which is a dictionary of CustomAddOns.
CustomAddOn_ParticleSystem.type
[type: string]
Type identifier.
CustomAddOn_ParticleSystem.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
CustomAddOn_ParticleSystem.name
[type: string]
The name of the CustomAddOn - this will automatically be set to match the name of the class definition.
CustomAddOn_ParticleSystem.owner
[type: ParticleSystem]
The owner of this CustomAddOn. This is the object that this CustomAddOn is meant to add its functionality to.
CustomAddOn_ParticleSystem.addDisposalCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback for when this CustomAddOn is disposed. It should be noted that this CustomAddOn will be automatically disposed if the owning object is disposed.
CustomAddOn_ParticleSystem.addDisposalCallback parameter: callbackOwner
[type: object]
The object owning the callback that occurs when this CustomAddOn is disposed.
CustomAddOn_ParticleSystem.addDisposalCallback parameter: callbackName
[type: string]
The name of the callback that occurs when this CustomAddOn is disposed.
CustomAddOn_ParticleSystem.addDisposalCallback parameter: callbackArgs
[type: Array, any] [optional]
Parameters for this callback.
CustomAddOn_ParticleSystem.removeDisposalCallback(callbackOwner, callbackName)
[type: function]
Removes a callback for when this CustomAddOn is disposed.
CustomAddOn_ParticleSystem.removeDisposalCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
CustomAddOn_ParticleSystem.removeDisposalCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
CustomAddOn_ParticleSystem.dispose()
[type: function]
Removes this CustomAddOn from its owner and performs any registered disposal callbacks.
It should be noted that this CustomAddOn will be automatically disposed if the owning object is disposed.
----------------------------------------------------------
Section 29: CustomAddOn_Construct
----------------------------------------------------------
CustomAddOn_Construct
[type: class] [NON-INSTANTIABLE]
CustomAddOns are objects containing modular user-defined functionality that can be added to different types of SceneObjects in the GUI. The type of the particular CustomAddOn determines what type of SceneObject it can be added to. For example, a CustomAddOn_SceneObject can be added to all objects that inherit from SceneObject, while a CustomAddOn_Button can only be added to objects that inherit from Button. To add a CustomAddOn in code, simply create a new instance of the CustomAddOn, passing the owning object as the parameter. To make a CustomAddOn available in the Incisor inspector build a class that extends one of the CustomAddOn types within a 'codeAsset' file, then call 'nc.registerCustomAddOn' in a 'runBeforeInit' block to register the new CustomAddOn type with the GUI. Once a CustomAddOn is added to another object, it can be found in that object's 'customAddOns' member, which is a dictionary of CustomAddOns.
CustomAddOn_Construct.type
[type: string]
Type identifier.
CustomAddOn_Construct.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
CustomAddOn_Construct.name
[type: string]
The name of the CustomAddOn - this will automatically be set to match the name of the class definition.
CustomAddOn_Construct.owner
[type: Construct]
The owner of this CustomAddOn. This is the object that this CustomAddOn is meant to add its functionality to.
CustomAddOn_Construct.addDisposalCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback for when this CustomAddOn is disposed. It should be noted that this CustomAddOn will be automatically disposed if the owning object is disposed.
CustomAddOn_Construct.addDisposalCallback parameter: callbackOwner
[type: object]
The object owning the callback that occurs when this CustomAddOn is disposed.
CustomAddOn_Construct.addDisposalCallback parameter: callbackName
[type: string]
The name of the callback that occurs when this CustomAddOn is disposed.
CustomAddOn_Construct.addDisposalCallback parameter: callbackArgs
[type: Array, any] [optional]
Parameters for this callback.
CustomAddOn_Construct.removeDisposalCallback(callbackOwner, callbackName)
[type: function]
Removes a callback for when this CustomAddOn is disposed.
CustomAddOn_Construct.removeDisposalCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
CustomAddOn_Construct.removeDisposalCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
CustomAddOn_Construct.dispose()
[type: function]
Removes this CustomAddOn from its owner and performs any registered disposal callbacks.
It should be noted that this CustomAddOn will be automatically disposed if the owning object is disposed.
----------------------------------------------------------
Section 30: CustomObjectDefinition
----------------------------------------------------------
CustomObjectDefinition
[type: class] [NON-INSTANTIABLE]
Object housing information about the CustomObjects currently registered in this project. A 'CustomObject' is any object that inherits from one of the standard hierarchy objects (i.e. SceneObject, GraphicObject, Button, etc...), that is registered with the Incisor inspector using 'nc.registerCustomObject'. Once registered, CustomObjects can be added to Constructs from within the Incisor GUI. CustomObject properties can also be registered with Incisor, making them accessible for monitoring and manipulating from within the inspector. To create a CustomObject, build a class that extends one of the standard Incisor hierarchy object types within a 'codeAsset' file, then call 'nc.registerCustomObject' in a 'runBeforeInit' block to register the new CustomObject type with the GUI.
CustomObjectDefinition.name
[type: string]
The name of the CustomObject.
CustomObjectDefinition.baseType
[type: string]
The the name base type of the given CustomObject definition. Every registered CustomObject must extend one of the allowable CustomObject types (i.e. SceneObject, GraphicObject, etc...), and this value denotes which of those types were extended to create this particular CustomObject.
CustomObjectDefinition.properties
[type: [object]]
Array of objects that containing information about the registered properties for this CustomObject. Registered properties are accessible for monitoring and manipulating within the inspector. Registered properties can also be flagged as 'persistent', which enables their values to be stored in containing Constructs. To register a property for a CustomObject call 'nc.registerCustomObjectProperty'. If this CustomObject has no registered properties, then this member will be undefined.
CustomObjectDefinition.classDefinition
[type: object]
The class definition for this CustomObject.
----------------------------------------------------------
Section 31: shapifySwoop
----------------------------------------------------------
shapifySwoop
[type: class]
The shapify Swoop object - contains the swoopers for this EffectController's components.
shapifySwoop.edgeOffset(endValue, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Swooper]
Swoops (interpolates) 'edgeOffset' component from its current value to the given end value over the duration.
shapifySwoop.edgeOffset parameter: endValue
[type: number]
The ending value for the numeric property being swooped.
shapifySwoop.edgeOffset parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation.
shapifySwoop.edgeOffset parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
shapifySwoop.edgeOffset parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
shapifySwoop.edgeOffset parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
shapifySwoop.edgeOffset parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
shapifySwoop.edgeOffset parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
shapifySwoop.edgeOffset parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
shapifySwoop.edgeOffset parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the swooping process.
shapifySwoop.edgeOffset parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the swooping process.
shapifySwoop.edgeFeather(endValue, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Swooper]
Swoops (interpolates) 'edgeFeather' component from its current value to the given end value over the duration.
shapifySwoop.edgeFeather parameter: endValue
[type: number]
The ending value for the numeric property being swooped.
shapifySwoop.edgeFeather parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation.
shapifySwoop.edgeFeather parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
shapifySwoop.edgeFeather parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
shapifySwoop.edgeFeather parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
shapifySwoop.edgeFeather parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
shapifySwoop.edgeFeather parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
shapifySwoop.edgeFeather parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
shapifySwoop.edgeFeather parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the swooping process.
shapifySwoop.edgeFeather parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the swooping process.
----------------------------------------------------------
Section 32: shapifyAddMotion
----------------------------------------------------------
shapifyAddMotion
[type: class]
The shapify AddMotion object - contains the 'addMotion' functions for this EffectController's components.
shapifyAddMotion.edgeOffset(lowerBound, upperBound, motionSpeed, motionType, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Motion]
Adds a motion to the 'edgeOffset' component and returns a Motion object, which can be used to control the motion dynamically.
shapifyAddMotion.edgeOffset parameter: lowerBound
[type: number]
The lower bound for the motion being added.
shapifyAddMotion.edgeOffset parameter: upperBound
[type: number]
The upper bound for the motion being added.
shapifyAddMotion.edgeOffset parameter: motionSpeed
[type: number] [default: 1] [optional]
The speed factor for the added motion.
shapifyAddMotion.edgeOffset parameter: motionType
[type: MotionType] [default: nc.motionTypes.Pendulum] [optional]
The MotionType, determining the nature of the motion being added.
shapifyAddMotion.edgeOffset parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Motion will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
shapifyAddMotion.edgeOffset parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Motion is affected by.
shapifyAddMotion.edgeOffset parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the motion.
shapifyAddMotion.edgeOffset parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the motion.
shapifyAddMotion.edgeFeather(lowerBound, upperBound, motionSpeed, motionType, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Motion]
Adds a motion to the 'edgeFeather' component and returns a Motion object, which can be used to control the motion dynamically.
shapifyAddMotion.edgeFeather parameter: lowerBound
[type: number]
The lower bound for the motion being added.
shapifyAddMotion.edgeFeather parameter: upperBound
[type: number]
The upper bound for the motion being added.
shapifyAddMotion.edgeFeather parameter: motionSpeed
[type: number] [default: 1] [optional]
The speed factor for the added motion.
shapifyAddMotion.edgeFeather parameter: motionType
[type: MotionType] [default: nc.motionTypes.Pendulum] [optional]
The MotionType, determining the nature of the motion being added.
shapifyAddMotion.edgeFeather parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Motion will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
shapifyAddMotion.edgeFeather parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Motion is affected by.
shapifyAddMotion.edgeFeather parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the motion.
shapifyAddMotion.edgeFeather parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the motion.
----------------------------------------------------------
Section 33: shapify
----------------------------------------------------------
shapify
[type: class] [extends: Vector2]
The EffectController for the 'Shapify' EffectNode. The Shapify EffectNode converts edge data stored in a 'shapified' Texture into a presentable image with edges that stay sharp regardless of the scale of the associated GraphicObject. This class is a dynamically created EffectController (with base type 'Vector2'), and is therefore non-instantiable. To create a new instance, use "nc.effectControllers['shapify'].new". While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
shapify.edgeOffset
[type: number]
This 'shapify' component determines how far to expand or contract the shape's edge from the position of the edge in the source image. This is a pseudonym for the x vector component.
shapify.edgeFeather
[type: number]
This 'shapify' component determines the how many pixels the image's edge transition spans. For example, a value of 5 would lead to a soft edge, as the transition from inside the image's shape to outside the shape would take place over 5 pixels. This is a pseudonym for the y vector component.
shapify.swoop
[type: shapifySwoop]
Object containing the swoopers for this EffectController's components.
shapify.addMotion
[type: shapifyAddMotion]
Object containing the 'addMotion' functions for this EffectController's components.
----------------------------------------------------------
Section 34: shearSwoop
----------------------------------------------------------
shearSwoop
[type: class]
The shear Swoop object - contains the swoopers for this EffectController's components.
shearSwoop.xAngle(endValue, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Swooper]
Swoops (interpolates) 'xAngle' component from its current value to the given end value over the duration.
shearSwoop.xAngle parameter: endValue
[type: number]
The ending value for the numeric property being swooped.
shearSwoop.xAngle parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation.
shearSwoop.xAngle parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
shearSwoop.xAngle parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
shearSwoop.xAngle parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
shearSwoop.xAngle parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
shearSwoop.xAngle parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
shearSwoop.xAngle parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
shearSwoop.xAngle parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the swooping process.
shearSwoop.xAngle parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the swooping process.
shearSwoop.yAngle(endValue, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Swooper]
Swoops (interpolates) 'yAngle' component from its current value to the given end value over the duration.
shearSwoop.yAngle parameter: endValue
[type: number]
The ending value for the numeric property being swooped.
shearSwoop.yAngle parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation.
shearSwoop.yAngle parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
shearSwoop.yAngle parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
shearSwoop.yAngle parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
shearSwoop.yAngle parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
shearSwoop.yAngle parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
shearSwoop.yAngle parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
shearSwoop.yAngle parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the swooping process.
shearSwoop.yAngle parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the swooping process.
shearSwoop.preserveArea(endValue, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Swooper]
Swoops (interpolates) 'preserveArea' component from its current value to the given end value over the duration.
shearSwoop.preserveArea parameter: endValue
[type: number]
The ending value for the numeric property being swooped.
shearSwoop.preserveArea parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation.
shearSwoop.preserveArea parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
shearSwoop.preserveArea parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
shearSwoop.preserveArea parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
shearSwoop.preserveArea parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
shearSwoop.preserveArea parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
shearSwoop.preserveArea parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
shearSwoop.preserveArea parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the swooping process.
shearSwoop.preserveArea parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the swooping process.
----------------------------------------------------------
Section 35: shearAddMotion
----------------------------------------------------------
shearAddMotion
[type: class]
The shear AddMotion object - contains the 'addMotion' functions for this EffectController's components.
shearAddMotion.xAngle(lowerBound, upperBound, motionSpeed, motionType, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Motion]
Adds a motion to the 'xAngle' component and returns a Motion object, which can be used to control the motion dynamically.
shearAddMotion.xAngle parameter: lowerBound
[type: number]
The lower bound for the motion being added.
shearAddMotion.xAngle parameter: upperBound
[type: number]
The upper bound for the motion being added.
shearAddMotion.xAngle parameter: motionSpeed
[type: number] [default: 1] [optional]
The speed factor for the added motion.
shearAddMotion.xAngle parameter: motionType
[type: MotionType] [default: nc.motionTypes.Pendulum] [optional]
The MotionType, determining the nature of the motion being added.
shearAddMotion.xAngle parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Motion will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
shearAddMotion.xAngle parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Motion is affected by.
shearAddMotion.xAngle parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the motion.
shearAddMotion.xAngle parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the motion.
shearAddMotion.yAngle(lowerBound, upperBound, motionSpeed, motionType, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Motion]
Adds a motion to the 'yAngle' component and returns a Motion object, which can be used to control the motion dynamically.
shearAddMotion.yAngle parameter: lowerBound
[type: number]
The lower bound for the motion being added.
shearAddMotion.yAngle parameter: upperBound
[type: number]
The upper bound for the motion being added.
shearAddMotion.yAngle parameter: motionSpeed
[type: number] [default: 1] [optional]
The speed factor for the added motion.
shearAddMotion.yAngle parameter: motionType
[type: MotionType] [default: nc.motionTypes.Pendulum] [optional]
The MotionType, determining the nature of the motion being added.
shearAddMotion.yAngle parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Motion will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
shearAddMotion.yAngle parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Motion is affected by.
shearAddMotion.yAngle parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the motion.
shearAddMotion.yAngle parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the motion.
shearAddMotion.preserveArea(lowerBound, upperBound, motionSpeed, motionType, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Motion]
Adds a motion to the 'preserveArea' component and returns a Motion object, which can be used to control the motion dynamically.
shearAddMotion.preserveArea parameter: lowerBound
[type: number]
The lower bound for the motion being added.
shearAddMotion.preserveArea parameter: upperBound
[type: number]
The upper bound for the motion being added.
shearAddMotion.preserveArea parameter: motionSpeed
[type: number] [default: 1] [optional]
The speed factor for the added motion.
shearAddMotion.preserveArea parameter: motionType
[type: MotionType] [default: nc.motionTypes.Pendulum] [optional]
The MotionType, determining the nature of the motion being added.
shearAddMotion.preserveArea parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Motion will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
shearAddMotion.preserveArea parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Motion is affected by.
shearAddMotion.preserveArea parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the motion.
shearAddMotion.preserveArea parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the motion.
----------------------------------------------------------
Section 36: shear
----------------------------------------------------------
shear
[type: class] [extends: Vector3]
EffectController for the Shear EffectNode, which distorts the shape to appear slanted or skewed. This class is a dynamically created EffectController (with base type 'Vector3'), and is therefore non-instantiable. To create a new instance, use "nc.effectControllers['shear'].new". While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
shear.xAngle
[type: number]
The amount in degrees to rotate the X axis. This is a pseudonym for the x vector component.
shear.yAngle
[type: number]
The amount in degrees to rotate the Y axis. This is a pseudonym for the y vector component.
shear.preserveArea
[type: number]
How much to preserve the original area. 1 preserves area exactly. 0 allows the area to approach 0 as the axes approach each other. This is a pseudonym for the z vector component.
shear.swoop
[type: shearSwoop]
Object containing the swoopers for this EffectController's components.
shear.addMotion
[type: shearAddMotion]
Object containing the 'addMotion' functions for this EffectController's components.
----------------------------------------------------------
Section 37: EffectControllerDefinition
----------------------------------------------------------
EffectControllerDefinition
[type: class] [NON-INSTANTIABLE]
Object housing the info about a particular EffectController. EffectControllers provide the ability to dynamically control EffectNodes and their resulting visual effects. EffectControllers are generally one of 3 base types, Vectors, numbers, and Textures. Once defined, EffectControllers will be generally available on all SceneObjects, Materials, MaterialMaster, CharacterMaterial objects; It should be noted that while these objects will have all EffectControllers as members, only the EffectControllers tied to the objects' current EffectNodes will cause any change visually. It should also be noted EffectControllers with 'mixMode=materialOnly' will not be available on SceneObjects for inheritance, and will instead only be on Material and MaterialMaster objects for direct manipulation.
EffectControllerDefinition.name
[type: string]
The name of the EffectController
EffectControllerDefinition.baseType
[type: string]
The base type of the EffectController
EffectControllerDefinition.componentNames
[type: [string], string]
The names of the components of this EffectController.
EffectControllerDefinition.defaultValues
[type: [number], number]
The default component values for this EffectController.
EffectControllerDefinition.mixMode
[type: string]
The mixMode for this EffectController. Mix modes determined the manner in which the values of EffectControllers are transfered to descendants in the hierarchy. So if the "multiplication" mixMode is chosen, a SceneObject's values for the given EffectController multiply the values of all of its descendants. The "materialOnly" mixMode indicates that a given EffectController will only be on Materials (not parent SceneObjects), so no mixing of EffectController value occurs.
EffectControllerDefinition.likelyRanges
[type: [[number]]]
An array of likely ranges (each is an array of numbers) for the component values of this EffectController. These likely ranges help to inform the 'scrollSpeed' of GUI controllers for this EffectController - if the likely range is much larger, than the scroll speeds default to be higher etc...
EffectControllerDefinition.effectControllerDescription
[type: string]
The description of the EffectController. This will inform the descriptions as they appear in the autocomplete for this project.
EffectControllerDefinition.componentDescriptions
[type: [string]]
The description of the components of this EffectController. These descriptions will inform the component descriptions as they appear in the autocomplete for this project.
----------------------------------------------------------
Section 38: EffectNode
----------------------------------------------------------
EffectNode
[type: class] [NON-INSTANTIABLE]
EffectNodes are GPU-driven visual effects assigned to SceneObjects, GraphicObjects, and ultimately Materials. Each EffectNode can be manipulated dynamically by one or more EffectControllers, which are accessable as direct members of the given SceneObject or Material. When a GraphicObject is set to a particular GraphicAsset, it's Materials adopt the GraphicAsset's EffectNode and EffectController presets by default, but they can be customized at any time. Ultimately, the EffectNodes on any given Material are compiled and determine the final GLSL code that comprises the associated shader for WebGL to use when rendering the associated surface.
EffectNode.type
[type: string]
Type identifier
EffectNode.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
EffectNode.name
[type: string]
The EffectContoller's name. This must be unique among EffectControllers.
EffectNode.vertexNodeSupport
[type: [string], string]
The portion of the GLSL shader code for this EffectNode above the 'vertex main'. This segment of code is where uniform and varying variables for the vertex portion of this effect are likely to be declared. Support components between EffectNodes are consolidated, so if a segment of code will be used in more than on EffectNode, be sure to provide it as its own distinct array entry in each EffectNode.
EffectNode.vertexNode
[type: string]
The portion of the GLSL shader code for this EffectNode within the 'vertex main'. This segment of code is where this effect can make its adjustments to the 'vertex' vec3.
EffectNode.fragmentNodeSupport
[type: [string], string]
The portion of the GLSL shader code for this EffectNode above the 'fragment main'. This segment of code is where uniform and varying variables for the fragment portion of this effect are likely to be declared. Support components between EffectNodes are consolidated, so if a segment of code will be used in more than on EffectNode, be sure to provide it as its own distinct array entry in each EffectNode.
EffectNode.fragmentNode
[type: string]
The portion of the GLSL shader code for this EffectNode within the 'fragment main'. This segment of code is where this effect can make its adjustments to the 'fragment' vec4.
EffectNode.requiresDerivativesShaderExtension
[type: boolean]
Boolean determining if the shader of any Material with this EffectNode is compiled to support the 'Derivatives' extension.
EffectNode.requiresFragDepthShaderExtension
[type: boolean]
Boolean determining if the shader of any Material with this EffectNode is compiled to support the 'FragDepth' extension.
EffectNode.requiresDrawBuffersShaderExtension
[type: boolean]
Boolean determining if the shader of any Material with this EffectNode is compiled to support the 'DrawBuffers' extension.
EffectNode.requiresTextureLODShaderExtension
[type: boolean]
Boolean determining if the shader of any Material with this EffectNode is compiled to support the 'TextureLOD' extension.
EffectNode.getAssociatedEffectControllers()
[type: function] [returns: [string]]
Returns the list of EffectControllers that are associated with this EffectNode.
EffectNode.setAssociatedEffectControllers(effectControllers)
[type: function]
Updates the list of EffectControllers associated with this EffectNode.
EffectNode.setAssociatedEffectControllers parameter: effectControllers
[type: [string]]
An array of the EffectControllers that this EffectNode is associated with. The associated EffectControllers will be the means of dynamic manipulation for this EffectNode's visual effects. See 'nc.effectControllers' for a list of available EffectControllers.
----------------------------------------------------------
Section 39: IncisorExtensions
----------------------------------------------------------
IncisorExtensions
[type: class] [extends: INCISOR] [NON-INSTANTIABLE] [requires: unpublished only, license - extensions, extensions scope]
Object housing all of the Incisor Extensions functionality. In general, this object has much of the same functionality as nc/INCISOR and is therefore documented as extending that object but not all of the same functionality is available through this object, so auto-complete may show some non-existent members. This object is accessible in the 'CODE.runBeforeInit' block of the extensions scope by the instance name 'nce'.
IncisorExtensions.incisorExtensions_global
[type: object]
The global incisor extensions object. This corresponds to the scope of the javascript code placed in the "Global Extensions" folder in the "Application Support" directory (which can be accessed from the Incisor menu). It should be noted that the global extensions scope is initialized before the project extensions scope, and as such 'nce.incisorExtensions_project' member will likely be undefined from within the global scope on init. Once project extensions are loaded the 'nce.incisorExtensions_project' member is initialized.
IncisorExtensions.incisorExtensions_project
[type: object]
The project extensions object. This corresponds to the scope of the javascript code placed in the "ProjectExtensions" folder in the "Utilities" directory of the given project. It should be noted that the global extensions scope is initialized before the project extensions scope, and as such 'nce.incisorExtensions_project' member will likely be undefined from within the global scope on init. Once project extensions are loaded the 'nce.incisorExtensions_project' member is initialized.
IncisorExtensions.projectNC
[type: INCISOR]
A reference to the 'nc' object (INCISOR) inside of the target project. Please note that this value can be undefined, when the project is loading or if the project code has a runtime or syntax error. See also 'nce.addProjectConnectionCallback' and 'nce.addProjectDisconnectionCallback' for the associated callbacks.
IncisorExtensions.projectPR
[type: ProjectMain]
A reference to the 'pr' object (ProjectMain) inside of the target project. Please note that this value can be undefined, when the project is loading or if the project code has a runtime or syntax error. See also 'nce.addProjectConnectionCallback' and 'nce.addProjectDisconnectionCallback' for the associated callbacks.
IncisorExtensions.addInspectorMenuItem(menuPath, callbackOwner, callbackName, callbackArgs)
[type: function]
Adds menu item to the menus along the top of the Incisor inspector, and registers a callback
function (from within the Incisor extensions scope) that will be triggered whenever that menu item is selected.
It should be noted that custom inspector menu items cannot be added to built-in Incisor menus.
IncisorExtensions.addInspectorMenuItem parameter: menuPath
[type: [string]]
An array of menu item names, where the first name is the name of the root custom menu. For example ["MyMenu","MySubMenu","MyTargetMenuItem"], would create a 'MyMenu' menu in the inspector, with sub-menu 'SubMenu', which would hold the 'MyTargetMenuItem' option that triggers the desired callback.
IncisorExtensions.addInspectorMenuItem parameter: callbackOwner
[type: object]
The object (from within the given IncisorExtensions context) that owns the callback function.
IncisorExtensions.addInspectorMenuItem parameter: callbackName
[type: string]
The name of the callback function.
IncisorExtensions.addInspectorMenuItem parameter: callbackArgs
[type: Array] [optional]
A list of parameters that will be sent to the callback function.
IncisorExtensions.registerInspectorPanelDefinition(name, classDefinition)
[type: function]
Registers a custom InspectorPanel type with the Incisor GUI, enabling users to select this newly defined panel as an option from within the Inspector.
IncisorExtensions.registerInspectorPanelDefinition parameter: name
[type: string]
The name of the InspectorPanel - this name should match (exactly) the name given to the InspectorPanel constructor 'panelTypeName' param. This is the name that will appear in the panel type selection drop down in the GUI.
IncisorExtensions.registerInspectorPanelDefinition parameter: classDefinition
[type: object]
The class Definition for the new InspectorPanel type. The class definition provided for this parameter should extend 'InspectorPanel'
IncisorExtensions.saveProjectScreenShot(path, isPathRelative)
[type: function] [returns: string]
Saves a screen shot of the project and returns the path of the screenshot.
IncisorExtensions.saveProjectScreenShot parameter: path
[type: string]
The path to the screenshot. If left undefined, the 'screenShotDestination' value in the ProjectSettings is used.
IncisorExtensions.saveProjectScreenShot parameter: isPathRelative
[type: boolean]
Boolean determining if the screen shot's path is relative to the project.
IncisorExtensions.saveInspectorScreenShot(path, isPathRelative)
[type: function] [returns: string]
Saves a screen shot of the entire inspector and returns the path of the screenshot.
[REQUIREMENT: module - pixelsObjects]
IncisorExtensions.saveInspectorScreenShot parameter: path
[type: string]
The path to the screenshot. If left undefined, the 'screenShotDestination' value in the ProjectSettings is used.
IncisorExtensions.saveInspectorScreenShot parameter: isPathRelative
[type: boolean]
Boolean determining if the screen shot's path is relative to the project.
IncisorExtensions.alert(popupTitleText, popupBodyText)
[type: function]
Displays a standardized UiPopupWindow with the given title and body text populated.
This method is asyncronously awaitable in the event the given alert needs to be shown before code excution continues.
IncisorExtensions.alert parameter: popupTitleText
[type: string]
The text displayed in the title bar of the UiPopupWindow.
IncisorExtensions.alert parameter: popupBodyText
[type: string]
The text displayed in the body of the UiPopupWindow.
IncisorExtensions.showYesNoQueryPopup(popupTitleText, popupBodyText)
[type: function] [returns: string]
Displays a standardized UiPopupWindow that will return a Yes/No string based on which decision button the user presses.
This method is asyncronously awaitable in the event the given popup to be shown before code excution continues.
IncisorExtensions.showYesNoQueryPopup parameter: popupTitleText
[type: string]
The text displayed in the title bar of the UiPopupWindow.
IncisorExtensions.showYesNoQueryPopup parameter: popupBodyText
[type: string]
The text displayed in the body of the UiPopupWindow.
IncisorExtensions.showTextQueryPopup(popupTitleText, popupBodyText, textFieldLabel, defaultResponse)
[type: function] [returns: string]
Displays a standardized UiPopupWindow that will return a user-populated string based on what the user enters in a UiTextField.
This method is asyncronously awaitable in the event the given popup to be shown before code excution continues.
IncisorExtensions.showTextQueryPopup parameter: popupTitleText
[type: string]
The text displayed in the title bar of the UiPopupWindow.
IncisorExtensions.showTextQueryPopup parameter: popupBodyText
[type: string]
The text displayed in the body of the UiPopupWindow.
IncisorExtensions.showTextQueryPopup parameter: textFieldLabel
[type: string]
The label text for the UiTextField user-prompt.
IncisorExtensions.showTextQueryPopup parameter: defaultResponse
[type: string]
The text value pre-populated in the UiTextField user-prompt.
IncisorExtensions.showPathQueryPopup(popupTitleText, popupBodyText, root, showFiles, selectableFiles, allowMultiSelect, rootSelectorActive)
[type: function] [returns: string]
Displays a standardized UiPopupWindow that displays a FileBrowser and returns the user's selection.
This method is asyncronously awaitable in the event the given popup to be shown before code excution continues.
IncisorExtensions.showPathQueryPopup parameter: popupTitleText
[type: string]
The text displayed in the title bar of the UiPopupWindow.
IncisorExtensions.showPathQueryPopup parameter: popupBodyText
[type: string]
The text displayed in the body of the UiPopupWindow.
IncisorExtensions.showPathQueryPopup parameter: root
[type: string]
The root directory to show in the FileBrowser.
IncisorExtensions.showPathQueryPopup parameter: showFiles
[type: boolean]
Flag determining if files are shown in the FileBrowser.
IncisorExtensions.showPathQueryPopup parameter: selectableFiles
[type: boolean]
Flag determining if files are able to be selected in the FileBrowser.
IncisorExtensions.showPathQueryPopup parameter: allowMultiSelect
[type: boolean]
Flag determining if multiple items can be selected at once in the FileBrowser.
IncisorExtensions.showPathQueryPopup parameter: rootSelectorActive
[type: boolean]
Flag determining if the user can change the root directory of the FileBrowser.
IncisorExtensions.addProjectConnectionCallback(callbackOwner, callbackName)
[type: function]
Adds a callback for when the Inspector connects to the project.
IncisorExtensions.addProjectConnectionCallback parameter: callbackOwner
[type: object]
The object that owns the callback function.
IncisorExtensions.addProjectConnectionCallback parameter: callbackName
[type: string]
The name of the callback function.
IncisorExtensions.removeProjectConnectionCallback(callbackOwner, callbackName)
[type: function]
Removes the given callback.
IncisorExtensions.removeProjectConnectionCallback parameter: callbackOwner
[type: object]
The object that owns the callback function.
IncisorExtensions.removeProjectConnectionCallback parameter: callbackName
[type: string]
The name of the callback function.
IncisorExtensions.addProjectDisconnectionCallback(callbackOwner, callbackName)
[type: function]
Adds a callback for when the Inspector disconnects from the project.
IncisorExtensions.addProjectDisconnectionCallback parameter: callbackOwner
[type: object]
The object that owns the callback function.
IncisorExtensions.addProjectDisconnectionCallback parameter: callbackName
[type: string]
The name of the callback function.
IncisorExtensions.removeProjectDisconnectionCallback(callbackOwner, callbackName)
[type: function]
Removes the given callback.
IncisorExtensions.removeProjectDisconnectionCallback parameter: callbackOwner
[type: object]
The object that owns the callback function.
IncisorExtensions.removeProjectDisconnectionCallback parameter: callbackName
[type: string]
The name of the callback function.
IncisorExtensions.showProgressBar(name, progress, note)
[type: function]
Displays a progress bar in the Incisor inspector.
IncisorExtensions.showProgressBar parameter: name
[type: string]
The name of the task associated with this progress bar.
IncisorExtensions.showProgressBar parameter: progress
[type: number]
Progress, as indicated by a number from 0 to 1. Call this function with a value of 1 to clear the progress bar.
IncisorExtensions.showProgressBar parameter: note
[type: string]
An optional secondary note that can change as the progress us update.
IncisorExtensions.addPrePublishCallback(callbackOwner, callbackName)
[type: function]
Adds a callback that occurs directly before the publishing of the project.
A PrePublishInfoObject is passed to the callbacks as the first parameter.
IncisorExtensions.addPrePublishCallback parameter: callbackOwner
[type: object]
The object that owns the callback function.
IncisorExtensions.addPrePublishCallback parameter: callbackName
[type: string]
The name of the callback function.
IncisorExtensions.removePrePublishCallback(callbackOwner, callbackName)
[type: function]
Removes the given callback.
IncisorExtensions.removePrePublishCallback parameter: callbackOwner
[type: object]
The object that owns the callback function.
IncisorExtensions.removePrePublishCallback parameter: callbackName
[type: string]
The name of the callback function.
IncisorExtensions.addPostPublishCallback(callbackOwner, callbackName)
[type: function]
Adds a callback that occurs directly after the publishing of the project.
A PostPublishInfoObject with name of the configuration, the publishing timestamp, the destination directory, and the hosted port (if applicable) is passed to the callbacks as the first parameter.
IncisorExtensions.addPostPublishCallback parameter: callbackOwner
[type: object]
The object that owns the callback function.
IncisorExtensions.addPostPublishCallback parameter: callbackName
[type: string]
The name of the callback function.
IncisorExtensions.removePostPublishCallback(callbackOwner, callbackName)
[type: function]
Removes the given callback.
IncisorExtensions.removePostPublishCallback parameter: callbackOwner
[type: object]
The object that owns the callback function.
IncisorExtensions.removePostPublishCallback parameter: callbackName
[type: string]
The name of the callback function.
IncisorExtensions.addFileBrowser(parent, name, root, useRelativePaths, singularFocusTarget)
[type: function] [returns: FileBrowser]
Adds a FileBrowser to the specified parent.
A FileBrowser is a specialized LayoutStack with functionality which makes it an ineractive
inspector for the OS file system. This class is meant for use in tool development within
extensions, and provides a visual means for developers locate and manipulate directories and files.
FileBrowsers can only be added to descendants of the 'bodyStack' of a ScrollingPanel.
IncisorExtensions.addFileBrowser parameter: parent
[type: SceneObject]
The parent to add the FileBrowser to.
IncisorExtensions.addFileBrowser parameter: name
[type: string]
The name of the new FileBrowser.
IncisorExtensions.addFileBrowser parameter: root
[type: string] [default: nce.paths.desktopPath] [optional]
The root directory for the FileBrowser.
IncisorExtensions.addFileBrowser parameter: useRelativePaths
[type: boolean] [default: false] [optional]
Boolean indicating if the paths displayed in the FileBrowser will be relative to the Project.
IncisorExtensions.addFileBrowser parameter: singularFocusTarget
[type: SceneObject] [default: undefined] [optional]
The SceneObject that must be focused in order for this FileBrowser's keyboard functionality to be active.
IncisorExtensions.runProcess(processExecutable, args, directory)
[type: function] [returns: ProcessResult]
Runs a provided external executable with the given arguments, returning a ProcessResult object with any ouput from the executable.
This functionality is meant to run a given process in a 'one-shot' manner, performing a single setup and sending a single set of arguments
to the executable, immediately closing the standard-in stream, and reading both the standard-out and standard-error streams.
It should be noted that the "allowExternalExecutableProcesses" setting in ApplicationSettings must be set to true to use this method.
Be aware of the risks you are assuming by using this functionality.
IncisorExtensions.runProcess parameter: processExecutable
[type: string]
The absolute path to the external executable to be run.
IncisorExtensions.runProcess parameter: args
[type: string] [default: ""] [optional]
The arguments to send to the given executable process.
IncisorExtensions.runProcess parameter: directory
[type: string] [default: ""] [optional]
The 'working directory' for the executable process.
IncisorExtensions.reloadProject()
[type: function]
Reloads the project, keeping the current instance of the inspector running.
Calling this function is the equivalent of pressing the refresh button in the upper left corner of the 'Live View' panel.
IncisorExtensions.runCmd(command, directory, processConfigs)
[type: function] [returns: ProcessResult]
Runs the given command within the Windows command prompt, returning a ProcessResult object with the related output.
This functionality is meant to run a given command in a 'one-shot' manner, performing a single command,
immediately closing the standard-in stream, and reading both the standard-out and standard-error streams.
It should be noted that the "allowExternalExecutableProcesses" setting in ApplicationSettings must be set to true to use this method.
Be aware of the risks you are assuming by using this functionality.
IncisorExtensions.runCmd parameter: command
[type: string] [default: ""] [optional]
The command to send to the Windows command prompt.
IncisorExtensions.runCmd parameter: directory
[type: string] [default: ""] [optional]
The 'working directory' for the executable process.
IncisorExtensions.runCmd parameter: processConfigs
[type: ProcessConfiguration] [default: undefined] [optional]
Object containing configurations for how the process will be run.
IncisorExtensions.runBash(command, directory, processConfigs)
[type: function] [returns: ProcessResult]
Runs the given bash command, returning a ProcessResult object with the related output.
This functionality is meant to run a given command in a 'one-shot' manner, performing a single command,
immediately closing the standard-in stream, and reading both the standard-out and standard-error streams.
It should be noted that the "allowExternalExecutableProcesses" setting in ApplicationSettings must be set to true to use this method.
Be aware of the risks you are assuming by using this functionality.
IncisorExtensions.runBash parameter: command
[type: string] [default: ""] [optional]
The command to send to 'bash'.
IncisorExtensions.runBash parameter: directory
[type: string] [default: ""] [optional]
The 'working directory' for the executable process.
IncisorExtensions.runBash parameter: processConfigs
[type: ProcessConfiguration] [default: undefined] [optional]
Object containing configurations for how the process will be run.
----------------------------------------------------------
Section 40: ProcessResult
----------------------------------------------------------
ProcessResult
[type: class] [NON-INSTANTIABLE] [requires: unpublished only, license - extensions, extensions scope]
Object containing information about the running of an executable via 'nce.runProcess'.
ProcessResult.stdOut
[type: string]
The standard output from the given executable process.
ProcessResult.stdErr
[type: string]
The standard error from the given executable process.
ProcessResult.exception
[type: string]
If there is an exception while attempting to run the given executable process, it will be populated in this value.
----------------------------------------------------------
Section 41: InspectorPanel
----------------------------------------------------------
InspectorPanel
[type: class] [requires: unpublished only, license - extensions, extensions scope]
Object defining an inspector panel within the Incisor GUI. Custom panels can be defined and registered in Incisor extensions code placed in the 'Utilities/ProjectExtensions' directory within the project, or within the 'Global Extensions' directory in the application support directory (available from within the Incisor menu). To make a custom panel, define a class that extends this class, populating the 'headerScrollingPanel' and 'bodyScrollingPanel' members with the desired custom content. Then call 'nce.registerInspectorPanelDefinition' with the newly defined class as a parameter and the new panel should appear in the panel options menu.
InspectorPanel.type
[type: string]
The type indicator for this object.
InspectorPanel.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
InspectorPanel.headerScrollingPanel
[type: ScrollingPanel]
The ScrollingPanel that contains the header content for this InspectorPanel. This, and 'bodyScrollingPanel' are where the majority of the customization for user-defined panels take place. This will be undefined if the InspectorPanel is instantiated with 'includeBodyScrollingPanel=false'
InspectorPanel.bodyScrollingPanel
[type: ScrollingPanel]
The ScrollingPanel that contains the body content for this InspectorPanel. This, and 'headerScrollingPanel' are where the majority of the customization for user-defined panels take place. This will be undefined if the InspectorPanel is instantiated with 'includeHeaderScrollingPanel=false'
InspectorPanel.panelWidth
[type: number]
The current width of the InspectorPanel.
InspectorPanel.panelHeight
[type: number]
The current height of the InspectorPanel.
InspectorPanel.headerScrollingPanelCoreHeight
[type: number]
The core height of the headerScrollingPanel (before uiZoom is applied).
InspectorPanel.headerScrollingPanelHeight
[type: number]
The current height of this InspectorPanel's headerScrollingPanel, with uiZoom factored in.
InspectorPanel.inspectorPanelUid
[type: number]
The unique identifier for this InspectorPanel.
InspectorPanel.menubarHeight
[type: number]
The current height of this InspectorPanel's menu bar.
InspectorPanel.panelType
[type: string]
The name of the panel type. This is the name that will appear within the panel options drop down menu.
InspectorPanel.subPanels
[type: Array]
Array containing the subPanels of this InspectorPanel. For standard 'content' panels, this array will be be empty, as subpanels are only present in InspectorPanels that are strictly 'container' panels.
InspectorPanel.divisionLocation
[type: number] [default: 0.5]
Value used by 'container' panels to determine the proportion of its area that each subPanel will occupy. For standard 'content' panels this value is unused.
InspectorPanel.isColumns
[type: boolean] [default: {true}]
Boolean value used by 'container' panels to determine if its subPanels are side-by-side or top-and-bottom. For standard 'content' panels this value is unused.
InspectorPanel.dividerButton
[type: Button]
Button used by 'container' panels that allow the user to change the 'divisionLocation' value. For standard 'content' panels this member is undefined.
InspectorPanel.borderLeft
[type: GraphicObject]
The GraphicObject that serves as the left border of this InspectorPanel.
InspectorPanel.borderRight
[type: GraphicObject]
The GraphicObject that serves as the right border of this InspectorPanel.
InspectorPanel.borderTop
[type: GraphicObject]
The GraphicObject that serves as the top border of this InspectorPanel.
InspectorPanel.borderBottom
[type: GraphicObject]
The GraphicObject that serves as the bottom border of this InspectorPanel.
InspectorPanel.leftMenuStack
[type: LayoutStack]
The horizontal LayoutStack on the left side of the InspectorPanel's menu bar. This LayoutStack contains the panel type selection UiDropDownMenu.
InspectorPanel.panelTypeMenu
[type: UiDropDownMenu]
The drop down mene containing all of the panel type options. This menu is what is used by the users to select different panels.
InspectorPanel.rightMenuStack
[type: LayoutStack]
The horizontal LayoutStack on the right side of the InspectorPanel's menu bar. This LayoutStack contains the '+' button and the 'x' button.
InspectorPanel.plusButton
[type: UiGraphicButton]
The UiGraphicButton serving as the '+' button on the righthand side of the InspectorPanel's menu bar. Users use this button to add subPanels to this InspectorPanel.
InspectorPanel.exButton
[type: UiGraphicButton]
The UiGraphicButton serving as the 'x' button on the righthand side of the InspectorPanel's menu bar. Users use this button to close this InspectorPanel.
InspectorPanel.menuBarBackground
[type: UiPanel, Button]
The UiPanel/Button that serves as the background for this InspectorPanel's menu bar.
InspectorPanel.panelMaskGraphic
[type: Button]
This Button serves as a mask for the 'panelTypeMenu', 'plusButton', and 'exButton', ensuring that those items don't extend outside of the menu bar regardless of the uiZoom and size/aspect-ratio of the InspectorPanel.
InspectorPanel.rolloverButton
[type: Button]
The Button responsible for setting the 'nc.singularFocusObject' to each InspectorPanel as the user's cursor moves over it (via 'addCursorInCallback').
InspectorPanel.quadrantButtonContainer
[type: SceneObject]
SceneObject containing the 'quadrantButtons', which are the Buttons that enable the user to select the top, bottom, left, or right portionm of the InspectorPanel.
InspectorPanel.quadrantButtonLeft
[type: UiPanel, Button]
The 'quadrantButton' that enables the user to select the left portion of this InspectorPanel.
InspectorPanel.quadrantButtonRight
[type: UiPanel, Button]
The 'quadrantButton' that enables the user to select the right portion of this InspectorPanel.
InspectorPanel.quadrantButtonTop
[type: UiPanel, Button]
The 'quadrantButton' that enables the user to select the top portion of this InspectorPanel.
InspectorPanel.quadrantButtonBottom
[type: UiPanel, Button]
The 'quadrantButton' that enables the user to select the bottom portion of this InspectorPanel.
InspectorPanel.headerDivider
[type: GraphicObject]
A thin line between the headerScrollingPanel and bodyScrollingPanel
InspectorPanel.addResizeCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback that occurs whenever the InspectorPanel is resized.
InspectorPanel.addResizeCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
InspectorPanel.addResizeCallback parameter: callbackName
[type: string]
The name of the callback function.
InspectorPanel.addResizeCallback parameter: callbackArgs
[type: Array, any] [optional]
Arguments for the callback function.
InspectorPanel.removeResizeCallback(callbackOwner, callbackName)
[type: function]
Removes the given callback for when the InspectorPanel is resized.
InspectorPanel.removeResizeCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
InspectorPanel.removeResizeCallback parameter: callbackName
[type: string]
The name of the callback function.
----------------------------------------------------------
Section 42: FileBrowser
----------------------------------------------------------
FileBrowser
[type: class] [extends: LayoutStack] [NON-INSTANTIABLE] [requires: unpublished only, license - extensions, extensions scope]
A FileBrowser is a specialized LayoutStack with functionality which makes it an ineractive inspector for the OS file system. This class is meant for use in tool development within extensions, and provides a visual means for developers locate and manipulate directories and files. FileBrowsers must be located within the 'bodyStack' of a ScrollingPanel. Call nce.addFileBrowser to make a new FileBrowser.
FileBrowser.root
[type: string] [default: nc.paths.desktopPath]
The path of the root directory of of the FileBrowser. The contents of the root directory are the 'topmost' items shown in this FileBrowser.
FileBrowser.showHiddenItems
[type: boolean] [default: true]
Flag determining if hidden items are shown in the FileBrowser.
FileBrowser.selectableHiddenItems
[type: boolean] [default: true]
Flag determining if hidden items are selectable within the FileBrowser.
FileBrowser.showFiles
[type: boolean] [default: true]
Flag determining if files are shown in the FileBrowser. If false, the FileBrowser will only display directories.
FileBrowser.selectableFiles
[type: boolean] [default: true]
Flag determining if files are selectable within the FileBrowser. If false, only directories will be selectable in the FileBrowser.
FileBrowser.allowRearrange
[type: boolean] [default: true]
Flag determining if files and directories can be rearranged via dragging and dropping.
FileBrowser.allowMultiSelect
[type: boolean] [default: true]
Flag determining if more than one path can be selected at once.
FileBrowser.overrideList
[type: [PathInfo]] [default: udefined]
An array of PathInfos can be provided to have the FileBrowser show a specific group of files in a flat list. This can be used in conjunction with a UiTextField to provide a search field for the FileBrowser. Set this property to undefined to return to normal
FileBrowser.addFilterCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback function that is invoked when directory contents are displayed.
An array of PathInfos are sent to each callback as the first parameter, and this list
can be edited by the receiving callback as a means to apply specific filtering rules for
what is displayed in this FileBrowser.
FileBrowser.addFilterCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
FileBrowser.addFilterCallback parameter: callbackName
[type: number]
The name of the callback function.
FileBrowser.addFilterCallback parameter: callbackArgs
[type: number] [optional]
Arguments for the callback function.
FileBrowser.removeFilterCallback(callbackOwner, callbackName)
[type: function]
Removes the given callback.
FileBrowser.removeFilterCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
FileBrowser.removeFilterCallback parameter: callbackName
[type: number]
The name of the callback function.
FileBrowser.addFileSystemChangeCallback(callbackOwner, callbackName, callbackArgs, callbackBeforeChange)
[type: function]
Adds a callback function that is invoked when the FileBrowser initiates a file system change.
For example if 'allowRearrange' is true, and a file is dragged to a new directory, then these
callbacks will be invoked. The type of the file system change, and an array of the associated
paramters are sent to the callbacks as the first two parameters.
FileBrowser.addFileSystemChangeCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
FileBrowser.addFileSystemChangeCallback parameter: callbackName
[type: number]
The name of the callback function.
FileBrowser.addFileSystemChangeCallback parameter: callbackArgs
[type: number] [optional]
Arguments for the callback function.
FileBrowser.addFileSystemChangeCallback parameter: callbackBeforeChange
[type: boolean] [default: true] [optional]
Boolean determining if the given callback will be called before or after the change event.
FileBrowser.removeFileSystemChangeCallback(callbackOwner, callbackName)
[type: function]
Removes the given callback.
FileBrowser.removeFileSystemChangeCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
FileBrowser.removeFileSystemChangeCallback parameter: callbackName
[type: number]
The name of the callback function.
FileBrowser.addSelectionChangeCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback function that is invoked when there is a change to the files/directories that are
currently selected in this FileBrowser.
FileBrowser.addSelectionChangeCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
FileBrowser.addSelectionChangeCallback parameter: callbackName
[type: number]
The name of the callback function.
FileBrowser.addSelectionChangeCallback parameter: callbackArgs
[type: number] [optional]
Arguments for the callback function.
FileBrowser.removeSelectionChangeCallback(callbackOwner, callbackName)
[type: function]
Removes the given callback.
FileBrowser.removeSelectionChangeCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
FileBrowser.removeSelectionChangeCallback parameter: callbackName
[type: number]
The name of the callback function.
FileBrowser.getCurrentSelection()
[type: function] [returns: [PathInfo]]
Returns a list of the currently selected items for this FileBrowser.
FileBrowser.openToPath(path, openPathProvided)
[type: function]
Instructs the FileBrowser to open all of the containing directories of the given path so that it is visible.
FileBrowser.openToPath parameter: path
[type: string]
The path to open to.
FileBrowser.openToPath parameter: openPathProvided
[type: boolean] [default: false] [optional]
Boolean determining if the given path itself should also be open (assumning it is a directory)
FileBrowser.refresh()
[type: function]
Refreshes the FileBrowser, causing it to reflect any changes made since it was last refreshed.
----------------------------------------------------------
Section 43: PrePublishInfoObject
----------------------------------------------------------
PrePublishInfoObject
[type: class] [NON-INSTANTIABLE] [requires: unpublished only, license - extensions, extensions scope]
Object containing pre-publish information.
PrePublishInfoObject.configurationName
[type: string]
The name of the configuration to use when publishing.
PrePublishInfoObject.proceedWithPublishing
[type: boolean] [default: true]
Boolean indicating whether or not to proceed with publishing. To cancel the publishing process, set this value to false.
PrePublishInfoObject.hostPublishedProject
[type: boolean]
Boolean indicating whether the published project will be automatically hosted.
----------------------------------------------------------
Section 44: PostPublishInfoObject
----------------------------------------------------------
PostPublishInfoObject
[type: class] [NON-INSTANTIABLE] [requires: unpublished only, license - extensions, extensions scope]
Object containing post-publish information.
PostPublishInfoObject.configurationName
[type: string]
The name of the configuration to use when publishing.
PostPublishInfoObject.publishTimeStamp
[type: string]
The time stamp of the published project.
PostPublishInfoObject.hostedPort
[type: string]
The port that the newly published project is being hosted on (if applicable).
PostPublishInfoObject.destinationDirectory
[type: string]
The relative path for the directory of the newly published project.
----------------------------------------------------------
Section 45: ProcessConfiguration
----------------------------------------------------------
ProcessConfiguration
[type: class] [requires: unpublished only, license - extensions, extensions scope]
Object containing configurations for how a process will run during nce.runProcess, nce.runCmd, or nce.runBash.
ProcessConfiguration.createNoWindow
[type: boolean] [default: true]
Determines if the new process will create a new window.
ProcessConfiguration.redirectStandardInput
[type: boolean] [default: true]
Determines if 'StandardInput' will be redirected for the given process.
ProcessConfiguration.redirectStandardOutput
[type: boolean] [default: true]
Determines if 'StandardOutput' will be redirected for the given process. If true, the standard out contents will be returned as part of the ProcessResult object returned.
ProcessConfiguration.redirectStandardError
[type: boolean] [default: true]
Determines if 'StandardError' will be redirected for the given process. If true, the standard error contents will be returned as part of the ProcessResult object returned.
ProcessConfiguration.closeStandardInputImmediately
[type: boolean] [default: true]
Determines if the 'StandardInput' stream for the given process will be immediately closed. This is sometimes necessary in order to prevent the process from locking up Incisor due to it waiting for input that's never coming. If true, the standard error contents will be returned as part of the ProcessResult object returned.
ProcessConfiguration.useShellExecute
[type: boolean] [default: false]
Determines if the given process will use ShellExecute.
ProcessConfiguration.waitForExit
[type: boolean] [default: false]
Determines if Incisor will wait for the process to exit before moving on.
----------------------------------------------------------
Section 46: FileIO
----------------------------------------------------------
FileIO
[type: class] [NON-INSTANTIABLE] [requires: unpublished only, license - fileIO]
Object housing functionality to perform file IO tasks such as 'writeTextFile', 'moveTo', 'createDirectory' an more.
FileIO.fileExists(filePath, isPathRelative)
[type: function] [returns: IncrCommsResponseObject]
Returns an IncrCommsResponseObject with a '.payload' bool stating if the file at the given path exists. If an error is encountered, related information will be stored in the '.error' member of the returned IncrCommsResponseObject. This function is asynchronous and will return a promise if not 'awaited'.
FileIO.fileExists parameter: filePath
[type: string]
This is the relative or absolute path to the file in question.
FileIO.fileExists parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
FileIO.readTextFile(filePath, isPathRelative)
[type: function] [returns: IncrCommsResponseObject]
Returns an IncrCommsResponseObject with a '.payload' string containing the contents of the text file at the given path. If an error is encountered, related information will be stored in the '.error' member of the returned IncrCommsResponseObject. This function is asynchronous and will return a promise if not 'awaited'.
FileIO.readTextFile parameter: filePath
[type: string]
The relative or absolute path to the file in question.
FileIO.readTextFile parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
FileIO.readFileBase64(filePath, isPathRelative)
[type: function] [returns: IncrCommsResponseObject]
Returns an IncrCommsResponseObject with a '.payload' string containing the contents of the file at the given path in Base64 format. If an error is encountered, related information will be stored in the '.error' member of the returned IncrCommsResponseObject. This function is asynchronous and will return a promise if not 'awaited'.
FileIO.readFileBase64 parameter: filePath
[type: string]
The relative or absolute path to the file in question.
FileIO.readFileBase64 parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
FileIO.rename(path, newName, isPathRelative)
[type: function] [returns: IncrCommsResponseObject]
Renames the file or folder at the given path. If an error is encountered, related information will be stored in the '.error' member of the returned IncrCommsResponseObject. This function is asynchronous and will return a promise if not 'awaited'.
FileIO.rename parameter: path
[type: string]
The relative or absolute path to the file in question.
FileIO.rename parameter: newName
[type: string]
The new name (not including the path) of the item you wish to rename.
FileIO.rename parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
FileIO.writeTextFile(filePath, fileContent, isPathRelative)
[type: function] [returns: IncrCommsResponseObject]
Writes text content to a file at the given path. If an error is encountered, related information will be stored in the '.error' member of the returned IncrCommsResponseObject. This function is asynchronous and will return a promise if not 'awaited'.
FileIO.writeTextFile parameter: filePath
[type: string]
The relative or absolute path to the file in question.
FileIO.writeTextFile parameter: fileContent
[type: string] [default: ""] [optional]
This is the text content that will be written in the file.
FileIO.writeTextFile parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
FileIO.writeFileFromBase64(filePath, base64, isPathRelative)
[type: function] [returns: IncrCommsResponseObject]
Writes a file from a base64 string. If an error is encountered, related information will be stored in the '.error' member of the returned IncrCommsResponseObject. This function is asynchronous and will return a promise if not 'awaited'.
FileIO.writeFileFromBase64 parameter: filePath
[type: string]
The relative or absolute path to the file in question.
FileIO.writeFileFromBase64 parameter: base64
[type: string]
The source base64 string to write the file from.
FileIO.writeFileFromBase64 parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
FileIO.appendTextFile(filePath, additionalContent, isPathRelative)
[type: function] [returns: IncrCommsResponseObject]
Appends text content to the text file at the given file path. If an error is encountered, related information will be stored in the '.error' member of the returned IncrCommsResponseObject. This function is asynchronous and will return a promise if not 'awaited'.
FileIO.appendTextFile parameter: filePath
[type: string]
The relative or absolute path to the file in question.
FileIO.appendTextFile parameter: additionalContent
[type: string]
This is the text content that will be written in the file.
FileIO.appendTextFile parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
FileIO.directoryExists(directoryPath, isPathRelative)
[type: function] [returns: IncrCommsResponseObject]
Returns an IncrCommsResponseObject with a '.payload' bool stating if the directory at the given path exists. If an error is encountered, related information will be stored in the '.error' member of the returned IncrCommsResponseObject. This function is asynchronous and will return a promise if not 'awaited'.
FileIO.directoryExists parameter: directoryPath
[type: string]
This is the relative or absolute path to the directory in question.
FileIO.directoryExists parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
FileIO.getDirectoryContents(directoryPath, isPathRelative, recurseSubdirectories, includeHiddenFiles)
[type: function] [returns: [PathInfo]]
Returns an IncrCommsResponseObject with a '.payload' array containing the paths to the directories and files within the given directory. If an error is encountered, related information will be stored in the '.error' member of the returned IncrCommsResponseObject. This function is asynchronous and will return a promise if not 'awaited'.
FileIO.getDirectoryContents parameter: directoryPath
[type: string]
This is the relative or absolute path to the directory in question.
FileIO.getDirectoryContents parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
FileIO.getDirectoryContents parameter: recurseSubdirectories
[type: boolean] [default: false] [optional]
Bool stating if list of paths returned should include all sub-directories.
FileIO.getDirectoryContents parameter: includeHiddenFiles
[type: boolean] [default: false] [optional]
Bool stating if list of paths returned should include hidden files.
FileIO.createDirectory(directoryPath, isPathRelative)
[type: function] [returns: IncrCommsResponseObject]
Returns an IncrCommsResponseObject with a '.payload' string containing the contents of the text file at the given path. If an error is encountered, related information will be stored in the '.error' member of the returned IncrCommsResponseObject. This function is asynchronous and will return a promise if not 'awaited'.
FileIO.createDirectory parameter: directoryPath
[type: string]
The relative or absolute path to the directory in question.
FileIO.createDirectory parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
FileIO.copyTo(sourcePath, destinationPath, isPathRelative, newName)
[type: function] [returns: IncrCommsResponseObject]
Copies the provided file or directory into the designated directory, with an option to rename the item while copying. If an error is encountered, related information will be stored in the '.error' member of the returned IncrCommsResponseObject. This function is asynchronous and will return a promise if not 'awaited'.
FileIO.copyTo parameter: sourcePath
[type: string]
The relative or absolute path to the source item.
FileIO.copyTo parameter: destinationPath
[type: string]
The relative or absolute path for the destination directory.
FileIO.copyTo parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
FileIO.copyTo parameter: newName
[type: string] [default: ""] [optional]
The new name (not including the path) of the item you wish to rename. If "" is provided, then no rename occurs.
FileIO.moveTo(sourcePath, destinationPath, isPathRelative, newName)
[type: function] [returns: IncrCommsResponseObject]
Moves the provided file or directory into the designated directory, with an option to rename the item while moving. If an error is encountered, related information will be stored in the '.error' member of the returned IncrCommsResponseObject. This function is asynchronous and will return a promise if not 'awaited'.
FileIO.moveTo parameter: sourcePath
[type: string]
The relative or absolute path to the source item.
FileIO.moveTo parameter: destinationPath
[type: string]
The relative or absolute path for the destination directory.
FileIO.moveTo parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
FileIO.moveTo parameter: newName
[type: string] [default: ""] [optional]
The new name (not including the path) of the item you wish to rename. If "" is provided, then no rename occurs.
FileIO.delete(path, isPathRelative)
[type: function] [returns: IncrCommsResponseObject]
Deletes the provided file or directory. If an error is encountered, related information will be stored in the '.error' member of the returned IncrCommsResponseObject. This function is asynchronous and will return a promise if not 'awaited'.
FileIO.delete parameter: path
[type: string]
The relative or absolute path of the item to delete.
FileIO.delete parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
FileIO.compress(sourcePath, isPathRelative)
[type: function] [returns: IncrCommsResponseObject]
Compresses the given file or directory into a zip file. If an error is encountered, related information will be stored in the '.error' member of the returned IncrCommsResponseObject. This function is asynchronous and will return a promise if not 'awaited'.
FileIO.compress parameter: sourcePath
[type: string]
The relative or absolute path to the file or directory in question. If a directory path is provided, the directory must contain at least one file or an error will be encountered.
FileIO.compress parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
FileIO.decompress(sourcePath, isPathRelative)
[type: function] [returns: IncrCommsResponseObject]
Decompresses the zip file at the given path into its source format. If an error is encountered, related information will be stored in the '.error' member of the returned IncrCommsResponseObject. This function is asynchronous and will return a promise if not 'awaited'.
FileIO.decompress parameter: sourcePath
[type: string]
The relative or absolute path to the file or directory in question.
FileIO.decompress parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
----------------------------------------------------------
Section 47: IncrCommsResponseObject
----------------------------------------------------------
IncrCommsResponseObject
[type: class] [NON-INSTANTIABLE]
Standardized Incisor® communications protocol object that is returned from methods that incorporate external functionality. This serves as a 'wrapper' object to the desired return value. This object contains a 'payload' member and an 'error' member. If no issues are encountered during the external portion of the functionality, the desired return value can be found in the 'payload' member, otherwise the 'error' member will contain applicable information about the encountered issues. For example, if nc.fileIO.readTextFile('MyDrive/SomeDirectory/myFile.txt') is successful, then the returned text from the file will be in the 'payload' member of the returned IncrCommsResponseObject object, but if nc.fileIO.readTextFile('MyDrive/SomeDirectoryWithRestrictedAccess/myFile.txt') is unsuccessful, then the 'error' member of the returned IncrCommsResponseObject object may be something 'Could not read file in restricted directory...'.
IncrCommsResponseObject.payload
[type: any]
The desired return value from the method that returns this object.
IncrCommsResponseObject.error
[type: string]
A string containing information about issues/errors/exceptions encountered during the performance of the external functionality that is required by the method that returns this object. If no issues were encountered, this value will default to an empty string.
----------------------------------------------------------
Section 48: PathInfo
----------------------------------------------------------
PathInfo
[type: class]
Class containing a 'path' and a 'type' (where type is 'file' or 'directory')
PathInfo.path
[type: string]
The path string.
PathInfo.type
[type: string]
The type of the item at the given path. Value will either be 'file' or 'directory'.
----------------------------------------------------------
Section 49: FlowController
----------------------------------------------------------
FlowController
[type: class] [requires: license - proGaming, module - flowControllers]
FlowControllers provide a way to organize the general flow of state-based items in a project. For example if your project is a game with an intro, a menu, and several levels, you could create a FlowController named "GameFlowController" and then define and add an 'Intro' FlowState, a 'Menu' FlowState, and 'LevelXX' FlowStates to that FlowController. Within each FlowState in the FlowController, timed callback elements can be added to help define the sequencing within each FlowState. Once created, FlowControllers, FlowStates, and FlowStateElements can be accessed via 'nc.flows'.
FlowController.name
[type: string]
The name of the FlowController.
FlowController.inheritedTypes
[type: any]
Dictionary object listing all of the types this object is compatible with.
FlowController.type
[type: string]
Type identifier.
FlowController.currentFlowState
[type: FlowState]
The current FlowState of this FlowController. Monitor or change the FlowState using this property. This property can also be set via 'nc.flows.[FlowControllerName].[FlowStateName].setToCurrentState'.
FlowController.isActive
[type: boolean] [default: true]
Flag determining if this FlowController is actively updating the time of the current FlowState and evaluating which FlowStateElements to execute.
FlowController.pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity]
The PauseEvent or Array of PauseEvents that this FlowController will be immune to. Set this parameter to [] for this FlowController to have no pause immunity.
FlowController.speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl]
The SpeedControl or Array of SpeedControls that this FlowController is affected by.
FlowController.playbackRate
[type: number] [default: 1]
Value multiplying the progression of the 'time' value. To play twice as fast use 2, for items that can play backwards, use negative values.
FlowController.netPlaybackRate
[type: number]
Read-only value denoting the net playbackRate, including the effects of this FlowController's SpeedControls.
FlowController.addFlowState(flowStateDefinition)
[type: function]
Adds a the given FlowState to this FlowController.
To build a FlowState, define a class that extends the FlowState class, then provide that definition to this method to add it to this FlowController.
FlowController.addFlowState parameter: flowStateDefinition
[type: object]
The class definition of the FlowState to add to this FlowController. The provided class definition must inherit from FlowState.
FlowController.setState(flowState, performFollowupEvaluation)
[type: function]
Sets the 'currentFlowState' of this FlowController to the provided FlowState. This can also be achieved by calling 'setToCurrentState' on the given FlowState.
FlowController.setState parameter: flowState
[type: FlowState]
The FlowState to set as this FlowController's current FlowState.
FlowController.setState parameter: performFollowupEvaluation
[type: boolean] [default: false] [optional]
Flag determining if another evaluation of which FlowStateElement callbacks to execute will be done immediately (without waiting a fixedUpdate) after the state change.
FlowController.addFlowStateChangeCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback that occurs whenever the current FlowState of this FlowController is changed.
The new FlowState and the previous FlowState are sent to the callback as its first two parameters.
FlowController.addFlowStateChangeCallback parameter: callbackOwner
[type: object]
The object owning the callback function that occurs whenever the FlowState changes.
FlowController.addFlowStateChangeCallback parameter: callbackName
[type: string]
The name of the callback function that occurs whenever the FlowState changes.
FlowController.addFlowStateChangeCallback parameter: callbackArgs
[type: Array, any] [optional]
Args for the callback function that is triggered whenever the FlowState changes.
FlowController.removeFlowStateChangeCallback(callbackOwner, callbackName)
[type: function]
Removes the given callback.
FlowController.removeFlowStateChangeCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
FlowController.removeFlowStateChangeCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
----------------------------------------------------------
Section 50: FlowState
----------------------------------------------------------
FlowState
[type: class] [NON-INSTANTIABLE] [requires: license - proGaming, module - flowControllers]
This object represents a state within a FlowController. FlowControllers provide a way to organize the general flow of state-based items in a project. For example if your project is a game with an intro, a menu, and several levels, you could create a FlowController named "GameFlowController" and then define and add an 'Intro' FlowState, a 'Menu' FlowState, and 'LevelXX' FlowStates to that FlowController. Within each FlowState in the FlowController, timed callback elements can be added to help define the sequencing within each FlowState. Once created, FlowControllers, FlowStates, and FlowStateElements can be accessed via 'nc.flows'. This class is not meant to be instantiated or provided directly to 'FlowController.addFlowState', rather it is meant to be a class for user-defined FlowStates to extend. Call 'nc.defineFlowController' to create a new FlowController, then use 'nc.flows' to access it.
FlowState.name
[type: string]
The name of the FlowState.
FlowState.owner
[type: FlowController]
The FlowController that owns this FlowState.
FlowState.time
[type: number]
The current time of this FlowState.
FlowState.setTime(time, performFollowupEvaluation)
[type: function]
Sets the current time of this FlowState
FlowState.setTime parameter: time
[type: number]
The new time to set the FlowState to.
FlowState.setTime parameter: performFollowupEvaluation
[type: boolean] [default: false] [optional]
Flag determining if another evaluation of which FlowStateElement callbacks to execute will be done immediately (without waiting a fixedUpdate) after the time change.
FlowState.setToCurrentState(performFollowupEvaluation)
[type: function]
Sets the owning FlowController's 'currentFlowState' property equal to this FlowState.
FlowState.setToCurrentState parameter: performFollowupEvaluation
[type: boolean] [default: false] [optional]
Flag determining if another evaluation of which FlowStateElement callbacks to execute will be done immediately (without waiting a fixedUpdate) after the state change.
FlowState.addElement(time, callbackName, callbackArgs, variableOffsets)
[type: function] [returns: FlowStateElement]
Adds a new FlowStateElement to this FlowState.
Such elements are essentially timed callbacks to functions within this FlowState, which are used to create the sequencing for this FlowState.
FlowState.addElement parameter: time
[type: number]
The time within this FlowState at which the associated callback will occur.
FlowState.addElement parameter: callbackName
[type: string]
The name of the function within this FlowState that will be called at the given time.
FlowState.addElement parameter: callbackArgs
[type: [any], any] [optional]
Parameters for the callback associated with the new FlowStateElement.
FlowState.addElement parameter: variableOffsets
[type: [string], string] [optional]
The name(s) of the numeric properties that can be adjusted to dynamically offset this FlowStateElement's time. These offset properties will be automatically added to the parent FlowState for easy manipulation of the timing of its FlowStateElements.
FlowState.addPause(time, callbackName, callbackArgs, variableOffsets)
[type: function] [returns: FlowStateElement]
Adds a new 'pause' FlowStateElement to this FlowState. When the FlowState encounters this particular FlowStateElement, its 'time' property will not progress until the provided callback returns true.
FlowState.addPause parameter: time
[type: number]
The time within this FlowState that the pause will take effect.
FlowState.addPause parameter: callbackName
[type: string]
The name of the pause function within this FlowState that will control the pausing. When the function returns true, the FlowState resumes.
FlowState.addPause parameter: callbackArgs
[type: [any], any] [optional]
Parameters for the callback associated with the new pause FlowStateElement.
FlowState.addPause parameter: variableOffsets
[type: [string], string] [optional]
The name(s) of the numeric properties that can be adjusted to dynamically offset the FlowStateElement's time. These offset properties will be automatically added to the parent FlowState for easy manipulation of the timing of its FlowStateElements.
FlowState.getElements()
[type: function] [returns: [FlowStateElement]]
Returns a shallow copy of the list of this FlowState's elements.
----------------------------------------------------------
Section 51: FlowStateElement
----------------------------------------------------------
FlowStateElement
[type: class] [NON-INSTANTIABLE] [requires: license - proGaming, module - flowControllers]
This object represents one of the sequencing elements within a FlowState. Its properties define a timed callback within the FlowState.
FlowStateElement.time
[type: number]
The base time for when this FlowStateElement occurs within it's FlowState.
FlowStateElement.callbackName
[type: string]
The name of the callback function that this FlowStateElement is associated with. The function must be within the owning FlowState class.
FlowStateElement.callbackArgs
[type: string]
Parameters for this FlowStateElement's callback function.
FlowStateElement.isPauseElement
[type: boolean]
Flag determining if this FlowStateElement is a pause element. When a pause element is encountered by the FlowState, its time will not incremented until the associated callback returns true.
FlowStateElement.netTime
[type: boolean]
Read-only property denoting the aggregated callback time within the owning FlowState. This time is the sum of the 'time' base time together with each of the associated 'variableOffset' values.
----------------------------------------------------------
Section 52: FontDefinition
----------------------------------------------------------
FontDefinition
[type: class] [NON-INSTANTIABLE]
Object defining a font within this project. Fonts originate from files within a project's "Assets" directory, Either by including '.ttf' or '.otf' files, or by including a specialized group of pngs whose names end with '_Char[X]' that must include '_Char0'.
FontDefinition.kerningAdjustment
[type: number]
A number that affects the layout width of all of the characters in this font. The number is expressed in terms of multiples 'characterWidth' value.
FontDefinition.lineHeight
[type: number]
Number determining the line height of this font. This value originally defaults to the height of the null character provided (Char0), but can be changed.
FontDefinition.characterWidth
[type: number]
Number determining the basic width of a character in this font. Some of the values used by TextFormats, Texts, and TextBoxes to arrange characters in fonts are denoted in terms of a proportion of this value. For example if the kerning of a given TextBox's TextFormat is .5, then all characters within the TextBox will be spaced apart by half of this 'characterWidth' value. This value originally defaults to the width of the null character provided (Char0), but can be changed in ProjectSettings or runtime.
----------------------------------------------------------
Section 53: Geometry
----------------------------------------------------------
Geometry
[type: class] [extends: AssetComponent] [NON-INSTANTIABLE]
A Geometry is an object that defines a GraphicAsset's vertices, and the associated Materials and attributes.
Geometry.sourceWidth
[type: number]
The width of the source asset (with 'units per pixel' pre-applied).
Geometry.sourceHeight
[type: number]
The height of the source asset (with 'units per pixel' pre-applied).
Geometry.unitsPerPixel
[type: [number]]
The 'unitsPerPixel' scaler values for this Geometry.
----------------------------------------------------------
Section 54: GeometryEditor
----------------------------------------------------------
GeometryEditor
[type: class] [NON-INSTANTIABLE]
Object connected to a Geometry allowing changes to be made to that Geometry. Make the desired changes, then call 'commitChanges'.
GeometryEditor.type
[type: string]
Type identifier.
GeometryEditor.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
GeometryEditor.attributes
[type: object]
Contains a key for each attribute added to this GeometryEditor. The value at each key is an Array of numbers containing the attribute data.
GeometryEditor.indices
[type: [[number]]]
Each element in this Array corresponds to the elements in the materials Array of the Graphic that will use the resulting Geometry. Each element contains an Array of numbers containing the index data.
GeometryEditor.attributeDuplicateThresholds
[type: object]
Contains a key for each attribute added to this GeometryEditor. The value at each key is the threshold used to determine if an attribute value should be considered to match another value in the same attribute Array. When a new vertex is added to the GeometryAccesor, its attribute values are compared to the existing vertices, by checking if the difference between the values is lower than this threshold. If all attributes are considered to match, the existing vertex is re-used as an optimization. A threshold of 0 on any attribute will ensure that no vertices are ever considered to match each other, effectively disabling this optimization.
GeometryEditor.connectedGeometry
[type: Geometry]
The Geometry that this GeometryEditor is connected to.
GeometryEditor.copyGeometry(geometry, callbackOwner, callbackName, callbackArgs)
[type: function]
Copies the vertex, attribute, and material information from the given Geometry into this GeometryEditor. Please note that in many cases, this function operates asyncronously since the Geometry being copied may no be loaded yet. Consequently, using this GeometryEditor to operate on the copied Geometry will need to wait until the source Geomtry loads. This can be achieved by asyncronously awaiting this function, or by supplying a callback, which will be called when the source Geometry loads. The callback will receive the iniating GeometryEditor as its first parameter.
GeometryEditor.copyGeometry parameter: geometry
[type: Geometry]
The source Geometry whose info will be copied into this GeometryEditor.
GeometryEditor.copyGeometry parameter: callbackOwner
[type: object] [optional]
The object owning the callback that will be called when the source Geometry loads.
GeometryEditor.copyGeometry parameter: callbackName
[type: string] [optional]
The name of the callback that will be called when the source Geometry loads.
GeometryEditor.copyGeometry parameter: callbackArgs
[type: Array, any] [optional]
The arguments for the callback that will be called when the source Geometry loads.
GeometryEditor.addVertex(vertex)
[type: function] [returns: number]
Adds a vertex that may be referenced by the indices. The vertex's position in the attribute arrays is returned, and is the value that should be used by the indices to refer to this vertex. Note that the length of the attributes may not increase after this call completes if the vertex was found to be a duplicate of an existing vertex. In this scenario, the index of the existing vertex will be returned.
GeometryEditor.addVertex parameter: vertex
[type: object]
Each key in this Object should be the name of an attribute in this GeometryEditor. The value should be a number, Vector2, Vector3, or Vector4 containing the value of the attribute at this vertex. The type of the value must correspond to the 'size' specified in 'addAttribute'. Duplicate vertices will be automatically handled according to the values in attributeDuplicateThresholds.
GeometryEditor.addTriangle(vertex0, vertex1, vertex2, materialIndex)
[type: function]
Adds a triangle that will use the Material at 'materialIndex' of the Graphic that will use the resulting Geometry.
GeometryEditor.addTriangle parameter: vertex0
[type: object]
Each key in this Object should be the name of an attribute in this GeometryEditor. The value should be a number, Vector2, Vector3, or Vector4 containing the value of the attribute at this vertex. Duplicate vertices will be automatically handled according to the values in attributeDuplicateThresholds.
GeometryEditor.addTriangle parameter: vertex1
[type: object]
Each key in this Object should be the name of an attribute in this GeometryEditor. The value should be a number, Vector2, Vector3, or Vector4 containing the value of the attribute at this vertex. Duplicate vertices will be automatically handled according to the values in attributeDuplicateThresholds.
GeometryEditor.addTriangle parameter: vertex2
[type: object]
Each key in this Object should be the name of an attribute in this GeometryEditor. The value should be a number, Vector2, Vector3, or Vector4 containing the value of the attribute at this vertex. Duplicate vertices will be automatically handled according to the values in attributeDuplicateThresholds.
GeometryEditor.addTriangle parameter: materialIndex
[type: number]
The index into the materials Array of the Graphic that will use the resulting Geometry. Defaults to 0.
GeometryEditor.addAttribute(name, type, size)
[type: function]
Adds a new attribute. If an attribute aleady exists with this name, the attribute is re-initialized and will be empty.
GeometryEditor.addAttribute parameter: name
[type: string]
The name of the attribute.
GeometryEditor.addAttribute parameter: type
[type: string]
The type of number that should be used to store this attribute.
GeometryEditor.addAttribute parameter: size
[type: number]
Specifies the number of components on this attribute. Must be 1, 2, 3, or 4.
GeometryEditor.deleteAllAttributesAndIndices()
[type: function]
Deletes all attributes. This is typically used if the default attributes of 'position' and 'uv' are unneeded on a new GeometryEditor.
GeometryEditor.convertGeometryToGrid(horizontalSegments, verticalSegments)
[type: function]
Converts the connected Geometry to a grid of triangles oriented on the XY plane. Attribute values at each new point will be interpoloted linearly across the grid, using the attribute values at the minimum and maximum vertices of the original geometry.
GeometryEditor.convertGeometryToGrid parameter: horizontalSegments
[type: number]
The number of horizontal segments of the grid.
GeometryEditor.convertGeometryToGrid parameter: verticalSegments
[type: number]
The number of vertical segments of the grid.
GeometryEditor.newGrid(width, height, horizontalSegments, verticalSegments)
[type: function]
Creates a new grid of triangles oriented on the XY plane, centered around 0 on each axis.
GeometryEditor.newGrid parameter: width
[type: number]
The width of the grid.
GeometryEditor.newGrid parameter: height
[type: number]
The height of the grid.
GeometryEditor.newGrid parameter: horizontalSegments
[type: number]
The number of horizontal segments of the grid.
GeometryEditor.newGrid parameter: verticalSegments
[type: number]
The number of vertical segments of the grid.
GeometryEditor.translate(translation, attributeName)
[type: function]
Translates all of the values of an attribute by the given translation amount.
GeometryEditor.translate parameter: translation
[type: number, Vector2, Vector3, Vector4]
The amount the values of the attribute are translated. This parameter should be a number, Vector2, Vector3, or Vector4. The type should correspond to the size of the attribute. For example, the default 'position' attribute should be translated by a Vector3, and the default 'uv' attribute should be translated by a Vector2.
GeometryEditor.translate parameter: attributeName
[type: string]
The name of the attribute data to be translated. Defaults to 'position'.
GeometryEditor.getVertexTemplate()
[type: function]
Returns a new object structured appropriately to pass into the addVertex and addTriangle functions. For each currently defined attribute, a member of type number, Vector2, Vector3, or Vector4 is added.
GeometryEditor.getBounds(attributeName, lowerBounds, upperBounds)
[type: function]
Calculates the lowest and highest values seen on each dimension of the attribute's data.
GeometryEditor.getBounds parameter: attributeName
[type: string]
The name of the attribute data to search for bounds. Defaults to 'position'.
GeometryEditor.getBounds parameter: lowerBounds
[type: number]
The array to populate with the lowest value found in each dimension of the attribute data.
GeometryEditor.getBounds parameter: upperBounds
[type: number]
The array to populate with the highest value found in each dimension of the attribute data.
GeometryEditor.commitChanges()
[type: function]
Applies the changes performed by this GeometryEditor to the connectect Geometry. To optimize performance, this should be called once after all changes have been performed, as this function can have a performance impact.
----------------------------------------------------------
Section 55: GraphicAsset
----------------------------------------------------------
GraphicAsset
[type: class] [NON-INSTANTIABLE]
A GraphicAsset is an object that represents a piece of visual content such as an image file or an 'OBJ'. GraphicAssets contain a Geometry, and a set of MaterialPresets that, when applied via 'GraphicObject.graphicAsset' or 'GraphicObject.setGraphicAsset', change the appearance of a GraphicObject to that of the GraphicAsset.
GraphicAsset.type
[type: string]
Type identifier
GraphicAsset.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
GraphicAsset.name
[type: string]
The GraphicAsset's name.
example:
// Objective: Set and Get the name of a GraphicAsset.
// Expected Result: The console should read "name is WhiteBox"
// Create a GraphicObject using the WhiteBox GraphicAsset.
let myGraphicObject = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "MyGraphicObject" );
// Get an instance of the GraphicAsset from its GraphicObject.
let myGraphicAsset = myGraphicObject.graphicAsset;
// Console log the name of the GraphicAsset.
console.log("name is", myGraphicAsset.name );
GraphicAsset.geometry
[type: Geometry]
This GraphicAsset's geometry.
example:
// Objective: Get the current Geometry of a GraphicAsset
// Expected Result: The console should have 2 log messages as follows:
// myGraphicAsset (Box) sourceWidth, sourceHeight 100 100
// myGraphicAsset (Triangle) sourceWidth, sourceHeight 50 100
// Create a GraphicObject using the white box GraphicAsset.
let myGraphicObject = new GraphicObject( nc.graphicAssets.whiteBox, nc.mainScene, "MyGraphicObject" );
// Get the GraphicAsset from the GraphicObject
let myGraphicAsset = myGraphicObject.graphicAsset;
// Console log the Geometry sourceWidth and sourceHeight of the GraphicAsset.
console.log("myGraphicAsset (Box) sourceWidth, sourceHeight", myGraphicAsset.geometry.sourceWidth, myGraphicAsset.geometry.sourceHeight);
// Update the Geometry of myGraphicAsset with the white triangle.
myGraphicAsset.geometry = nc.geometries.WhiteTriangle;
// Console log the Geometry sourceWidth and sourceHeight again.
console.log("myGraphicAsset (Triangle) sourceWidth, sourceHeight", myGraphicAsset.geometry.sourceWidth, myGraphicAsset.geometry.sourceHeight);
GraphicAsset.materialPresets
[type: [MaterialPreset]]
List of MaterialPresets associated with this GraphicAsset.
----------------------------------------------------------
Section 56: MaterialPreset
----------------------------------------------------------
MaterialPreset
[type: class] [NON-INSTANTIABLE]
A MaterialPreset is an object with the instructions for configuring a Material. A list of MaterialPresets is included with every GraphicAsset, so that when a GraphicObject is set to a given GraphicAsset, that GraphicObject's Materials can be configured accordingly. For example, for a standard image-file GraphicAsset, the typical MaterialPreset would list the "SampleMainTexture" EffectNode, and would also have the name of the Texture to set for the 'mainTexture' EffectController.
MaterialPreset.type
[type: string]
Type identifier
MaterialPreset.effectNodeNames
[type: [string]]
List of the names of the EffectNodes to be applied to the Material.
MaterialPreset.materialValues
[type: object]
Dictionary of EffectController values to be applied to the Material. Please note that the EffectController values stored in this object will be listed in a more primative form than elsewhere: EffectControllers that have a Vector base type will be stored as a simple array of numeric values within this object. Also Texture EffectController values are simply referenced by including the name of the Texture in question.
----------------------------------------------------------
Section 57: GraphicExpander
----------------------------------------------------------
GraphicExpander
[type: class] [NON-INSTANTIABLE]
A GraphicExpander allows a region of a GraphicObject to be specified as expandable to a new size. When a new size is specified, this region of the GraphicObject will change size, but the area outside the expandable region will move and stretch to keep aligned to the expanded region.
GraphicExpander.type
[type: string]
Type identifier.
GraphicExpander.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
GraphicExpander.symmetric
[type: boolean]
Flag determining if the GraphicExpander's expandable area and expanded area are both in the middle of the GraphicObject. When this value is true, the interface to configure the GraphicExpander includes expandableWidth, expandableHeight, expandedWidth, and expandedHeight. When this value is false, the interface to configure the GraphicExpander includes expandableAreaLeft, expandableAreaRight, expandableAreaBottom, expandableAreaTop, expandedAreaLeft, expandedAreaRight, expandedAreaBottom, and expandedAreaTop.
GraphicExpander.expandableWidth
[type: number] [default: 0]
Value that determines the portion of the GraphicObject that will be affected by this GraphicExpander. This property is only applicable if the 'symmetric' property is true.
GraphicExpander.expandableHeight
[type: number] [default: 0]
Value that determines the portion of the GraphicObject that will be affected by this GraphicExpander. This property is only applicable if the 'symmetric' property is true.
GraphicExpander.expandedWidth
[type: number] [default: 100]
The expanded width of the GraphicExpander. Set this value to stretch or shrink the associated GraphicObject horizontally. This property is only applicable if the 'symmetric' property is true.
GraphicExpander.expandedHeight
[type: number] [default: 100]
The expanded height of the GraphicExpander. Set this value to stretch or shrink the associated GraphicObject vertically. This property is only applicable if the 'symmetric' property is true.
GraphicExpander.expandableAreaLeft
[type: number] [default: 0]
Value that defines the left bound of the portion of the GraphicObject that will be affected by this GraphicExpander. This property is only applicable if the 'symmetric' property is false.
GraphicExpander.expandableAreaRight
[type: number] [default: 0]
Value that defines the right bound of the portion of the GraphicObject that will be affected by this GraphicExpander. This property is only applicable if the 'symmetric' property is false.
GraphicExpander.expandableAreaBottom
[type: number] [default: 0]
Value that defines the bottom bound of the portion of the GraphicObject that will be affected by this GraphicExpander. This property is only applicable if the 'symmetric' property is false.
GraphicExpander.expandableAreaTop
[type: number] [default: 0]
Value that defines the top bound of the portion of the GraphicObject that will be affected by this GraphicExpander. This property is only applicable if the 'symmetric' property is false.
GraphicExpander.expandedAreaLeft
[type: number] [default: -50]
Value that determines where the left bound of the expansion area will be after the expansion. Set this value to stretch or shrink the associated GraphicObject's left side. This property is only applicable if the 'symmetric' property is false.
GraphicExpander.expandedAreaRight
[type: number] [default: 50]
Value that determines where the right bound of the expansion area will be after the expansion. Set this value to stretch or shrink the associated GraphicObject's right side. This property is only applicable if the 'symmetric' property is false.
GraphicExpander.expandedAreaBottom
[type: number] [default: -50]
Value that determines where the bottom bound of the expansion area will be after the expansion. Set this value to stretch or shrink the associated GraphicObject's bottom side. This property is only applicable if the 'symmetric' property is false.
GraphicExpander.expandedAreaTop
[type: number] [default: 50]
Value that determines where the top bound of the expansion area will be after the expansion. Set this value to stretch or shrink the associated GraphicObject's top side. This property is only applicable if the 'symmetric' property is false.
GraphicExpander.dispose()
[type: function]
Removes and destroys the GraphicExpander, restoring the original Geometry if possible.
----------------------------------------------------------
Section 58: GraphicObject
----------------------------------------------------------
GraphicObject
[type: class] [extends: SceneObject]
GraphicObjects are SceneObjects with visible components such as Geometry, Materials, and Textures. Anything that you can see in an Incisor® Scene is some form of GraphicObject. GraphicObjects can easily be set to different GraphicAssets such as source Images, OBJs, or other customizable visuals.
GraphicObject.visible
[type: boolean] [default: true]
Boolean determining if this GraphicObject is visible. Unlike the 'enabled' property of SceneObjects, 'GraphicObject.visible' does not affect any descendants of this GraphicObject. It should be noted that 'turning off' objects using 'GraphicObject.visible=false' is often less performant than 'SceneObject.enabled=false', because while the 'visible' property does prevent the object from rendering, the 'enabled' property also prevents several additional hierarchical calculations from occuring for the effected SceneObjects.
example:
// Objective: Make a GraphicObject not visible.
// Expected Result: Only the "WhiteTriangle" is visible. The "WhiteBox" is not.
// Add a "WhiteBox" GraphicObject to the main scene using the GraphicObject constructor.
let whiteBox = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "WhiteBox" );
// move the "WhiteBox" 100 world units to the left
whiteBox.position.x = -100;
// Add a "WhiteTriangle" GraphicObject to the main scene using the GraphicObject constructor.
let whiteTriangle = new GraphicObject( nc.graphicAssets.WhiteTriangle, nc.mainScene, "WhiteTriangle" );
// move the "WhiteTriangle" 100 world units to the right
whiteTriangle.position.x = 100;
// Set "WhiteBox" to visible = false.
whiteBox.visible = false;
GraphicObject.layer
[type: Layer] [default: nc.layers.DefaultLayer]
The GraphicObject's render-order Layer within the Scene. For a list of available layers per Scene, see 'nc.layersByScene'
GraphicObject.subLayer
[type: number] [default: 0]
The GraphicObject's render-order within it's assigned Layer as represented by a number between -1 and 1.
GraphicObject.graphicAsset
[type: GraphicAsset] [default: nc.graphicAssets.WhiteBox]
Use this to set or get the current GraphicAsset for this GraphicObject. Also see 'setGraphicAsset', which can set the GraphicAsset with options to forego the EffectNode and EffectController presets. When 'getting' this value, keep in mind that it will only reflect the GraphicAsset that this GraphicObject was previously set to; the value returned does not reflect customizations made to the Geometry, Materials, EffectNodes or EffectControllers that occurred since it was previously set.
example:
// Objective: Set the GraphicAsset of a GraphicObject
// Expected Result: You will see a WhiteTriangle on the screen and the console should have 2 log messages as follows:
// 'MyGraphicObject' GraphicAsset name: WhiteBox
// 'MyGraphicObject' GraphicAsset name: WhiteTriangle
// Add a GraphicObject to the main scene using the GraphicObject constructor and the WhiteBox GraphicAsset.
let myGraphicObject = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "MyGraphicObject" );
// Console log the name of the GraphicAsset
console.log("'MyGraphicObject' GraphicAsset name:", myGraphicObject.graphicAsset.name);
// Update 'MyGraphicObject' to the WhiteTriangle GraphicObject.
myGraphicObject.graphicAsset = nc.graphicAssets.WhiteTriangle;
// Console log the name of the GraphicAsset again.
console.log("'MyGraphicObject' GraphicAsset name:", myGraphicObject.graphicAsset.name);
GraphicObject.materialMaster
[type: MaterialMaster]
The MaterialMaster is a convenience-based object that allows quick manipulation of all of the Materials on a given GraphicObject. To manipulate all of the Materials on a GraphicObject at the same time, you can simply manipulate its MaterialMaster. It should be noted that querying values from the MaterialMaster can be misleading, as the returned values only refer to the last values set on the MaterialMaster itself, and would not reflect individual changes made to the Materials themselves.
example:
// Objective: Use a GraphicObject's MaterialMaster to change its color.
// Expected Result: You will see a red box.
// Add a GraphicObject to the main scene using the GraphicObject constructor and the WhiteBox GraphicAsset.
let myGraphicObject = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "MyGraphicObject" ) ;
// Get the instance of this GraphicObject's MaterialMaster
let materialMaster = myGraphicObject.materialMaster;
// By default, the RGB values of fillColor are set to 1. Set the green and blue values to zero to leave only red.
materialMaster.fillColor.green = 0;
materialMaster.fillColor.blue = 0;
GraphicObject.geometry
[type: Geometry] [default: nc.geometries.WhiteBox]
The current Geometry of this GraphicObject. Setting this GraphicObject's GraphicAsset will update its Geometry automatically, but the Geometry can be set directly for further customization.
example:
// Objective: Get the current Geometry of a GraphicObject
// Expected Result: The console should have 2 log messages as follows:
// 'MyGraphicObject' (Box) sourceWidth, sourceHeight 100 100
// 'MyGraphicObject' (Triangle) sourceWidth, sourceHeight 50 100
// Create a GraphicObject using the white box GraphicAsset.
let myGraphicObject = new GraphicObject( nc.graphicAssets.whiteBox, nc.mainScene, "MyGraphicObject" );
// Console log the Geometry sourceWidth and sourceHeight.
console.log("'MyGraphicObject' (Box) sourceWidth, sourceHeight", myGraphicObject.geometry.sourceWidth, myGraphicObject.geometry.sourceHeight);
// Update the Geometry of myGraphicObject with the white triangle.
myGraphicObject.geometry = nc.geometries.WhiteTriangle;
// Console log the Geometry sourceWidth and sourceHeight again.
console.log("'MyGraphicObject' (Triangle) sourceWidth, sourceHeight", myGraphicObject.geometry.sourceWidth, myGraphicObject.geometry.sourceHeight);
GraphicObject.graphicExpander
[type: GraphicExpander]
A GraphicExpander allows a region of a GraphicObject to be specified as expandable to a new size. When a new size is specified, this region of the GraphicObject will change size, but the area outside the expandable region will move and stretch to keep aligned to the expanded region. This property defaults to undefined, but can be enabled by calling 'GraphicObject.configureGraphicExpander()'.
example:
[ReferenceSnippet: GraphicObject_ConfigureGraphicExpander]
GraphicObject.spriteSetter
[type: SpriteSetter]
A SpriteSetter is a PlaybackController that switches a GraphicObject's graphicAsset between numerically sequential GraphicAssets. This property defaults to undefined, but can be enabled by calling 'GraphicObject.configureSpriteSetter()'.
example:
// Objective: Configure a SpriteSetter
GraphicObject.masking
[type: Masking]
Object controlling the masking of a GraphicObject. Masking functionality enables selective rendering of portions of GraphicObjects. MaskGroups can be defined, and then GraphicObjects can be configured as 'mask', which add their shape to the area of the newly defined MaskGroup. Then, when other GraphicObjects are configured as 'masked', their rendering only occures within areas defined by the MaskGroup.
GraphicObject.frustumCulling
[type: boolean] [default: true]
Boolean determining if the GraphicObject is automatically omitted from rendering when it is entirely outside of the Camera's viewing area (its frustum). While the value defaults to true, reasons to set it false include situations where the Geometry of a given GraphicObject is being adjusted via EffectNode (on the GPU), and so while an object's postion may indicate that it should be culled due to being out of view, its Geometry may be distorted into a position that is actually in view of the camera, and should therefore be rendered after all.
GraphicObject.setGraphicAsset(graphicAsset, maintainEffectNodes, maintainEffectControllerValues)
[type: function]
Changes this GraphicObject's GraphicAsset, updating its Geometry and Materials.
GraphicObject.setGraphicAsset parameter: graphicAsset
[type: GraphicAsset]
The GraphicAsset that this GraphicObject will become. For a list of available GraphicAssets, see 'nc.graphicAssets'.
GraphicObject.setGraphicAsset parameter: maintainEffectNodes
[type: boolean] [default: false] [optional]
Boolean determining if the current EffectNodes will be maintained during the transformation to the new GraphicAsset.
GraphicObject.setGraphicAsset parameter: maintainEffectControllerValues
[type: boolean] [default: false] [optional]
Boolean determining if the current EffectController values will be maintained during the transformation to the new GraphicAsset.
example:
// Objective: Set a GraphicAsset on a GraphicObject.
// Expected Result: You will see a white triangle.
// Add a GraphicObject to the main scene using the GraphicObject constructor and the WhiteBox GraphicAsset.
let myGraphicObject = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "MyGraphicObject") ;
// Call setGraphicAsset() to change the White Box to a White Triangle
myGraphicObject.setGraphicAsset( nc.graphicAssets.WhiteTriangle );
GraphicObject.setMaterials(materials)
[type: function]
Sets this GraphicObject's Materials directly. This is used for specialized customization of GraphicObjects, and is not needed when working with standard GraphicAssets.
GraphicObject.setMaterials parameter: materials
[type: [Material], Material]
The new list of Materials for this GraphicObject.
GraphicObject.getMaterials()
[type: function] [returns: [Material]]
Returns the list of this GraphicObject's Materials.
GraphicObject.configureGraphicExpander()
[type: function]
Adds a GraphicExpander instance to this GraphicObject, which allows the GraphicObject to be expanded to a new size from the middle out.
GraphicObject.configureSpriteSetter(keyGraphicAsset, frameRate, pauseImmunity, speedControl)
[type: function]
Adds a SpriteSetter instance to this GraphicObject, which allows the GraphicObject's graphicAsset to be switched to numerically sequential GraphicAssets.
GraphicObject.configureSpriteSetter parameter: keyGraphicAsset
[type: GraphicAsset]
Specifies the key GraphicAsset. This GraphicAsset's name should end in a number. All GraphicAssets whose name matches the key GraphicAsset's name with a different trailing number will be used to set the SpriteSetter's associated GraphicAssets list. For example, if the key GraphicAsset is named "MyAnimation001", all GraphicAssets with the name "MyAnimation" followed by any sequence of the digits 0-9 will be gathered into this SpriteSetter's associated GraphicAssets.
GraphicObject.configureSpriteSetter parameter: frameRate
[type: number] [default: nc.targetFixedUpdateRate] [optional]
Specifies the frames per second at which the SpriteSetter should play. Note that this is reflected in the SpriteSetter's playbackRate value.
GraphicObject.configureSpriteSetter parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this ParticleSystem will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
GraphicObject.configureSpriteSetter parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this ParticleSystem is affected by.
example:
// Objective: Configure a SpriteSetter
----------------------------------------------------------
Section 59: Masking
----------------------------------------------------------
Masking
[type: class]
Object controlling the masking of a GraphicObject. Masking functionality enables selective rendering of portions of GraphicObjects. MaskGroups can be defined, and then GraphicObjects can be configured as 'mask', which add their shape to the area of the newly defined MaskGroup. Then, when other GraphicObjects are configured as 'masked', their rendering only occures within areas defined by the MaskGroup.
Masking.inheritedTypes
[type: object]
Dictionary of type that this object inherits from.
Masking.enabled
[type: boolean] [default: false]
Flag determining if masking functionality is enabled (for both 'mask' and 'masked').
Masking.type
[type: string] [default: "masked"]
String property that determines if this GraphicObject is a 'mask' or 'masked'. When masking functionality is enabled, a 'mask' contributes to the MaskGroup(s) it is associated with. When a GraphicObject is 'masked' it is only rendered in the areas determined by the MaskGroup(s) it is associated with. This setting does nothing when 'GraphicObject.masking.enabled' is false;
Masking.invert
[type: boolean] [default: false]
Boolean determining if the affect of masking on a 'masked' GraphicObject is inverted, meaning that the areas where it is masked and the areas where it is not masked are switched. When this value is false, the masked GraphicObject in question is only rendered in areas that 'mask' GraphicObjects also occupy. When this value is true, the masked GraphicObject in question is only rendered in areas that 'mask' GraphicObjects do not occupy. This setting only applies to GraphicObjects with the 'masked' type, 'mask' GraphicObjects are unaffected by this setting. This setting does nothing when 'GraphicObject.masking.enabled' is false.
Masking.makeMask(maskGroups)
[type: function]
Causes this GraphicObject to contribute to the given MaskGroup(s), adding its fully filled Geometry to the MaskGroups' areas.
Masking.makeMask parameter: maskGroups
[type: MaskGroup, [MaskGroup]]
The MaskGroup(s) that this GraphicObject's shape will be added to. For a list of available MaskGroups, see 'nc.maskGroups'.
example:
// Objective: Use a mask to reveal only a portion of the phrase "Hello World."
// Expected Result: You will see the word "World." on screen.
// create a TextBox
let textBox = nc.addTextBox( nc.mainScene );
textBox.string = "Hello World."
textBox.makeMasked( nc.maskGroups.MainMaskGroup ); // mask it with "MainMaskGroup"
// create a GraphicObject rectangle and position it to cover the word "World."
this.masker = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "Masker" );
this.masker.scale.x = 2; // rectangle
this.masker.position.x = 75; // position
this.masker.makeMask( nc.maskGroups.MainMaskGroup ); // make it a masker for "MainMaskGroup"
Masking.makeMasked(maskGroups, invert)
[type: function]
Causes this GraphicObject to only be rendered in the areas defined by the given MaskGroup(s).
Masking.makeMasked parameter: maskGroups
[type: MaskGroup, [MaskGroup]]
The MaskGroup(s) that the rendering of this GraphicObject will be limited to. For a list of available MaskGroups, see 'nc.maskGroups'.
Masking.makeMasked parameter: invert
[type: boolean] [default: false] [optional]
Inverts the effect of the masking, swapping the areas where this GraphicObject will and won't be rendered.
example:
// Objective: Use a mask to reveal only a portion of the phrase "Hello World."
// Expected Result: You will see the word "World." on screen.
// create a TextBox
let textBox = nc.addTextBox( nc.mainScene );
textBox.string = "Hello World."
textBox.makeMasked( nc.maskGroups.MainMaskGroup ); // mask it with "MainMaskGroup"
// create a GraphicObject rectangle and position it to cover the word "World."
this.masker = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "Masker" );
this.masker.scale.x = 2; // rectangle
this.masker.position.x = 75; // position
this.masker.makeMask( nc.maskGroups.MainMaskGroup ); // make it a masker for "MainMaskGroup"
Masking.setMaskGroups(maskGroups)
[type: function]
Sets the MaskGroup or list of MaskGroups that this GraphicObject is associated with.
Masking.setMaskGroups parameter: maskGroups
[type: MaskGroup, [MaskGroup]]
The MaskGroup or list of MaskGroups to set.
Masking.getMaskGroups()
[type: function] [returns: [MaskGroup]]
Gets the list of MaskGroups that this GraphicObject is associated with.
----------------------------------------------------------
Section 60: MaskGroup
----------------------------------------------------------
MaskGroup
[type: class]
Masking functionality enables selective rendering of portions of GraphicObjects. MaskGroups can be defined, and then GraphicObjects can be configured as 'mask', which add their shape to the area of the newly defined MaskGroup. Then, when other GraphicObjects are configured as 'masked', their rendering only occures within areas defined by the MaskGroup.
MaskGroup.type
[type: string]
Type identifier.
MaskGroup.inheritedTypes
[type: object]
Dictionary of type that this object inherits from.
MaskGroup.name
[type: string]
The name of the MaskGroup
MaskGroup.maskGroupNumber
[type: number]
The numeric value representing this MaskGroup.
----------------------------------------------------------
Section 61: IncisorApp
----------------------------------------------------------
IncisorApp
[type: class] [NON-INSTANTIABLE] [requires: unpublished only, license - advancedTools]
Object housing functionality allowing for direct interactions with the Incisor® application from within the javascript runtime. Such functionality includes the ability to get/set project and application settings, initiate the hosting of files in local directories, script the opening of new browser tabs, and perform other transactions with the Incisor® application.
IncisorApp.getProjectSettings()
[type: function] [returns: IncrCommsResponseObject]
Returns an IncrCommsResponseObject whose '.payload' member is copy of the current ProjectSettings of the currently open project in javascript object form. In order to update the ProjectSettings, pass 'IncisorApp.setProjectSettings' a version of this payload that contains the desired modifications.
IncisorApp.setProjectSettings(projectSettings)
[type: function] [returns: IncrCommsResponseObject]
Updates the ProjectSettings of the currently open project in memory. The current ProjectSettings can be retrieved using 'IncisorApp.getProjectSettings', modified, and updated using this function. ProjectSettings updated using this method will be automatically validated against the internal Incisor® schema. Once updated, the current project must be saved in order for the changes to be reflected in the ProjectSettings.json file within the project directory.
IncisorApp.setProjectSettings parameter: projectSettings
[type: object]
The desired ProjectSettings to update the project with.
IncisorApp.getApplicationSettings()
[type: function] [returns: IncrCommsResponseObject]
Returns an IncrCommsResponseObject whose '.payload' member is copy of the Incisor ApplicationSettings in javascript object form. In order to update the ApplicationSettings, pass 'IncisorApp.setApplicationSettings' a version of this payload that contains the desired modifications.
IncisorApp.setApplicationSettings(applicationSettings, commitToDisk)
[type: function] [returns: IncrCommsResponseObject]
Updates the Incisor® application settings in memory. The current ApplicationSettings can be retrieved using 'IncisorApp.getApplicationSettings', modified, and updated using this function. ApplicationSettings updated using this method will be automatically validated against the internal Incisor® schema.
IncisorApp.setApplicationSettings parameter: applicationSettings
[type: object]
The desired ApplicationSettings to update Incisor® with.
IncisorApp.setApplicationSettings parameter: commitToDisk
[type: boolean] [default: false] [optional]
Boolean determining if the new settings are immediately saved on disk, ensuring their persistence on subsequent application launches.
IncisorApp.hostLocalDirectory(directoryPath, isPathRelative, allowRemoteHosting, enableGzip)
[type: function] [returns: IncrCommsResponseObject]
Begins hosting files in the given directory, and returns an IncrCommsResponseObject whose '.payload' member contains the port selected by Incisor® to host from.
IncisorApp.hostLocalDirectory parameter: directoryPath
[type: string]
The relative or absolute path to the directory to host files from.
IncisorApp.hostLocalDirectory parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
IncisorApp.hostLocalDirectory parameter: allowRemoteHosting
[type: boolean] [default: false] [optional]
Bool stating if external connections can make requests from this host. If true, the 'allowRemoteHosting' item in application settings must also be set to true.
IncisorApp.hostLocalDirectory parameter: enableGzip
[type: boolean] [default: true] [optional]
Bool stating files hosted from this connection should be compressed using 'gzip'.
IncisorApp.stopHostingLocalDirectory(directoryPath, isPathRelative)
[type: function] [returns: IncrCommsResponseObject]
Ends hosting files from the given directory, freeing up the associated port.
IncisorApp.stopHostingLocalDirectory parameter: directoryPath
[type: string]
The relative or absolute path to the directory to stop hosting files from.
IncisorApp.stopHostingLocalDirectory parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path.
IncisorApp.openTabToUrl(url)
[type: function] [returns: IncrCommsResponseObject]
Opens a new tab in the browser at the given url without requiring user interaction.
IncisorApp.openTabToUrl parameter: url
[type: string]
The url to open the new browser tab to.
IncisorApp.pauseProjectDirectoryWatcher()
[type: function]
Temporarily stops Incisor's file system watcher, allowing fileIO changes to the project without Incisor auto-refreshing the project in the inspector.
IncisorApp.resumeProjectDirectoryWatcher()
[type: function]
Resumes Incisor's file system watcher, such that fileIO changes result in Incisor auto-refreshing the project in the inspector.
----------------------------------------------------------
Section 62: IncisorAppBasic
----------------------------------------------------------
IncisorAppBasic
[type: class] [NON-INSTANTIABLE] [requires: unpublished only]
Object housing basic functionality allowing for direct interactions with the Incisor® application from within the javascript runtime. Such functionality includes the ability to get the list of optional code modules from the Incisor™ application. See 'nc.incisorApp' for many more application interaction options.
IncisorAppBasic.getOptionalCodeModuleNames()
[type: function] [returns: [string]]
Returns a list of the names of all of the Incisor® 'optional code' modules. Optional code modules are groups of functionality that can be left out of projects in order to optimize their overall published download size. Optional code modules can be marked for exclusion in ProjectSettings.
----------------------------------------------------------
Section 63: LayoutObject
----------------------------------------------------------
LayoutObject
[type: class] [NON-INSTANTIABLE]
Object housing information about this particular SceneObject's LayoutObject functionality. LayoutObject functionality applies to SceneObjects that have been added as elements to a LayoutStack, which is responsible for organizing visual content (TextBoxes, Graphics, Buttons, etc...) into dynamic vertical or horizontal stacks. Until a SceneObject has been configured with LayoutObject functionality (either by calling 'SceneObject.configureLayoutObject' or by adding the SceneObject as an element to a LayoutStack), the 'SceneObject.layoutObject' member will be undefined.
LayoutObject.type
[type: string]
Type identifier.
LayoutObject.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
LayoutObject.width
[type: number]
The width of this LayoutObject.
LayoutObject.height
[type: number]
The height of this LayoutObject.
LayoutObject.leftBuffer
[type: number] [default: 0]
A buffer that is included when this LayoutObject is laid out within a LayoutStack. This buffer is multiplied by nc.uiZoom.totalZoom if the containing LayoutStack is configured to be affected by iuZoom.
LayoutObject.rightBuffer
[type: number] [default: 0]
A buffer that is included when this LayoutObject is laid out within a LayoutStack. This buffer is multiplied by nc.uiZoom.totalZoom if the containing LayoutStack is configured to be affected by iuZoom.
LayoutObject.bottomBuffer
[type: number] [default: 0]
A buffer that is included when this LayoutObject is laid out within a LayoutStack. This buffer is multiplied by nc.uiZoom.totalZoom if the containing LayoutStack is configured to be affected by iuZoom.
LayoutObject.topBuffer
[type: number] [default: 0]
A buffer that is included when this LayoutObject is laid out within a LayoutStack. This buffer is multiplied by nc.uiZoom.totalZoom if the containing LayoutStack is configured to be affected by iuZoom.
LayoutObject.justification
[type: string] [default: "left"]
The justification of this LayoutObject within the LayoutStack that contains it (if applicable). See 'nc.constants.justifications' for a list of available values.
LayoutObject.overrideWidth
[type: number] [default: undefined]
An override to the width value of this LayoutObject, which would otherwise be set by the 'refreshLayoutCallback' callback function connected to this LayoutObject.
LayoutObject.overrideHeight
[type: number] [default: undefined]
An override to the height value of this LayoutObject, which would otherwise be set by the 'refreshLayoutCallback' callback function connected to this LayoutObject.
LayoutObject.refreshLayoutCallbackOwner
[type: object]
The owner of the function that will be called automatically to refresh the layout of this LayoutObject and determine its layout dimensions. This function is responsible for laying out the LayoutObject's content and returning a Vector2 containing its dimensions, which will then be used to position this LayoutObject within the LayoutStack that contains it. GrapicObjects and TextBoxes automatically perform these functions internally without the need for this callback... Set this value to customize the process of laying out this SceneObject's content, and/or determining its layout width/height.
LayoutObject.refreshLayoutCallbackName
[type: string]
The name of the function that will be called automatically to refresh the layout of this LayoutObject and determine its layout dimensions. This function is responsible for laying out the LayoutObject's content and returning a Vector2 containing its dimensions, which will then be used to position this LayoutObject within the LayoutStack that contains it. GrapicObjects and TextBoxes automatically perform these functions internally without the need for this callback... Set this value to customize the process of laying out this SceneObject's content, and/or determining its layout width/height.
LayoutObject.refreshLayoutCallbackArgs
[type: any]
Parameters for the function that will be called automatically to refresh the layout of this LayoutObject and determine its layout dimensions. This function is responsible for laying out the LayoutObject's content and returning a Vector2 containing its dimensions, which will then be used to position this LayoutObject within the LayoutStack that contains it. GrapicObjects and TextBoxes automatically perform these functions internally without the need for this callback... Set this value to customize the process of laying out this SceneObject's content, and/or determining its layout width/height.
LayoutObject.layoutLazyUpdater
[type: LazyUpdater]
The LazyUpdater in charge of laying out the contents of the SceneObject that owns this LayoutObject.
LayoutObject.informParentsOfLayoutChange()
[type: function]
Informs the containing LayoutStack of a change in this LayoutObject's dimensions, telling the LayoutStack that it will need to refresh its Layout. Call this function whenever a custom LayoutObject's dimensions change.
LayoutObject.addSecondaryLayoutCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds an optional callback that occurs after this LayoutObject's layout is refreshed. This callback can be used to perform further actions that use the new layout after it is updated. It should be noted that this callback will not affect the width or height of this LayoutObject, it is only meant to be used for 'additonal styling' of the layout object using the updated layout.
LayoutObject.addSecondaryLayoutCallback parameter: callbackOwner
[type: object]
The object owning the callback function that occurs after this LayoutObject's layout is refreshed
LayoutObject.addSecondaryLayoutCallback parameter: callbackName
[type: string]
The name of the callback function that occurs after this LayoutObject's layout is refreshed
LayoutObject.addSecondaryLayoutCallback parameter: callbackArgs
[type: Array, any] [optional]
Args for the callback function that is triggered after this LayoutObject's layout is refreshed
LayoutObject.removeSecondaryLayoutCallback(callbackOwner, callbackName)
[type: function]
Removes the given secondaryLayout callback.
LayoutObject.removeSecondaryLayoutCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
LayoutObject.removeSecondaryLayoutCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
----------------------------------------------------------
Section 64: LayoutStack
----------------------------------------------------------
LayoutStack
[type: class] [extends: SceneObject] [requires: license - gui, module - gui]
Specialized SceneObject that organizes visual content (TextBoxes, Graphics, Buttons, etc...) into dynamic vertical or horizontal stacks. LayoutStacks automatically adjust their layout based on their elements. For example if a TextBox element gets larger, the other elements are shifted so that the TextBox doesn't overlap its neighboring elements. LayoutStacks manage this choreography using the "LayoutObject" member of each of its elements, which can be configured by calling SceneObject.configureLayoutObject. LayoutStacks are also automatically configured as LayoutObjects, so they can also be added to LayoutStacks for nesting.
LayoutStack.isVertical
[type: boolean] [default: true]
Flag that determines if this LayoutStack is a vertical stack organized from top to bottom or a horizontal stack organzied from left to right.
LayoutStack.pivotPoint
[type: Vector2] [default: new Vector2(-.5,.5)]
The pivot point for the LayoutStack, with [0,0] meaning center pivot, and [.5,.5] meaning right-top pivot. LayoutStacks are center-based by default like to most GraphicObjects. It should be noted that pivotPoint and justification seperate concepts and do not affect eachother. Justification affects the alignment of the content within the bounds of the LayoutStack, and pivotPoint affects where the 'origin' of the LayoutStack is relative to those bounds.
LayoutStack.elementSpacer
[type: number] [default: 0]
Number corresponding to the amount of space between each element in the LayoutStack. For LayoutStacks with standardUiZoomFunctionality enabled, this these spaces will be scaled by nc.uiZoom.totalZoom.
LayoutStack.minWidth
[type: number] [default: 0]
Optional minimum width for this LayoutStack.
LayoutStack.minHeight
[type: number] [default: 0]
Optional minimum height for this LayoutStack.
LayoutStack.displayBorder
[type: boolean] [default: false]
Boolean determining if a border (consisting of a UiOutline) is displayed. The border automatically changes shape based on the layoutObject.width and layoutObject.height properties. It should be noted that the associated LayoutStack.border member will be undefined until this flag is set to true.
LayoutStack.border
[type: UiOutline] [default: undefined]
UiOutline that (when displayed) automatically adjusts to the layoutObject.width and layoutObject.height properties of this LayoutStack. It should be noted that this property is undefined unless LayoutStack.displayBorder is set to true.
LayoutStack.displayBackgroundPanel
[type: boolean] [default: false]
Boolean determining if a background panel (consisting of a UiPanel) is displayed. The panel automatically changes shape based on the layoutObject.width and layoutObject.height properties. It should be noted that the associated LayoutStack.backgroundPanel member will be undefined until this flag is set to true.
LayoutStack.backgroundPanel
[type: UiPanel] [default: undefined]
UiPanel that (when displayed) automatically adjusts to the layoutObject.width and layoutObject.height properties of this LayoutStack. It should be noted that this property is undefined unless LayoutStack.displayBackgroundPanel is set to true.
LayoutStack.addElements(elements, index)
[type: function]
Adds the specified SceneObject(s) as elements to the LayoutStack. Please note that SceneObjects added to LayoutStacks are re-assigned to be children of that LayoutStack. If an added SceneObject has not yet been configured with LayoutObject functionality, the standard LayoutObject configuration will be applied. The LayoutObject configuration of any SceneObject can be customized by calling 'SceneObject.configureLayoutObject' before adding it to a LayoutStack. The LayoutObject configuration is a means by which a LayoutStack can determine the layout dimensions of its elements, inform the elements to refresh their layouts, and be informed by elements to update its layout due to a change in dimensions of the elements.
LayoutStack.addElements parameter: elements
[type: SceneObject, [SceneObject]]
The SceneObject(s) to add as elements to the LayoutStack.
LayoutStack.addElements parameter: index
[type: number] [default: (pushed to end)] [optional]
Optional index enabling inserting elements in locations other than at the end of the elements list.
LayoutStack.addSpacerElement(spacerWidth, spacerHeight, index)
[type: function]
Adds a blank element as a spacer between other elements. For LayoutStacks with standardUiZoomFunctionality enabled, this these spacers will be scaled by nc.uiZoom.totalZoom.
LayoutStack.addSpacerElement parameter: spacerWidth
[type: number]
The width (in world units) of the spacer to add.
LayoutStack.addSpacerElement parameter: spacerHeight
[type: number]
The height (in world units) of the spacer to add.
LayoutStack.addSpacerElement parameter: index
[type: number] [default: (pushed to end)] [optional]
Optional index enabling inserting spacers in locations other than at the end of the elements list.
LayoutStack.removeElementAt(index, dispose)
[type: function]
Removes the element at the given index.
LayoutStack.removeElementAt parameter: index
[type: number]
The index of the element to remove.
LayoutStack.removeElementAt parameter: dispose
[type: boolean] [default: true] [optional]
Boolean determining of the item is disposed.
LayoutStack.getElements()
[type: function] [returns: [SceneObject]]
Returns a shallow copy of the current array of elements.
LayoutStack.removeElement(element, dispose)
[type: function]
Removes the given element from the LayoutStack.
LayoutStack.removeElement parameter: element
[type: object]
The element to remove.
LayoutStack.removeElement parameter: dispose
[type: boolean] [default: true] [optional]
Boolean determining if the item is disposed.
LayoutStack.clear(dispose)
[type: function]
Clears all of the elements from the LayoutStack
LayoutStack.clear parameter: dispose
[type: boolean] [default: true] [optional]
Boolean determining if cleared elements are also disposed.
LayoutStack.justifyAll(justification)
[type: function]
Applies the given justification to all of the LayoutStack's elements. Calling this method also sets an internal default, so that when new SceneObjects that have never been configured as LayoutObjects are added as elements, the given justification will be applied.
LayoutStack.justifyAll parameter: justification
[type: string]
The justification to apply to all of the LayoutStack's elements. For a list of justifications see 'nc.constants.justifications'.
----------------------------------------------------------
Section 65: LazyUpdater
----------------------------------------------------------
LazyUpdater
[type: class]
Object that manages the calling of a given callback, ensuring that it is only called when necessary. This is often used to ensure that calls to methods that are performance-expensive are as limited as possible. First connect the performance-heavy task via the constructor callback parameters, then later call the 'updateIfNeeded' method; if the 'needsUpdate' flag has been set to true since the last 'updateIfNeeded' call, then callback will occur, otherwise it is skipped. An example of how you can use this is in situation where you are doing manual rendering; you only want to render once per ScreenUpdate, and you don't want to render if nothing substantive has changed in the scene. In this case, you would set the 'needsUpdate' flag to true every time something in the scene is adjusted, and ensure that a call to 'updateIfNeeded' is placed in a ScreenUpdater-driven function.
LazyUpdater.type
[type: string]
Type identifier.
LazyUpdater.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
LazyUpdater.needsUpdate
[type: boolean] [default: false]
Flag indicating whether the target method is in need of an update.
LazyUpdater.updateIfNeeded()
[type: function]
Calls the target method if the 'needsUpdate' flag is true, and sets it to false either way.
----------------------------------------------------------
Section 66: MaterialMaster
----------------------------------------------------------
MaterialMaster
[type: class] [NON-INSTANTIABLE]
The MaterialMaster is a convenience-based object that represents all of the Materials on a given GraphicObject. To manipulate all of the Materials on a GraphicObject at the same time, you can simply manipulate its MaterialMaster. It should be noted that querying values from the MaterialMaster can be misleading, as the returned values only refer to the last values set on the MaterialMaster itself, and would not reflect individual changes made to the Materials themselves.
MaterialMaster.type
[type: string]
Type identifier.
MaterialMaster.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
MaterialMaster.blending
[type: string]
Sets the 'blending' value for all of this GraphicObject's Materials.
MaterialMaster.auxShaderSegment_vertexSupport
[type: string]
Sets the 'auxShaderSegment_vertexSupport' value for all of this GraphicObject's Materials.
MaterialMaster.shaderSegment_matrixMath
[type: string]
Sets the 'shaderSegment_matrixMath' value for all of this GraphicObject's Materials.
MaterialMaster.auxShaderSegment_postMatrixMath
[type: string]
Sets the 'auxShaderSegment_postMatrixMath' value for all of this GraphicObject's Materials.
MaterialMaster.fillColor
[type: Color]
The EffectController for the 'FillColor' EffectNode, which entirely fills the associated Geometry with the red, green, blue, and alpha color values provided. While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
MaterialMaster.mainTexture
[type: Texture]
The EffectController for the 'SampleMainTexture' EffectNode that tells it which Texture to render.
MaterialMaster.colorMultiply
[type: Color]
The EffectController for the 'ColorMultiply' EffectNode, which multiplies the red, green, blue, and alpha color values of the Material it is applied to. While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
MaterialMaster.shapify
[type: shapify]
The EffectController for the 'Shapify' EffectNode. The Shapify EffectNode converts edge data stored in a 'shapified' Texture into a presentable image with edges that stay sharp regardless of the scale of the associated GraphicObject. This is an instance of the dynamically defined EffectController 'shapify' (base type: 'Vector2'). To get a new instance, use "nc.effectControllers['shapify'].new()". While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
MaterialMaster.shear
[type: shear]
EffectController for the Shear EffectNode, which distorts the shape to appear slanted or skewed. This is an instance of the dynamically defined EffectController 'shear' (base type: 'Vector3'). To get a new instance, use "nc.effectControllers['shear'].new()". While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
MaterialMaster.shear_center
[type: Vector2]
EffectController for the Shear EffectNode, which distorts the shape to appear slanted or skewed. While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
MaterialMaster.setEffectNodes(effectNodes)
[type: function]
Sets the EffectNodes for all of this GraphicObject's Materials.
MaterialMaster.setEffectNodes parameter: effectNodes
[type: [EffectNode], EffectNode]
The new list of EffectNodes that will apply to all of this GraphicObject's Materials.
MaterialMaster.addEffectNodes(effectNodes)
[type: function]
Adds EffectNodes to all of this GraphicObject's Materials.
MaterialMaster.addEffectNodes parameter: effectNodes
[type: [EffectNode], EffectNode]
The EffectNodes that will be added to all of this GraphicObject's Materials.
----------------------------------------------------------
Section 67: Material
----------------------------------------------------------
Material
[type: class]
Materials are objects that control how the visual 'surfaces' defined in a Geometry are configured and ultimately rendered by WebGL. This visual configuration is managed through the EffectNodes and EffectControllers on each Material.
Material.type
[type: string]
Type identifier.
Material.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
Material.blending
[type: string] [default: nc.constants.blendingModes.standard]
String determining the blending mode that is applied to this Material. For a list of available blending options, see nc.constants.blendingModes.
Material.auxShaderSegment_vertexSupport
[type: string] [default: ""]
An auxiliary shader support string that enables for the insertion of GLSL shader code before the vertex shader main. This can be used to add custom functionality to this Material's vertex shader beyond the built-in EffectNode functionality.
Material.shaderSegment_matrixMath
[type: string] [default: "gl_Position=projectionMatrix*(modelViewMatrix*vec4(vertex,1.0));"]
A shader segment string, determining the GLSL code used in the 'matrix math' segment at the end of the vertex shader. This can be used to customize the vertex shader matrix math.
Material.auxShaderSegment_postMatrixMath
[type: string] [default: ""]
An auxiliary shader support string that enables for the insertion of GLSL shader code after the 'matrix math' segment of the vertex shader. This can be used to add custom functionality to this Material's vertex shader beyond the standard built-in functionality.
Material.effectNodesLedger
[type: [string]]
A list of the names of this Material's EffectNodes for quick-reference while debugging or inspecting. To access and manipulate the actual EffectNodes, use Material.getEffectNodes, Material.setEffectNodes, or Material.addEffectNodes.
Material.compiledVertexShader
[type: string]
The the compiled GLSL vertex shader string for this Material, resulting from combining this Material's EffectNodes. This property is generally only meant for troubleshooting, and is read-only.
Material.compiledFragmentShader
[type: string]
The the compiled GLSL fragment shader string for this Material, resulting from combining this Material's EffectNodes. This property is generally only meant for troubleshooting, and is read-only.
Material.fillColor
[type: Color]
The EffectController for the 'FillColor' EffectNode, which entirely fills the associated Geometry with the red, green, blue, and alpha color values provided. While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
Material.mainTexture
[type: Texture]
The EffectController for the 'SampleMainTexture' EffectNode that tells it which Texture to render.
Material.colorMultiply
[type: Color]
The EffectController for the 'ColorMultiply' EffectNode, which multiplies the red, green, blue, and alpha color values of the Material it is applied to. While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
Material.shapify
[type: shapify]
The EffectController for the 'Shapify' EffectNode. The Shapify EffectNode converts edge data stored in a 'shapified' Texture into a presentable image with edges that stay sharp regardless of the scale of the associated GraphicObject. This is an instance of the dynamically defined EffectController 'shapify' (base type: 'Vector2'). To get a new instance, use "nc.effectControllers['shapify'].new()". While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
Material.shear
[type: shear]
EffectController for the Shear EffectNode, which distorts the shape to appear slanted or skewed. This is an instance of the dynamically defined EffectController 'shear' (base type: 'Vector3'). To get a new instance, use "nc.effectControllers['shear'].new()". While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
Material.shear_center
[type: Vector2]
EffectController for the Shear EffectNode, which distorts the shape to appear slanted or skewed. While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
Material.getEffectNodes()
[type: function] [returns: [EffectNode]]
Returns this Material's current EffectNodes. EffectNodes are GPU-driven visual effects assigned to SceneObjects, GraphicObjects, and ultimately Materials. Each EffectNode can be manipulated dynamically by one or more EffectControllers, which are accessable as direct members of the given SceneObject or Material. When a GraphicObject is set to a particular GraphicAsset, it's Materials adopt the GraphicAsset's EffectNode and EffectController presets by default, but they can be customized at any time.
Material.setEffectNodes(effectNodes)
[type: function]
Sets the EffectNodes for this Material. EffectNodes are GPU-driven visual effects assigned to SceneObjects, GraphicObjects, and ultimately Materials. Each EffectNode can be manipulated dynamically by one or more EffectControllers, which are accessable as direct members of the given SceneObject or Material. When a GraphicObject is set to a particular GraphicAsset, it's Materials adopt the GraphicAsset's EffectNode and EffectController presets by default, but they can be customized at any time.
Material.setEffectNodes parameter: effectNodes
[type: [EffectNode], EffectNode]
The new list of EffectNodes that will apply to this SceneObject and all of its Materials.
Material.addEffectNodes(effectNodes)
[type: function]
Adds the given EffectNodes to this Material. EffectNodes are GPU-driven visual effects assigned to SceneObjects, GraphicObjects, and ultimately Materials. Each EffectNode can be manipulated dynamically by one or more EffectControllers, which are accessable as direct members of the given SceneObject or Material. When a GraphicObject is set to a particular GraphicAsset, it's Materials adopt the GraphicAsset's EffectNode and EffectController presets by default, but they can be customized at any time.
Material.addEffectNodes parameter: effectNodes
[type: [EffectNode], EffectNode]
The EffectNodes to add to this Material.
Material.dispose()
[type: function]
Disposes this Material, and removes internal Incisor® references to it to aid memory management.
----------------------------------------------------------
Section 68: Matrix4
----------------------------------------------------------
Matrix4
[type: class]
A 4x4 Matrix, typically used as a transformation matrix for SceneObjects.
Matrix4.elements
[type: [number]]
The 16 elements of the 4x4 matrix, stored in column major order. Defaults to the identity matrix.
Matrix4.copy(matrix)
[type: function]
Sets all of this Matrix4's element values to the element values of the givem Matrix4.
Matrix4.copy parameter: matrix
[type: Matrix4]
The matrix to copy element values from.
Matrix4.set(element00, element01, element02, element03, element10, element11, element12, element13, element20, element21, element22, element23, element30, element31, element32, element33)
[type: function]
Sets this Matrix4's elements to the provided values.
Matrix4.set parameter: element00
[type: number]
Element at column 0, row 0.
Matrix4.set parameter: element01
[type: number]
Element at column 0, row 1.
Matrix4.set parameter: element02
[type: number]
Element at column 0, row 2.
Matrix4.set parameter: element03
[type: number]
Element at column 0, row 3.
Matrix4.set parameter: element10
[type: number]
Element at column 1, row 0.
Matrix4.set parameter: element11
[type: number]
Element at column 1, row 1.
Matrix4.set parameter: element12
[type: number]
Element at column 1, row 2.
Matrix4.set parameter: element13
[type: number]
Element at column 1, row 3.
Matrix4.set parameter: element20
[type: number]
Element at column 2, row 0.
Matrix4.set parameter: element21
[type: number]
Element at column 2, row 1.
Matrix4.set parameter: element22
[type: number]
Element at column 2, row 2.
Matrix4.set parameter: element23
[type: number]
Element at column 2, row 3.
Matrix4.set parameter: element30
[type: number]
Element at column 3, row 0.
Matrix4.set parameter: element31
[type: number]
Element at column 3, row 1.
Matrix4.set parameter: element32
[type: number]
Element at column 3, row 2.
Matrix4.set parameter: element33
[type: number]
Element at column 3, row 3.
Matrix4.clone()
[type: function] [returns: Matrix4]
Returns a new Matrix4 with the same elements as this Matrix4.
Matrix4.getInverse(matrix)
[type: function]
Sets this Matrix4 to the inverse of the givem Matrix4. If the Matrix can not be inverted, all elements will be set to 0.
Matrix4.getInverse parameter: matrix
[type: Matrix4]
The matrix to invert.
Matrix4.multiply(matrix)
[type: function]
Postmultiplies this Matrix4 by the provided Matrix4.
Matrix4.multiply parameter: matrix
[type: Matrix4]
The matrix by which this Matrix4 is multiplied.
Matrix4.premultiply(matrix)
[type: function]
Premultiplies this Matrix4 by the provided Matrix4.
Matrix4.premultiply parameter: matrix
[type: Matrix4]
The matrix by which this Matrix4 is premultiplied.
Matrix4.multiplyMatrices(matrixA, matrixB)
[type: function]
Sets this Matrix4 to the result of multiplying the provided Matrix4 parameters.
Matrix4.multiplyMatrices parameter: matrixA
[type: Matrix4]
The first of the multiplied matrices.
Matrix4.multiplyMatrices parameter: matrixB
[type: Matrix4]
The second of the multiplied matrices.
Matrix4.toArray(array, offset)
[type: function] [returns: [number]]
Copies the numbers in the 'elements' array into the provided Array.
Matrix4.toArray parameter: array
[type: [number]] [default: [] [optional]
The Array to copy the elements into.]
Matrix4.toArray parameter: offset
[type: number] [default: 0] [optional]
The index in 'array' at which to place the first element.
Matrix4.identity()
[type: function]
Sets this Matrix4 to the identity matrix.
Matrix4.compose(position, rotation, scale)
[type: function]
Sets this Matrix4 to a transformation matrix representing the provided position, rotation, and scale.
Matrix4.compose parameter: position
[type: Vector3]
The position represented by the transformation matrix.
Matrix4.compose parameter: rotation
[type: Vector3]
The rotation represented by the transformation matrix.
Matrix4.compose parameter: scale
[type: Vector3]
The scale represented by the transformation matrix.
Matrix4.decompose(position, rotation, scale, forceRotation, forceScale)
[type: function]
Extracts the position, rotation and scale represented by this Matrix4. Note that it is not always possible to correctly decompose a Matrix4 into these components, such as when the Matrix4 contains skewing/shearing. Also note that multiple valid decompositions of a Matrix4 are possible. For example, a rotation of 180 degrees around the Z axis creates the same Matrix4 as a scale of -1 on the X and Y axes. To address this, the forceRotation and forceScale parameters can be used to indicate that the resulting rotation or scale are already known, and are already contained in the rotation or scale parameters.
Matrix4.decompose parameter: position
[type: Vector3]
The resulting position.
Matrix4.decompose parameter: rotation
[type: Vector3]
The resulting rotation. If 'forceRotation' is true, this value is used as input to improve the extraction of scale.
Matrix4.decompose parameter: scale
[type: Vector3]
The resulting scale. If 'forceScale' is true, this value is used as input to improve the extraction of rotation.
Matrix4.decompose parameter: forceRotation
[type: boolean] [default: false] [optional]
Determines whether the value in 'rotation' is already set to the known rotation to improve the extraction of scale.
Matrix4.decompose parameter: forceScale
[type: boolean] [default: false] [optional]
Determines whether the value in 'scale' is already set to the known scale to improve the extraction of rotation.
Matrix4.determinant()
[type: function] [returns: number]
Returns the determinant of this Matrix4. If this is 0, this Matrix4 can not be inverted.
Matrix4.applyToVector3(vector)
[type: function]
Applies this Matrix4's transformation to the provided Vector3.
Matrix4.applyToVector3 parameter: vector
[type: Vector3]
The Vector3 to be transformed by this Matrix4. This vector is modified in place.
----------------------------------------------------------
Section 69: Matrix4Array
----------------------------------------------------------
Matrix4Array
[type: class]
An internal specialized type used for Spine Animation EffectControllers.
----------------------------------------------------------
Section 70: Motion
----------------------------------------------------------
Motion
[type: class] [NON-INSTANTIABLE]
Object controlling a 'motion' (continuous change) on a given numeric property or properties (using fixedUpdate). An object of this type is returned from all 'addMotion' calls, providing a means to manage the given motion process.
Motion.type
[type: string]
Type identifier.
Motion.name
[type: string]
Name of the Motion.
Motion.numProperties
[type: number]
The number of properties being affected by this Motion.
Motion.influence
[type: number] [default: 1]
Number determining the influence of this Motion over the associated numeric properties where a value of 0 corresponds to the property remaining at its baseValue with no change, and a value of 1 corresponds to the value of the property being entirely determined by the Motion.
Motion.motionSpeed
[type: number] [default: 1]
Number informing the Motion's rate of increase on its 'progress' value, affecting the overall speed of the motion experienced by the associated properties.
Motion.progress
[type: number] [default: 0]
The number driving the motionFunction for this motion. In a defined motion over time, this number is equivalent to time. This value is not meant to be manipulated as it is automatically changed over time via the internal fixedUpdate used by this Motion.
Motion.motionType
[type: MotionType] [default: nc.motionTypes.Pendulum]
The MotionType for this Motion. A MotionType defines a method of continuous change for a given set of numeric properties within a set of bounds over time. The default MotionType is 'Pendulum', which defines a smooth sinusoidal oscillation between the lower and upper bounds. MotionTypes can define any set of continuous motions for a set of numeric properties.
Motion.baseValues
[type: [number]]
Array containing the base values for this Motion. These are the values that the properties being manipulated will return to if the 'influence' of this Motion is set to 0. Upon initiating a Motion for a given set numeric properties, their current values are stored in this array and used as 'home base' values and blended with the defined motion according to 'influence'.
Motion.currentValues
[type: [number]]
Array containing the current values for this Motion. These are the values that the MotionType motion function manipulate based its 'progress' property to create the desired movement.
Motion.controllers
[type: MotionControllers]
Dictionary of dictionaries (per MotionType) of values that can be used to control this motion dynamically.
Motion.lowerBounds
[type: [number]]
Array containing the lower bound or bounds for the Motion. The length of this array depends on this Motion's 'numProperties'. While MotionType definitions are not all required to adhere to bounds, it is a common practice for MotionTypes result in property motion that is confined to these bounds.
Motion.upperBounds
[type: [number]]
Array containing the upper bound or bounds for the Motion. The length of this array depends on this Motion's 'numProperties'. While MotionType definitions are not all required to adhere to bounds, it is a common practice for MotionTypes result in property motion that is confined to these bounds.
Motion.workspace
[type: object]
An un-specified JS object of 'any' type to enable the user to stash persistant elements of their Motion within the motionFunction.
Motion.updaterCallbackOwner
[type: object] [default: undefined]
The object owning the optional callback function invoked continuously (every fixedUpdate) during the motion process. This callback is only performed while the influence value is larger than 0.
Motion.updaterCallbackName
[type: string] [default: undefined]
The name of the optional callback function invoked continuously (every fixedUpdate) during the motion process. This callback is only performed while the influence value is larger than 0.
Motion.pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity]
The PauseEvent or Array of PauseEvents that this Motion will be immune to. Set this parameter to [] for this Motion to have no pause immunity.
Motion.speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl]
The SpeedControl or Array of SpeedControls that this Motion is affected by.
Motion.swoopInfluence(endValue, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Swooper]
Swoops (interpolates) the Motion's influence from its current value to the given end value over the duration.
Motion.swoopInfluence parameter: endValue
[type: number]
The ending value for the numeric property being swooped.
Motion.swoopInfluence parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation.
Motion.swoopInfluence parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
Motion.swoopInfluence parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
Motion.swoopInfluence parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
Motion.swoopInfluence parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
Motion.swoopInfluence parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
Motion.swoopInfluence parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
Motion.swoopInfluence parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the swooping process.
Motion.swoopInfluence parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the swooping process.
----------------------------------------------------------
Section 71: MotionControllers
----------------------------------------------------------
MotionControllers
[type: class] [NON-INSTANTIABLE]
Dictionary of all registered MotionControllers.
----------------------------------------------------------
Section 72: MotionType
----------------------------------------------------------
MotionType
[type: class] [NON-INSTANTIABLE]
Object defining a particular type of motion that can be added to any property or group of properties via 'nc.addMotion' or 'Vector.addMotion'.
MotionType.type
[type: string]
Type identifier.
MotionType.name
[type: string]
Name of the Motion.
MotionType.motionFunction()
[type: function]
A reference to the function that defines the nature of the motion.
MotionType.motionControllerNames
[type: [string]]
A list of optional motion controllers. These can be used to dynamically affect the nature of the motion.
MotionType.motionControllerDefaultValues
[type: [number]]
A list of optional motion controller default values.
MotionType.description
[type: string]
The description of the MotionType - this will appear in the autocomplete documentation.
MotionType.controllerDescriptions
[type: [string]]
The description of the MotionType controllers - these descriptions will appear in the autocomplete documentation.
----------------------------------------------------------
Section 73: ParticleSystemDefinition
----------------------------------------------------------
ParticleSystemDefinition
[type: class] [NON-INSTANTIABLE] [requires: module - particleSystems]
A ParticleSystemDefinition defines the parameters of a ParticleSystem. To decrease the memory needed and time required to instantiate multiple ParticleSystems that use the same parameters, a single definition is created that one or more ParticleSystems then reference.
ParticleSystemDefinition.type
[type: string]
Type identifier.
ParticleSystemDefinition.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
ParticleSystemDefinition.emissionDuration
[type: number]
The length of time over which to emit particles. Set to 0 to emit particles forever. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.particleLifetime
[type: number]
The amount of time after its emission that each particle dies. Must not be a negative number. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.particleLifetimeRandomness
[type: number]
A per particle perturbation of particleLifetime. Each particle chooses a random amount, limited to ± this value, to add to the base value. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.emissionTimeRandomness
[type: number]
A per particle perturbation of that particle's emission time. By default, particles are emitted at evenly spaced intervals. A random number between 0 and this value will added to the default emission time of each particle. Must not be a negative number. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.alpha
[type: number, string, ParticleSystemRamp1]
The alpha (transparency) to apply to each particle. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.alphaRandomness
[type: number, string, ParticleSystemRamp1]
A per particle perturbation of 'alpha'. Each particle chooses a random amount, limited to ± this value, to modify the alpha. For example, if the value is .2, each particle generates a random number in the range [.8 - 1.2] to multiply with 'alpha' and generate its own unique version of 'alpha'. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.color
[type: Vector3, string, ParticleSystemRamp3]
The color to apply to each particle. This may be set to a Vector3 to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp3 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.brightnessRandomness
[type: number, string, ParticleSystemRamp3]
A per particle perturbation of 'color'. Each particle chooses a random amount, limited to ± this value, to modify the color. For example, if the value is .2, each particle generates a random number in the range [.8 - 1.2] to multiply with 'color' and generate its own unique version of 'color'. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp3 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.particleHueShift
[type: number, string, ParticleSystemRamp1]
The amount to hue shift each particle. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.particleparticleHueShiftRandomness
[type: number, string, ParticleSystemRamp1]
A per particle perturbation of 'particleHueShift'. Each particle chooses a random amount, limited to ± this value, to add to the base value. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.emitterShape
[type: string]
The shape of the area in which a particle may be created. See nc.constants.particleSystemEmitterShapes for valid values. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.customEmitterShapeExpression
[type: string]
If emitterShape is set to nc.constants.particleSystemEmitterShapes.Custom, this expression will be used to choose a position for each emitted particle. Note that precomputed random numbers are available as vec4s named rand0 through rand5, though typically rand2.x and rand2.y are used in this context. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.emitterShapeDimensions
[type: Vector2, string, ParticleSystemRamp2]
The dimensions of the emitter shape. Use different values for X and Y to create oblong shapes. This may be set to a Vector2 to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp2 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.emissionVelocity
[type: Vector2, string, ParticleSystemRamp2]
The velocity with which particles are emitted away from their initial position. The magnitude of this vector indicates the initial speed of the particles. Note that 'emissionConeAngle' causes particles to emit in a cone centered around this direction. This may be set to a Vector2 to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp2 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.emissionVelocityRandomness
[type: number, string, ParticleSystemRamp1]
A per particle perturbation of the magnitude of 'emissionVelocity'. Each particle chooses a random amount, limited to ± this value, to modify the magnitude of 'emissionVelocity'. For example, if the value is .2, each particle generates a random number in the range [.8 - 1.2] to multiply with 'emissionVelocity' and generate its own unique version of 'emissionVelocity'. Thus, particles are emitted with varying velocities. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.emissionConeAngle
[type: number, string, ParticleSystemRamp1]
A per particle perturbation of the angle of 'emissionVelocity'. Each particle chooses a random amount, limited to ± half of this value in degrees, to modify the angle of 'emissionVelocity'. For example, if the value is 90 degrees, each particle will generate a unique version of 'emissionVelocity' randomly placed within ±45 degrees of 'emissionVelocity'. Thus, particles are emitted in a 90 degree cone. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.emitterPosition
[type: Vector2, string, ParticleSystemRamp2]
The position with respect to the ParticleSystem's origin from which to emit particles. Note that when moving the ParticleSystem SceneObject itself, particles previoiusly emitted are also moved, which can look unnatural. By expressiong the emitter position as an expression or ParticleSystemRamp2, the ParticleSystem is able to maintain the trajectories of previously emitted particles while the emitter moves. This may be set to a Vector2 to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp2 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.force
[type: Vector2, string, ParticleSystemRamp2]
The force constantly applied to each particle. Commonly used to simulate gravity. This may be set to a Vector2 to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp2 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.forceRandomness
[type: number, string, ParticleSystemRamp2]
A per particle perturbation of 'force'. Each particle chooses a random amount, limited to ± this value, to modify the force. For example, if the value is .2, each particle generates a random number in the range [.8 - 1.2] to multiply with 'force' and generate its own unique version of 'force'. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp2 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.extraVelocityX
[type: number, string, ParticleSystemRamp1]
An extra amount always added to the X component of each particle's velocity. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.extraVelocityXRandomness
[type: number, string, ParticleSystemRamp1]
A per particle perturbation of 'extraVelocityX'. Each particle chooses a random amount, limited to ± this value, to add to the base value. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization. Second line
ParticleSystemDefinition.extraVelocityY
[type: number, string, ParticleSystemRamp1]
An extra amount always added to the Y component of each particle's velocity. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.extraVelocityYRandomness
[type: number, string, ParticleSystemRamp1]
A per particle perturbation of 'extraVelocityY'. Each particle chooses a random amount, limited to ± this value, to add to the base value. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.motionStretch
[type: number, string, ParticleSystemRamp1]
The amount by which to stretch each particle in the direction in which is is moving. Particles that are moving faster stretch further. This is typically used as a high performance approximation of motion blur. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.motionStretchAlphaInfluence
[type: number, string, ParticleSystemRamp1]
The amount by which a particle's stretch, as caused by 'motionStretch', reduces its alpha. This is typically used as a high performance approximation of motion blur. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.ageRemap
[type: string]
An expression used to remap particle age values to a new value. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.rotationSpeed
[type: number, string, ParticleSystemRamp1]
The speed at which each particle rotates, in degrees per second. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.rotationSpeedRandomness
[type: number, string, ParticleSystemRamp1]
A per particle perturbation of 'rotationSpeed'. Each particle chooses a random amount, limited to ± this value, to add to the base value. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.initialRotation
[type: number, string, ParticleSystemRamp1]
The rotation in degrees of each particle when it is emitted. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.initialRotationRandomness
[type: number, string, ParticleSystemRamp1]
A per particle perturbation of 'initialRotation'. Each particle chooses a random amount, limited to ± this value, to add to the base value. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.rotationSwayStrength
[type: number, string, ParticleSystemRamp1]
The maximum rotation, in degrees, that a particle will reach by oscillating its rotation. Note that this is additively combined with the result of 'rotationSpeed'. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.rotationSwayStrengthRandomness
[type: number, string, ParticleSystemRamp1]
A per particle perturbation of 'rotationSwayStrength'. Each particle chooses a random amount, limited to ± this value, to add to the base value. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.rotationSwaySpeed
[type: number, string, ParticleSystemRamp1]
The speed at which to oscillate, in cycles/second, if rotationSwayStrength is not 0. Note that this is additively combined with the result of 'rotationSpeed'. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.rotationSwaySpeedRandomness
[type: number, string, ParticleSystemRamp1]
A per particle perturbation of 'rotationSwaySpeed'. Each particle chooses a random amount, limited to ± this value, to add to the base value. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.rotationSwayPhase
[type: number, string, ParticleSystemRamp1]
A phase shift to the oscillation, if rotationSwayStrength is not 0. Effectively skips to a different point in the oscillation pattern. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.rotationSwayPhaseRandomness
[type: number, string, ParticleSystemRamp1]
A per particle perturbation of 'rotationSwayPhase'. Each particle chooses a random amount, limited to ± this value, to add to the base value. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.wiggleStrengthX
[type: number, string, ParticleSystemRamp1]
The distance to wiggle the particle in the X direction around the point where it would otherwise be. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.wiggleStrengthXRandomness
[type: number, string, ParticleSystemRamp1]
A per particle perturbation of 'wiggleStrengthX'. Each particle chooses a random amount, limited to ± this value, to add to the base value. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.wiggleStrengthY
[type: number, string, ParticleSystemRamp1]
The distance to wiggle the particle in the Y direction around the point where it would otherwise be. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.wiggleStrengthYRandomness
[type: number, string, ParticleSystemRamp1]
A per particle perturbation of 'wiggleStrengthY'. Each particle chooses a random amount, limited to ± this value, to add to the base value. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.wiggleSpeedX
[type: number, string, ParticleSystemRamp1]
The speed at which to wiggle the particle in the X direction around the point where it would otherwise be. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.wiggleSpeedXRandomness
[type: number, string, ParticleSystemRamp1]
A per particle perturbation of 'wiggleSpeedX'. Each particle chooses a random amount, limited to ± this value, to add to the base value. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.wiggleSpeedY
[type: number, string, ParticleSystemRamp1]
The speed at which to wiggle the particle in the Y direction around the point where it would otherwise be. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.wiggleSpeedYRandomness
[type: number, string, ParticleSystemRamp1]
A per particle perturbation of 'wiggleSpeedY'. Each particle chooses a random amount, limited to ± this value, to add to the base value. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.wiggleCircularStrength
[type: number, string, ParticleSystemRamp1]
Used to constrain wiggling particles to a circle shape. At a 'wiggleCircularStrength' of 0, a particle wiggling eqully on X and Y is allowed to move within the bounds of a square. At a 'wiggleCircularStrength' of 1, a particle wiggling eqully on X and Y is only allowed to move within the bounds of a circle. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.particleScale
[type: Vector2, string, ParticleSystemRamp2]
The scale to apply to each particle. This may be set to a Vector2 to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp2 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.particleScaleRandomness
[type: number, string, ParticleSystemRamp1]
A per particle perturbation of the magnitude of 'particleScale'. Each particle chooses a random amount, limited to ± this value, to modify the magnitude of 'particleScale'. For example, if the value is .2, each particle generates a random number in the range [.8 - 1.2] to multiply with 'particleScale' and generate its own unique version of 'particleScale'. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.randomnessDistribution
[type: number, string, ParticleSystemRamp1]
The amount to bias all random numbers toward the center of their range. Typically ranges from 0 (no bias) to 1 (random numbers from -1 to 1 are squared, pulling them toward 0). However, values outside this range may be used for varying effects. This may be set to a number to apply a constant value, a string to apply a GLSL expression, or a ParticleSystemRamp1 to apply a value that changes based on a particle's age or time of emission. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleSystemDefinition.randomizeOnPlay
[type: boolean]
This is the default value of randomizeOnPlay for any ParticleSystem instantiated using this ParticleSystemDefinition. Note that the value of randomizeOnPlay for each ParticleSystem instance can then be changed independently. When true, the ParticleSystem will automatically call randomize() each time it is restarted, including when playback loops.
ParticleSystemDefinition.particlePoolCount
[type: number]
The total number of particles that are required by this ParticleSystemDefinition. Because particles that have 'died' can often be reused as later particles, this number will often be less than the total number seen throughout the ParticleSystem's playback.
ParticleSystemDefinition.effectNodeName
[type: string]
The name of the EffectNode automatically created by this ParticleSystemDefinition. Useful when altering the EffectNodes of a ParticleSystem, because without this EffectNode applied, the ParticleSystem behavior will be lost.
ParticleSystemDefinition.particleDrawOrderSeed
[type: number]
When 'graphicAssets' contains multiple GraphicAssets, the draw order of all the particles is shuffled to randomly interleave the particles. This seed will deterministically alter the outcome of this shuffle, creating a different draw order of the particles. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization. To randomize the behavior of a ParticleSystem without this costly rebuild, see ParticleSystem.randomize().
ParticleSystemDefinition.getParticleInfo()
[type: function] [returns: [ParticleInfo]]
Returns the ParticleInfo objects used to populate the ParticleSystem.
ParticleSystemDefinition.setParticleInfo(particleInfo)
[type: function]
Sets the ParticleInfo objects used to populate the ParticleSystem.
ParticleSystemDefinition.setParticleInfo parameter: particleInfo
[type: [ParticleInfo], ParticleInfo]
Array of ParticleInfo objects used to populate the ParticleSystem.
----------------------------------------------------------
Section 74: ParticleSystem
----------------------------------------------------------
ParticleSystem
[type: class] [extends: GraphicObject] [requires: module - particleSystems]
A ParticleSystem uses the Geometry and EffectNode create by a ParticleSystemDefinition to manage the behavior of many particles contained within a single SceneObject. To reduce the number of SceneObjects, all particles in a single ParticleSystem are merged into one SceneObject and their behavior is controlled by the EffectNode created by the ParticleSystemDefinition.
ParticleSystem.type
[type: string]
Type identifier.
ParticleSystem.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
ParticleSystem.definition
[type: ParticleSystemDefinition]
Dictionary object listing all of the types this object is compatible with.
ParticleSystem.playbackController
[type: PlaybackController]
The PlaybackController managing the ParticleSystem's playback.
ParticleSystem.randomize()
[type: function]
Randomly picks a new value for the material's particleSystemRandomSeed EffectController, which seeds the random number generation used in the ParticleSystem's EffectNode. The particleSystemRandomSeed EffectController can also be directly set to a desired value. Suggested values are in the range [0, 10].
ParticleSystem.stopEmitting(disableAfterParticlesDie)
[type: function]
Forces the ParticleSystem to stop creating new particles. Previously emitted particles will not be affected and will be allowed to proceed to the end of their life. Commonly used to dynamically decide the duration of a ParticleSystem that is emitting infinitely, but can also stop a ParticleSystem with a known duration early.
ParticleSystem.stopEmitting parameter: disableAfterParticlesDie
[type: boolean]
If true, the ParticleSystem will be automatically disabled at the latest possible time one of the existing particles could die.
----------------------------------------------------------
Section 75: ParticleSystemRamp
----------------------------------------------------------
ParticleSystemRamp
[type: class] [NON-INSTANTIABLE] [requires: module - particleSystems]
ParticleSystemRamp.inputType
[type: string]
The input type used when evaluating. See nc.particleSystemRampInputTypes for valid values.
ParticleSystemRamp.inputMaximum
[type: number]
When using inputType equal to 'EmissionTime', the emission time is divided by this number and the fractional component of the result is used to look up a value in the ramp. This means that particles emitted after this time will use values that wrap around to the beginning of the ramp. When using a non-infinite emissionDuration, it is common to set this value to emissionDuration + emissionTimeRandomness so that the ramp applies over the duration of the particle emission.
ParticleSystemRamp.interpolationType
[type: string]
The type of interpolation to apply between the keyframes. See nc.constants.particleSystemRampInterpolationTypes for valid values.
ParticleSystemRamp.type
[type: string]
Type identifier.
ParticleSystemRamp.refreshKeyframeOrder()
[type: function]
Refreshes the order of the keyframes, ensuring they are stored in order of increasing time.
ParticleSystemRamp.removeKeyframe(x)
[type: function]
Removes the keyframe with the given time value.
ParticleSystemRamp.removeKeyframe parameter: x
[type: number]
The time value of the keyframe to remove. If no such keyframe exists, nothing is removed.
----------------------------------------------------------
Section 76: ParticleSystemRamp1
----------------------------------------------------------
ParticleSystemRamp1
[type: class] [requires: module - particleSystems]
Object representing keyframes with number values used by ParticleSystemDefinition members.
ParticleSystemRamp1.values
[type: Array]
Array of keyframes representing the ramp. Each keyframe is specified as an array with two elements. The first element must be a number representing the time of the keyframe. Ramp evaluations are performed in the range 0-1, but keyframes may specify times outside this range. The second element must be a number.]
ParticleSystemRamp1.addKeyframe(x, y)
[type: function]
Adds a new keyframe. If a keyframe already exists at this time value, it is overwritten.
ParticleSystemRamp1.addKeyframe parameter: x
[type: number]
The time value for this keyframe.
ParticleSystemRamp1.addKeyframe parameter: y
[type: number]
The value stored at this keyframe.
ParticleSystemRamp1.isEqual(particleSystemRamp1)
[type: function] [returns: boolean]
Tests whether another ParticleSystemRamp1 has identical contents to this ParticleSystemRamp1.
ParticleSystemRamp1.isEqual parameter: particleSystemRamp1
[type: ParticleSystemRamp1]
The ParticleSystemRamp1 to compare to.
----------------------------------------------------------
Section 77: ParticleSystemRamp2
----------------------------------------------------------
ParticleSystemRamp2
[type: class] [extends: ParticleSystemRamp] [requires: module - particleSystems]
Object representing keyframes with Vector2 values used by ParticleSystemDefinition members.
ParticleSystemRamp2.values
[type: Array]
Array of keyframes representing the ramp. Each keyframe is specified as an array with two elements. The first element must be a number representing the time of the keyframe. Ramp evaluations are performed in the range 0-1, but keyframes may specify times outside this range. The second element must be a Vector2.]
ParticleSystemRamp2.addKeyframe(x, y)
[type: function]
Adds a new keyframe. If a keyframe already exists at this time value, it is overwritten.
ParticleSystemRamp2.addKeyframe parameter: x
[type: number]
The time value for this keyframe.
ParticleSystemRamp2.addKeyframe parameter: y
[type: Vector2]
The value stored at this keyframe.
ParticleSystemRamp2.isEqual(particleSystemRamp2)
[type: function] [returns: boolean]
Tests whether another ParticleSystemRamp2 has identical contents to this ParticleSystemRamp2.
ParticleSystemRamp2.isEqual parameter: particleSystemRamp2
[type: ParticleSystemRamp2]
The ParticleSystemRamp2 to compare to.
----------------------------------------------------------
Section 78: ParticleSystemRamp3
----------------------------------------------------------
ParticleSystemRamp3
[type: class] [extends: ParticleSystemRamp] [requires: module - particleSystems]
Object representing keyframes with Vector3 values used by ParticleSystemDefinition members.
ParticleSystemRamp3.values
[type: Array]
Array of keyframes representing the ramp. Each keyframe is specified as an array with two elements. The first element must be a number representing the time of the keyframe. Ramp evaluations are performed in the range 0-1, but keyframes may specify times outside this range. The second element must be a Vector3.]
ParticleSystemRamp3.addKeyframe(x, y)
[type: function]
Adds a new keyframe. If a keyframe already exists at this time value, it is overwritten.
ParticleSystemRamp3.addKeyframe parameter: x
[type: number]
The time value for this keyframe.
ParticleSystemRamp3.addKeyframe parameter: y
[type: Vector3]
The value stored at this keyframe.
ParticleSystemRamp3.isEqual(particleSystemRamp3)
[type: function] [returns: boolean]
Tests whether another ParticleSystemRamp3 has identical contents to this ParticleSystemRamp3.
ParticleSystemRamp3.isEqual parameter: particleSystemRamp3
[type: ParticleSystemRamp3]
The ParticleSystemRamp3 to compare to.
----------------------------------------------------------
Section 79: ParticleSystemRamp4
----------------------------------------------------------
ParticleSystemRamp4
[type: class] [extends: ParticleSystemRamp] [requires: module - particleSystems]
Object representing keyframes with Vector4 values used by ParticleSystemDefinition members.
ParticleSystemRamp4.values
[type: Array]
Array of keyframes representing the ramp. Each keyframe is specified as an array with two elements. The first element must be a number representing the time of the keyframe. Ramp evaluations are performed in the range 0-1, but keyframes may specify times outside this range. The second element must be a Vector4.]
ParticleSystemRamp4.addKeyframe(x, y)
[type: function]
Adds a new keyframe. If a keyframe already exists at this time value, it is overwritten.
ParticleSystemRamp4.addKeyframe parameter: x
[type: number]
The time value for this keyframe.
ParticleSystemRamp4.addKeyframe parameter: y
[type: Vector4]
The value stored at this keyframe.
ParticleSystemRamp4.isEqual(particleSystemRamp4)
[type: function] [returns: boolean]
Tests whether another ParticleSystemRamp4 has identical contents to this ParticleSystemRamp4.
ParticleSystemRamp4.isEqual parameter: particleSystemRamp4
[type: ParticleSystemRamp4]
The ParticleSystemRamp4 to compare to.
----------------------------------------------------------
Section 80: ParticleInfo
----------------------------------------------------------
ParticleInfo
[type: class] [requires: module - particleSystems]
Object to allow adding graphics to a ParticleSystem with different emission rates and relative scales.
ParticleInfo.graphicAsset
[type: GraphicAsset]
The GraphicAsset to add for this particle. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleInfo.particlesPerSecond
[type: number]
The number of this particle to add ever second of 'emissionDuration'. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleInfo.scale
[type: number]
The scale to apply to each of these particles. Useful for reusing assets with mismatched scales in the same particle system. Note that changing this value at run time causes a costly rebuild of the particle system and is only recommended during initialization.
ParticleInfo.clone()
[type: function]
Returns a deep copy of this ParticleInfo instance.
----------------------------------------------------------
Section 81: ParticleSystemDefinitions
----------------------------------------------------------
ParticleSystemDefinitions
[type: class] [NON-INSTANTIABLE]
Dictionary of all registered ParticleSystemDefinitions.
----------------------------------------------------------
Section 82: Paths
----------------------------------------------------------
Paths
[type: class] [NON-INSTANTIABLE]
Object housing functionality manipulate paths including 'splitPath', 'getFileName', and 'getParentDirectory'.
Paths.projectPath
[type: string] [requires: unpublished only]
The path to the project directory.
Paths.applicationSupportPath
[type: string] [requires: unpublished only]
The path to the application support directory.
Paths.desktopPath
[type: string] [requires: unpublished only]
The path to the desktop.
Paths.userDirectoryPath
[type: string] [requires: unpublished only]
The path to the current user directory.
Paths.splitPath(path)
[type: function] [returns: [string]]
Returns an array of separated path components. All paths in Incisor® use '\' as a path separator.
Paths.splitPath parameter: path
[type: string]
The path to split.
Paths.getFileName(path)
[type: function] [returns: string]
Returns the name of the last path component of the provided path. All paths in Incisor® use '\' as a path separator.
Paths.getFileName parameter: path
[type: string]
The path to return the last path component of.
Paths.getParentDirectory(path)
[type: function] [returns: string]
Returns the provided path minus the last path component. All paths in Incisor® use '\' as a path separator.
Paths.getParentDirectory parameter: path
[type: string]
The path to return the last path component of.
----------------------------------------------------------
Section 83: Pdf
----------------------------------------------------------
Pdf
[type: class] [requires: unpublished only, license - pdfs]
Object that can be used to define a PDF file, which can then be written to disk.
Pdf.type
[type: string]
Type identifier.
Pdf.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
Pdf.defaultFontSize
[type: number] [default: 40]
The default font size for text within this Pdf.
Pdf.defaultFontName
[type: string] [default: "Noto Sans"]
The default font for text within this Pdf. Please note that any fonts (ttf or otf files) used within Pdfs must reside within the 'Pdf Fonts' directory of the Incisor® application support directory, which can be accessed from the Incisor® menu.
Pdf.defineFont(name, regularFontFileName, boldFontFileName, italicFontFileName, boldItalicFontFileName)
[type: function]
Defines a new font that can be used within this Pdf. Please note that any fonts (ttf or otf files) used within Pdfs must reside within the 'Pdf Fonts' directory of the Incisor® application support directory, which can be accessed from the Incisor® menu.
Pdf.defineFont parameter: name
[type: string]
The name of the newly defined font to be made available to use within this Pdf.
Pdf.defineFont parameter: regularFontFileName
[type: string]
The name of the font file (within the application support 'Pdf Fonts' directory) to be used for regular text.
Pdf.defineFont parameter: boldFontFileName
[type: string] [default: regularFontFileName] [optional]
The name of the font file (within the application support 'Pdf Fonts' directory) to be used for bold text.
Pdf.defineFont parameter: italicFontFileName
[type: string] [default: regularFontFileName] [optional]
The name of the font file (within the application support 'Pdf Fonts' directory) to be used for italic text.
Pdf.defineFont parameter: boldItalicFontFileName
[type: string] [default: regularFontFileName] [optional]
The name of the font file (within the application support 'Pdf Fonts' directory) to be used for bold italic text.
Pdf.addSection()
[type: function] [returns: PdfSection]
Adds a new PdfSection to this Pdf and returns it. A PdfSection is a group of pages with a shared style.
Pdf.writePdf(filePath, isPathRelative)
[type: function]
Writes the Pdf file to the given path.
Pdf.writePdf parameter: filePath
[type: string]
The relative or absolute path for the file to be written.
Pdf.writePdf parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
----------------------------------------------------------
Section 84: PdfSection
----------------------------------------------------------
PdfSection
[type: class] [NON-INSTANTIABLE]
A PdfSection is an object defining a group of pages within a Pdf that all share the same page style. To make a new PdfSection, call 'addSection' on the Pdf you wish to add the section to.
PdfSection.type
[type: string]
Type identifier.
PdfSection.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
PdfSection.pageWidth
[type: number] [default: 2550]
The width of the pages within this PdfSection.
PdfSection.pageHeight
[type: number] [default: 3300]
The height of the pages within this PdfSection.
PdfSection.leftMargin
[type: number] [default: 150]
The size of the left margin of the pages within this PdfSection.
PdfSection.rightMargin
[type: number] [default: 150]
The size of the right margin of the pages within this PdfSection.
PdfSection.topMargin
[type: number] [default: 150]
The size of the top margin of the pages within this PdfSection.
PdfSection.bottomMargin
[type: number] [default: 150]
The size of the bottom margin of the pages within this PdfSection.
PdfSection.backgroundImage
[type: PdfImage] [default: undefined]
The path of the backgroundImage within this PdfSection.
PdfSection.header
[type: PdfHeader]
The header element for this PdfSection.
PdfSection.footer
[type: PdfFooter]
The footer element for this PdfSection.
PdfSection.addParagraph()
[type: function] [returns: PdfParagraph]
Adds a new PdfParagraph to this PdfSection and returns it. A PdfParagraph is simply a block of text.
PdfSection.addBackgroundImage(imagePath, isPathRelative, justificationH, justificationV)
[type: function]
Adds a background image to this PdfSection.
PdfSection.addBackgroundImage parameter: imagePath
[type: string]
The path of the background image being added within this PdfSection.
PdfSection.addBackgroundImage parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
PdfSection.addBackgroundImage parameter: justificationH
[type: string] [default: "center"] [optional]
The horizontal justification of the background image being added to this PdfSection. For acceptable values, see 'nc.constants.justfications'.
PdfSection.addBackgroundImage parameter: justificationV
[type: string] [default: "center"] [optional]
The vertical justification of the background image being added to this PdfSection. For acceptable values, see 'nc.constants.justfications'.
PdfSection.addImage(imagePath, isPathRelative, justificationH, justificationV)
[type: function] [returns: PdfImage]
Adds a new Image to this PdfSection and returns it.
PdfSection.addImage parameter: imagePath
[type: string]
The path of the image being added within this PdfSection.
PdfSection.addImage parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
PdfSection.addImage parameter: justificationH
[type: string] [default: "center"] [optional]
The horizontal justification of the image being added to this PdfSection. For acceptable values, see 'nc.constants.justfications'.
PdfSection.addImage parameter: justificationV
[type: string] [default: "center"] [optional]
The vertical justification of the image being added to this PdfSection. For acceptable values, see 'nc.constants.justfications'.
PdfSection.addTable(numRows, numCols, columnWidths)
[type: function] [returns: PdfTable]
Adds a new PdfTable to this PdfSection and returns it.
PdfSection.addTable parameter: numRows
[type: number]
The number of rows to add to this PdfTable.
PdfSection.addTable parameter: numCols
[type: number]
The number of columns to add to each PdfRow in this PdfTable.
PdfSection.addTable parameter: columnWidths
[type: [number], number]
An array containing the desired widths for each column in this PdfTable.
PdfSection.addTextFrame(width, height)
[type: function] [returns: PdfTextFrame]
Adds a new PdfTextFrame to this PdfSection and returns it.
PdfSection.addTextFrame parameter: width
[type: number]
The width of the PdfTextFrame being added.
PdfSection.addTextFrame parameter: height
[type: number]
The height of the PdfTextFrame being added.
PdfSection.addPageBreak()
[type: function]
Adds a page break after this PdfSection.
PdfSection.setMargins(margin)
[type: function]
Sets all the margins of this PdfSection to a specified value.
PdfSection.setMargins parameter: margin
[type: number]
Value to set all margins on this PdfSection to.
----------------------------------------------------------
Section 85: PdfParagraph
----------------------------------------------------------
PdfParagraph
[type: class] [NON-INSTANTIABLE]
A PdfParagraph is an object defining a block of text and the associated formatting within a Pdf. To make a new PdfParagraph, call 'addParagraph' on the PdfSection, PdfCell, PdfHeader or PdfFooter, you wish to add the block of text to.
PdfParagraph.type
[type: string]
Type identifier.
PdfParagraph.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
PdfParagraph.text
[type: string] [default: ""]
The text to be displayed in this PdfParagraph.
PdfParagraph.justificationH
[type: string] [default: "center"]
The justification of the text in this PdfParagraph. For acceptable values, see 'nc.constants.justfications'.
PdfParagraph.fontName
[type: string] [default: defaultFontName]
The name of the font that will be used to render the text in this PdfParagraph. This value will default to the defualtFontName value of the containing Pdf. To use a new font, you must define it using "Pdf.defineFont", and also ensure that the associated font files are in the 'Pdf Fonts' directory of the Incisor® application support directory, which can be accessed from the Incisor® menu.
PdfParagraph.fontColor
[type: Color] [default: Color(0,0,0,1)]
The color of the text in this PdfParagraph.
PdfParagraph.fontSize
[type: number] [default: defaultFontSize]
The height of the pages within this PdfSection. This value will default to the defaultFontSize value of the containing Pdf.
PdfParagraph.spaceAfter
[type: number] [default: 0]
The space size that will be added after this PdfParagraph.
PdfParagraph.spaceBefore
[type: number] [default: 0]
The space size that will be added before this PdfParagraph.
PdfParagraph.leftIndent
[type: number] [default: 0]
The left indentation amount of this PdfParagraph.
PdfParagraph.rightIndent
[type: number] [default: 0]
The right indentation amount of this PdfParagraph.
PdfParagraph.bold
[type: boolean] [default: false]
Boolean determining if the text in this PdfParagraph should be bold.
PdfParagraph.italic
[type: boolean] [default: false]
Boolean determining if the text in this PdfParagraph should be italicized.
PdfParagraph.underline
[type: string] [default: ""]
The underline type of the text in this PdfPagraph. For acceptable values, see 'nc.constants.pdfUnderlineTypes'.
PdfParagraph.addPageField()
[type: function]
Adds a page number to the end of this PdfParagraph.
----------------------------------------------------------
Section 86: PdfHeader
----------------------------------------------------------
PdfHeader
[type: class] [NON-INSTANTIABLE]
A PdfHeader is an object defining a heading element and the associated formatting within a PdfSection. Each section has exactly one PdfHeader.
PdfHeader.type
[type: string]
Type identifier.
PdfHeader.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
PdfHeader.addParagraph()
[type: function] [returns: PdfParagraph]
Adds a new PdfParagraph to this PdfHeader and returns it. A PdfParagraph is simply a block of text.
PdfHeader.addImage(imagePath, isPathRelative, justificationH, justificationV)
[type: function] [returns: PdfImage]
Adds a new Image to this PdfHeader and returns it.
PdfHeader.addImage parameter: imagePath
[type: string]
The path of the image being added to this PdfHeader.
PdfHeader.addImage parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
PdfHeader.addImage parameter: justificationH
[type: string] [optional]
The horizontal justification of the image being added to this PdfHeader. For acceptable values, see 'nc.constants.justfications'.
PdfHeader.addImage parameter: justificationV
[type: string] [optional]
The vertical justification of the image being added this PdfHeader. For acceptable values, see 'nc.constants.justfications'.
PdfHeader.addTable(numRows, numCols, columnWidths)
[type: function] [returns: PdfTable]
Adds a new PdfTable to this PdfHeader and returns it.
PdfHeader.addTable parameter: numRows
[type: number]
The number of rows to add to this PdfTable.
PdfHeader.addTable parameter: numCols
[type: number]
The number of columns to add to each PdfRow in this PdfTable.
PdfHeader.addTable parameter: columnWidths
[type: [number], number]
An array containing the desired widths for each column in this PdfTable.
PdfHeader.addTextFrame(width, height)
[type: function] [returns: PdfTextFrame]
Adds a new PdfTextFrame to this PdfSection and returns it.
PdfHeader.addTextFrame parameter: width
[type: number]
The width of the PdfTextFrame being added.
PdfHeader.addTextFrame parameter: height
[type: number]
The height of the PdfTextFrame being added.
----------------------------------------------------------
Section 87: PdfFooter
----------------------------------------------------------
PdfFooter
[type: class] [NON-INSTANTIABLE]
A PdfFooter is an object defining the footer element and associated formatting within a PdfSection. * Each section has exactly one PdfFooter.
PdfFooter.type
[type: string]
Type identifier.
PdfFooter.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
PdfFooter.addParagraph()
[type: function] [returns: PdfParagraph]
Adds a new PdfParagraph to this PdfHeader and returns it. A PdfParagraph is simply a block of text.
PdfFooter.addImage(imagePath, isPathRelative, justificationH, justificationV)
[type: function] [returns: PdfImage]
Adds a new Image to this PdfFooter and returns it.
PdfFooter.addImage parameter: imagePath
[type: string]
The path of the image being added to this PdfFooter.
PdfFooter.addImage parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
PdfFooter.addImage parameter: justificationH
[type: string] [default: "center"] [optional]
The horizontal justification of the image being added to this PdfFooter. For acceptable values, see 'nc.constants.justfications'.
PdfFooter.addImage parameter: justificationV
[type: string] [default: "center"] [optional]
The vertical justification of the image being added to this PdfFooter. For acceptable values, see 'nc.constants.justfications'.
PdfFooter.addTable(numRows, numCols, columnWidths)
[type: function] [returns: PdfTable]
Adds a new PdfTable to this PdfFooter and returns it.
PdfFooter.addTable parameter: numRows
[type: number]
The number of rows to add to this PdfTable.
PdfFooter.addTable parameter: numCols
[type: number]
The number of columns to add to each PdfRow in this PdfTable.
PdfFooter.addTable parameter: columnWidths
[type: [number], number]
An array containing the desired widths for each column in this PdfTable.
PdfFooter.addTextFrame(width, height)
[type: function] [returns: PdfTextFrame]
Adds a new PdfTextFrame to this PdfSection and returns it.
PdfFooter.addTextFrame parameter: width
[type: number]
The width of the PdfTextFrame being added.
PdfFooter.addTextFrame parameter: height
[type: number]
The height of the PdfTextFrame being added.
----------------------------------------------------------
Section 88: PdfImage
----------------------------------------------------------
PdfImage
[type: class]
A PdfImage is an object defining an image element within a Pdf. A PdfImage can reside within a PdfSection, PdfHeader, PdfFooter or PdfCell.
PdfImage.type
[type: string]
Type identifier.
PdfImage.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
PdfImage.isPathLocal
[type: boolean] [default: true]
PdfImage.imagePath
[type: string] [default: ""]
PdfImage.justificationH
[type: string] [default: "center"]
The horizontal justification of this PdfImage. For acceptable values, see 'nc.constants.justfications'.
PdfImage.justificationV
[type: string] [default: "center"]
The vertical justification of this PdfImage For acceptable values, see 'nc.constants.justfications'.
PdfImage.scaleWidth
[type: number] [default: 1.0]
The horizontal scale of this PdfImage.
PdfImage.scaleHeight
[type: number] [default: 1.0]
The vertical scale of this PdfImage.
PdfImage.scaleImage(scaleValue)
[type: function]
Sets the horizontal and vertical scales of this PdfImage.
PdfImage.scaleImage parameter: scaleValue
[type: number]
The factor to scale the image by.
----------------------------------------------------------
Section 89: PdfTable
----------------------------------------------------------
PdfTable
[type: class] [NON-INSTANTIABLE]
A PdfTable is an object that represents a table element within a Pdf A PdfTable can reside within a PdfSection, PdfHeader or PdfFooter.
PdfTable.type
[type: string]
Type identifier.
PdfTable.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
PdfTable.totalWidth
[type: number] [default: 0]
The total width of this PdfTable. This value is derived by adding up each column width in the table.
PdfTable.leftBorderThickness
[type: number] [default: 10]
The thickness of the left border in this PdfTable.
PdfTable.rightBorderThickness
[type: number] [default: 10]
The thickness of the right border in this PdfTable.
PdfTable.bottomBorderThickness
[type: number] [default: 10]
The thickness of the bottom border in this PdfTable.
PdfTable.topBorderThickness
[type: number] [default: 10]
The thickness of the top border in this PdfTable.
PdfTable.diagonalDownThickness
[type: number] [default: 0]
The thickness of the diagonalDown (top left to bottom right diagonal) in this PdfTable.
PdfTable.diagonalUpThickness
[type: number] [default: 0]
The thickness of the diagonalUp (top right to bottom left diagonal) in this PdfTable.
PdfTable.leftBorderColor
[type: Color] [default: Color(0,0,0,1)]
The color of the left border in this PdfTable.
PdfTable.rightBorderColor
[type: Color] [default: Color(0,0,0,1)]
The color of the right border in this PdfTable.
PdfTable.bottomBorderColor
[type: Color] [default: Color(0,0,0,1)]
The color of the bottom border in this PdfTable.
PdfTable.topBorderColor
[type: Color] [default: Color(0,0,0,1)]
The color of the top border in this PdfTable.
PdfTable.diagonalDownColor
[type: Color] [default: Color(1,1,1,1)]
The color of the diagonalDown (top left to bottom right diagonal) in this PdfTable.
PdfTable.diagonalUpColor
[type: Color] [default: Color(1,1,1,1)]
The thickness of the diagonalUp (top right to bottom left diagonal) in this PdfTable.
PdfTable.rows
[type: [PdfRow]] [default: []]
An array containing the PdfRows that reside in this PdfTable.
PdfTable.numColumns
[type: number] [default: 0]
The number of columns for each row in this PdfTable.
PdfTable.setBorder(thickness, color)
[type: function]
Sets the thickness and color for all borders in this PdfTable.
PdfTable.setBorder parameter: thickness
[type: number] [optional]
The thickness to set all borders to.
PdfTable.setBorder parameter: color
[type: Color] [optional]
The color to set all borders to.
PdfTable.addRow()
[type: function]
Adds a PdfRow to this PdfTable.
PdfTable.getCell(row, column)
[type: function] [returns: PdfCell, undefined]
Returns the PdfCell at the given row and column if it exists.
PdfTable.getCell parameter: row
[type: number]
The row of the cell to get.
PdfTable.getCell parameter: column
[type: number]
The column of the cell to get.
----------------------------------------------------------
Section 90: PdfRow
----------------------------------------------------------
PdfRow
[type: class] [NON-INSTANTIABLE]
A PdfRow is an object that represents a row that resides within a PdfTable.
PdfRow.type
[type: string]
Type identifier.
PdfRow.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
PdfRow.height
[type: number] [default: 50]
The height of this PdfRow.
PdfRow.heightRule
[type: string] [default: "autoFit"]
Setting that determines how the height of a row is calculated in this table. For acceptable values, see 'nc.constants.pdfHeightRuleTypes'.
PdfRow.cells
[type: [PdfCell]] [default: []]
Array of PdfCells that reside within this PdfRow.
----------------------------------------------------------
Section 91: PdfCell
----------------------------------------------------------
PdfCell
[type: class] [NON-INSTANTIABLE]
A PdfCell is an object that resides within a PdfRow and can contain PdfParagraphs, PdfImages and PdfTables within it.
PdfCell.type
[type: string]
Type identifier.
PdfCell.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
PdfCell.backgroundColor
[type: Color] [default: Color(1,1,1,1)]
The background color of this PdfCell.
PdfCell.justificationV
[type: string] [default: "center"]
The verticialJustifcation of this PdfCell. For acceptable values, see 'nc.constants.justfications'.
PdfCell.justificationH
[type: string] [default: "center"]
The horizontalJustifcation of this PdfCell. For acceptable values, see 'nc.constants.justfications'.
PdfCell.leftIndent
[type: number] [default: 0]
The left indentation amount of this PdfCell.
PdfCell.rightIndent
[type: number] [default: 0]
The right indentation amount of this PdfCell.
PdfCell.leftBorderThickness
[type: number] [default: 1]
The thickness of the left border in this PdfCell.
PdfCell.rightBorderThickness
[type: number] [default: 1]
The thickness of the right border in this PdfCell.
PdfCell.bottomBorderThickness
[type: number] [default: 1]
The thickness of the bottom border in this PdfCell.
PdfCell.topBorderThickness
[type: number] [default: 1]
The thickness of the top border in this PdfCell.
PdfCell.diagonalDownThickness
[type: number] [default: 0]
The thickness of the diagonalDown (top left to bottom right diagonal) in this PdfCell.
PdfCell.diagonalUpThickness
[type: number] [default: 0]
The thickness of the diagonalUp (top right to bottom left diagonal) in this PdfCell.
PdfCell.leftBorderColor
[type: Color] [default: Color(0,0,0,1)]
The color of the left border in this PdfCell.
PdfCell.rightBorderColor
[type: Color] [default: Color(0,0,0,1)]
The color of the right border in this PdfCell.
PdfCell.bottomBorderColor
[type: Color] [default: Color(0,0,0,1)]
The color of the bottom border in this PdfCell.
PdfCell.topBorderColor
[type: Color] [default: Color(0,0,0,1)]
The color of the top border in this PdfCell.
PdfCell.diagonalDownColor
[type: Color] [default: Color(1,1,1,1)]
The color of the diagonalDown (top left to bottom right diagonal) in this PdfCell.
PdfCell.diagonalUpColor
[type: Color] [default: Color(1,1,1,1)]
The thickness of the diagonalUp (top right to bottom left diagonal) in this PdfCell.
PdfCell.spaceAfter
[type: number] [default: 0]
The space size that will be added after this PdfCell.
PdfCell.spaceBefore
[type: number] [default: 0]
The space size that will be added before this PdfCell.
PdfCell.setBorder(thickness, color)
[type: function]
Sets the thickness and color for all borders in this PdfCell.
PdfCell.setBorder parameter: thickness
[type: number] [optional]
The thickness to set all borders to.
PdfCell.setBorder parameter: color
[type: Color] [optional]
The color to set all borders to.
PdfCell.addParagraph()
[type: function] [returns: PdfParagraph]
Adds a new PdfParagraph to this PdfCell and returns it. A PdfParagraph is simply a block of text.
PdfCell.addImage(imagePath, isPathRelative, justificationH)
[type: function] [returns: PdfImage]
Adds a new Image to this PdfCell and returns it.
PdfCell.addImage parameter: imagePath
[type: string]
The path of the image being added within this PdfCell.
PdfCell.addImage parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
PdfCell.addImage parameter: justificationH
[type: string] [default: "center"] [optional]
The horizontal justification of the image being added to this PdfCell. For acceptable values, see 'nc.constants.justfications'.
PdfCell.addTable(numRows, numCols, columnWidths)
[type: function] [returns: PdfTable]
Adds a new PdfTable to this PdfCell and returns it.
PdfCell.addTable parameter: numRows
[type: number]
The number of rows to add to this PdfTable.
PdfCell.addTable parameter: numCols
[type: number]
The number of columns to add to each PdfRow in this PdfTable.
PdfCell.addTable parameter: columnWidths
[type: [number], number]
An array containing the desired widths for each column in this PdfTable.
PdfCell.mergeCellRight(numberOfCells)
[type: function]
Merges this cell right by a specificed number of cells.
PdfCell.mergeCellRight parameter: numberOfCells
[type: number]
The number of cells to merge.
PdfCell.addTextFrame(width, height)
[type: function] [returns: PdfTextFrame]
Adds a new PdfTextFrame to this PdfSection and returns it.
PdfCell.addTextFrame parameter: width
[type: number]
The width of the PdfTextFrame being added.
PdfCell.addTextFrame parameter: height
[type: number]
The height of the PdfTextFrame being added.
----------------------------------------------------------
Section 92: PdfTextFrame
----------------------------------------------------------
PdfTextFrame
[type: class] [NON-INSTANTIABLE]
A PdfTextFrame is an object that resides within a PdfSection, PdfHeader or PdfFooter and can contain PdfParagraphs, PdfImages and PdfTables within it.
PdfTextFrame.type
[type: string]
Type identifier.
PdfTextFrame.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
PdfTextFrame.leftMargin
[type: number] [default: 0]
The size of the left margin of the pages within this PdfTextFrame.
PdfTextFrame.rightMargin
[type: number] [default: 0]
The size of the right margin of the pages within this PdfTextFrame.
PdfTextFrame.topMargin
[type: number] [default: 0]
The size of the top margin of the pages within this PdfTextFrame.
PdfTextFrame.bottomMargin
[type: number] [default: 0]
The size of the bottom margin of the pages within this PdfTextFrame.
PdfTextFrame.height
[type: number] [default: 0]
The height of this PdfTextFrame.
PdfTextFrame.width
[type: number] [default: 0]
The width of this PdfTextFrame.
PdfTextFrame.addParagraph()
[type: function] [returns: PdfParagraph]
Adds a new PdfParagraph to this PdfTextFrame and returns it. A PdfParagraph is simply a block of text.
PdfTextFrame.addImage(imagePath, isPathRelative, justificationH, justificationV)
[type: function] [returns: PdfImage]
Adds a new Image to this PdfTextFrame and returns it.
PdfTextFrame.addImage parameter: imagePath
[type: string]
The path of the image being added within this PdfTextFrame.
PdfTextFrame.addImage parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
PdfTextFrame.addImage parameter: justificationH
[type: string] [default: "center"] [optional]
The horizontal justification of the image being added to this PdfTextFrame. For acceptable values, see 'nc.constants.justfications'.
PdfTextFrame.addImage parameter: justificationV
[type: string] [default: "center"] [optional]
The vertical justification of the image being added to this PdfTextFrame. For acceptable values, see 'nc.constants.justfications'.
PdfTextFrame.addTable(numRows, numCols, columnWidths)
[type: function] [returns: PdfTable]
Adds a new PdfTable to this PdfTextFrame and returns it.
PdfTextFrame.addTable parameter: numRows
[type: number]
The number of rows to add to this PdfTextFrame.
PdfTextFrame.addTable parameter: numCols
[type: number]
The number of columns to add to each PdfRow in this PdfTextFrame.
PdfTextFrame.addTable parameter: columnWidths
[type: [number], number]
An array containing the desired widths for each column in this PdfTextFrame.
----------------------------------------------------------
Section 93: PivotPointAdjuster
----------------------------------------------------------
PivotPointAdjuster
[type: class] [NON-INSTANTIABLE]
A PivotPointAdjuster gives a GraphicObject a unique copy of its Geometry, which can then be modified using the PivotPointAdjuster's position, rotation, and scale members. Note that changing the position, rotation, or scale at run time causes a costly rebuild of the Geometry data and is only recommended during initialization.
PivotPointAdjuster.type
[type: string]
Type identifier.
PivotPointAdjuster.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
PivotPointAdjuster.position
[type: Vector3]
The position offset to apply to every vertex in the Geometry. Note that changing this at run time causes a costly rebuild of the Geometry data and is only recommended during initialization.
PivotPointAdjuster.rotation
[type: Vector3]
The rotation to apply to every vertex in the Geometry. Note that changing this at run time causes a costly rebuild of the Geometry data and is only recommended during initialization.
PivotPointAdjuster.lazyUpdater
[type: LazyUpdater]
The lazy updater responsible for updating the GraphicObject's Geometry.
PivotPointAdjuster.dispose()
[type: function]
Removes and destroys the PivotPointAdjuster, restoring the original Geometry if possible.
----------------------------------------------------------
Section 94: PixelsObject
----------------------------------------------------------
PixelsObject
[type: class] [NON-INSTANTIABLE] [requires: module - pixelsObjects]
A PixelsObject is an RGBA bitmap image in a simple, 'data-only' format, used for basic image access and manipulation.
PixelsObject.type
[type: string]
Type identifier.
PixelsObject.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
PixelsObject.width
[type: number]
The width of the PixelsObject.
PixelsObject.height
[type: number]
The height of the PixelsObject.
PixelsObject.writePngFile(filePath, isPathRelative)
[type: function] [returns: IncrCommsResponseObject]
Writes the bitmap from this PixelsObject to a ".png" file at the given path.
PixelsObject.writePngFile parameter: filePath
[type: string]
The relative or absolute path to the file in question.
PixelsObject.writePngFile parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
PixelsObject.getPixel(x, y)
[type: function] [returns: Vector4]
Returns a Vector4 containing the RGBA color of the pixel at the given coordinates.
PixelsObject.getPixel parameter: x
[type: number]
The horizontal index of the pixel to get the color of.
PixelsObject.getPixel parameter: y
[type: number]
The vertical index of the pixel to get the color of. The vertical position of pixels in PixelObjects map from bottom to top.
PixelsObject.setPixel(x, y, color)
[type: function]
Sets the RGBA color Value of the pixel at the given coordinates
PixelsObject.setPixel parameter: x
[type: number]
The horizontal index of the pixel to set the color of.
PixelsObject.setPixel parameter: y
[type: number]
The vertical index of the pixel to get set color of. The vertical position of pixels in PixelObjects map from bottom to top.
PixelsObject.setPixel parameter: color
[type: Vector4]
Vector with the RGBA color value for the desired pixel.
PixelsObject.unMultiply()
[type: function]
Performs a transformation on the bitmap data stored in this PixelsObject that approximates the reversal of "premultiplication" of images with transparency. Depending on the source of the content within this PixelsObject, you may want to invoke 'unMultiply' before writing it to an image on disk. This is because Incisor® primarily works with normal 'unmultiplied' source images and premultiplies images during runtime, so PixelsObjects created from composites of those premultiplied images will likely need to be unmultiplied prior to being written to disk to ensure that the resulting image is saved in the original 'unmultiplied' color space.
----------------------------------------------------------
Section 95: PixelsObjects
----------------------------------------------------------
PixelsObjects
[type: class] [requires: module - pixelsObjects]
Object housing functionality for PixelsObjects, which are RGBA bitmap images in a simple, 'data-only' format, used for basic image access and manipulation.
PixelsObjects.getNewBlankPixelsObject(width, height, color)
[type: function] [returns: PixelsObject]
Returns a uniformly colored PixelsObject of the width, height, and color provided.
PixelsObjects.getNewBlankPixelsObject parameter: width
[type: number]
The width of the desired PixelsObject.
PixelsObjects.getNewBlankPixelsObject parameter: height
[type: number]
The height of the desired PixelsObject.
PixelsObjects.getNewBlankPixelsObject parameter: color
[type: Vector4]
Vector with the RGBA color values for the new PixelsObject.
PixelsObjects.getPixelsObject(source)
[type: function] [returns: PixelsObject]
Returns a PixelsObject generated from the given RenderTarget or Texture. It should be noted that the texture will need to be loaded before invoking this function - see nc.addTierLoadedCallback and nc.awaitLoadedTiers for more information.
PixelsObjects.getPixelsObject parameter: source
[type: RenderTarget, Texture]
The RenderTarget or Texture to generate the PixelsObject from. It should be noted that Textures that were originally created from PixelsObjects cannot be used to create a PixelsObject.
----------------------------------------------------------
Section 96: TimePlaybackController
----------------------------------------------------------
TimePlaybackController
[type: class] [extends: PlaybackController]
A time-based PlaybackController with "startTime", "time", and "endTime" properties.
TimePlaybackController.time
[type: number]
The current time (in seconds) of the PlaybackController. While playing, this value is automatically updated every fixedUpdate, or it can also be set manually at any time.
TimePlaybackController.startTime
[type: number]
The starting time of the PlaybackController.
TimePlaybackController.endTime
[type: number]
The end time of the PlaybackController.
TimePlaybackController.initialTime
[type: number]
The initial time for this TimePlaybackController when it is included in a newly instantiated Construct. This property will be set to the TimePlaybackController's 'startTime' as a default.
----------------------------------------------------------
Section 97: ValuePlaybackController
----------------------------------------------------------
ValuePlaybackController
[type: class] [extends: PlaybackController]
A value-based PlaybackController with "startValue", "value", and "endValue" properties.
ValuePlaybackController.value
[type: number]
The current value (in seconds) of the PlaybackController. While playing, this value is automatically updated every fixedUpdate, or it can also be set manually at any time.
ValuePlaybackController.startValue
[type: number]
The starting value of the PlaybackController.
ValuePlaybackController.endValue
[type: number]
The end value of the PlaybackController.
ValuePlaybackController.initialValue
[type: number]
The initial value for this ValuePlaybackController when it is included in a newly instantiated Construct. This property will be set to the ValuePlaybackController's 'startValue' as a default.
----------------------------------------------------------
Section 98: PlaybackController
----------------------------------------------------------
PlaybackController
[type: class] [NON-INSTANTIABLE]
Object managing the playing, pausing, and stopping of items that change over time such as Timelines, Sounds, or ParticleSystems.
PlaybackController.type
[type: string]
Type identifier.
PlaybackController.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
PlaybackController.lazyStop
[type: boolean] [default: false]
Boolean flag determining if the PlaybackController will hault the next time the time reachs the endTime (or startTime if playback is a negative value). If this flag is false, the PlaybackController loops and continues playing indefinitely.
PlaybackController.duration
[type: number]
The read-only length of this PlaybackController in seconds. To change the duration, adjust the 'startTime' or 'endTime' properties.
PlaybackController.playbackState
[type: string] [default: nc.constants.playbackStates.stopped]
Read-only string denoting the current playback state: 'stopped', 'paused', or 'playing'. State values are available in 'nc.constants.playbackStates'.
PlaybackController.playbackRate
[type: number] [default: 1]
Value multiplying the progression of the 'time' value. To play twice as fast use 2, for items that can play backwards, use negative values.
PlaybackController.netPlaybackRate
[type: number]
Read-only value denoting the net playbackRate, including the effects of this PlaybackController's SpeedControls.
PlaybackController.pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity]
The PauseEvent or Array of PauseEvents that this PlaybackController will be immune to. Set this parameter to [] for this PlaybackController to have no pause immunity.
PlaybackController.speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl]
The SpeedControl or Array of SpeedControls that this PlaybackController is affected by.
PlaybackController.autoplayWhenInConstruct
[type: boolean] [default: true]
Boolean determining if the PlaybackController automatically starts playing when included in a newly instantiated Construct.
PlaybackController.play()
[type: function]
Changes the playbackState to "playing", and begins the progression of the 'time' value. While playing, the PlaybackController automatically updates the 'time' value once every fixedUpdate.
PlaybackController.playOnce(lazyStopCallbackOwner, lazyStopCallbackName, lazyStopCallbackArgs)
[type: function]
Starts playing with 'time=startTime' (or if playbackRate is negative, 'time=endTime') and sets the 'lazyStop' value to true. An optional callback function can be provided for when playbackController stops - this callback is consumed upon stopping.
PlaybackController.playOnce parameter: lazyStopCallbackOwner
[type: object] [optional]
The object owning the optional callback function that is triggered when a lazy stop occurs.
PlaybackController.playOnce parameter: lazyStopCallbackName
[type: string] [optional]
The name of the optional callback function that is triggered when a lazy stop occurs.
PlaybackController.playOnce parameter: lazyStopCallbackArgs
[type: Array, any] [optional]
Parameters for the optional callback function that is triggered when a lazy stop occurs.
PlaybackController.pause()
[type: function]
Changes the playbackState to "paused", and pauses the progression of the 'time' value.
PlaybackController.stop()
[type: function]
Changes the playbackState to "stopped" and sets the 'time' value to 'startTime'.
PlaybackController.addTimeUpdateCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback that occurs any time the 'time' property is updated, which happens while this PlaybackController is playing, but also when time is set directly. The time value will be sent to this callback as its first parameter, with any user-defined args following.
PlaybackController.addTimeUpdateCallback parameter: callbackOwner
[type: object]
The object owning the callback function that is triggered when time is updated.
PlaybackController.addTimeUpdateCallback parameter: callbackName
[type: string]
The name of the callback function that is triggered when time is updated.
PlaybackController.addTimeUpdateCallback parameter: callbackArgs
[type: Array, any] [optional]
Args for the callback function that is triggered when time is updated.
PlaybackController.removeTimeUpdateCallback(callbackOwner, callbackName)
[type: function]
Removes the given timeUpdate callback.
PlaybackController.removeTimeUpdateCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
PlaybackController.removeTimeUpdateCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
PlaybackController.addLazyStopCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback that occurs upon the next 'lazyStop', which occurs any time the time reaches the startTime or endTime while the 'lazyStop' flag is true. It should be noted that all lazyStop callbacks are consumed upon encountering a lazyStop, and would need to be-added to be triggered upon subsequent lazyStops.
PlaybackController.addLazyStopCallback parameter: callbackOwner
[type: object]
The object owning the optional callback function that is triggered when a lazy stop occurs.
PlaybackController.addLazyStopCallback parameter: callbackName
[type: string]
The name of the optional callback function that is triggered when a lazy stop occurs.
PlaybackController.addLazyStopCallback parameter: callbackArgs
[type: Array, any] [optional]
Parameters for the optional callback function that is triggered when a lazy stop occurs.
PlaybackController.removeLazyStopCallback(callbackOwner, callbackName)
[type: function]
Removes the given lazyStop callback.
PlaybackController.removeLazyStopCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
PlaybackController.removeLazyStopCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
PlaybackController.addStateChangeCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback that occurs if/when any component of this PlaybackController has changed. This can be used to manage processes that run entirely outside of the Incisor® system by providing a callback to update said processes upon any change. A string denoting the triggering change will be passed in as the callback function's first parameter, and user-defined parameters will follow.
PlaybackController.addStateChangeCallback parameter: callbackOwner
[type: object]
The object owning the optional callback function that is triggered when any component of this PlaybackController has changed.
PlaybackController.addStateChangeCallback parameter: callbackName
[type: string]
The name of the optional callback function that is triggered when any component of this PlaybackController has changed.
PlaybackController.addStateChangeCallback parameter: callbackArgs
[type: Array, any] [optional]
Parameters for the optional callback function that is triggered when any component of this PlaybackController has changed.
PlaybackController.removeStateChangeCallback(callbackOwner, callbackName)
[type: function]
Removes the given stateChange callback.
PlaybackController.removeStateChangeCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
PlaybackController.removeStateChangeCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
PlaybackController.dispose()
[type: function]
Removes internal Incisor® references to this PlaybackController in order to aid memory management.
----------------------------------------------------------
Section 99: Precomp
----------------------------------------------------------
Precomp
[type: class]
A Precomp (short for 'precomposition'), is an object with its own Scene, Camera, RenderTarget, and GraphicAsset. When the Precomp's Camera renders, it informs the associated GraphicAsset, which can be instantiated by making new GraphicObject. Precomps can be used for optimization in many ways, including precomposing several ScenenObjects together, rendering the Scene, and using the resulting GraphicAsset to recreate the collection in a single GraphicObject.
Precomp.type
[type: string]
Type identifier.
Precomp.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
Precomp.name
[type: string]
The name of the Precomp. This name will also be used for the GraphicAsset, Texture, and Geometry that are created as part of this Precomp.
Precomp.scene
[type: Scene]
The Scene holding the this Precomp's content. This is the Scene that is rendered to inform the associated GraphicAsset.
Precomp.camera
[type: OrthographicCamera]
The OrthographicCamera that resides in, and renders, this Precomp's Scene.
Precomp.renderTarget
[type: RenderTarget]
The RenderTarget that this Precomp's Camera renders to.
Precomp.graphicAsset
[type: GraphicAsset]
The GraphicAsset using this Precomp's RenderTarget (using its Texture)
Precomp.automaticallyManageLoadingTierDelayedContentRendering
[type: boolean] [default: true]
Boolean determining if this Precomp attempts to manage its own delayed rendering. With this value set to true and 'autorender=true', this Precomp will change the 'autoRenderOrder' of its own Camera to account for any Precomp nesting that migth occur. With this value set to true and 'autorender=false', this Precomp will set up an internal callback to render its Scene content once it all loads. If this value is set to false, no delayed rendering management actions occur unless manually triggered. The Precomp can be rendered at any time by calling 'Precomp.camera.render'.
Precomp.writePngFile(filePath, isPathRelative, postLoadCallbackOwner, postLoadCallbackName, postLoadCallbackArgs, unMultiply)
[type: function]
An awaitable method that writes the rendered content from this Precomp's RenderTarget to disk as a '.png' file once it has all loaded. A callback function can be provided to manipulate the contents of this Precomp once it has loaded before it is rendered and write to file. [REQUIREMENT: unpublished only] [REQUIREMENT: license - fileIO]
Precomp.writePngFile parameter: filePath
[type: string]
The relative or absolute path to the png file to be written to disk.
Precomp.writePngFile parameter: isPathRelative
[type: boolean] [default: true] [optional]
Bool stating if the given path is relative to the project path or an absolute path. If an absolute path is used that is outside of the project directory, the 'allowUniversalFileIO' item in application settings must be set to true.
Precomp.writePngFile parameter: postLoadCallbackOwner
[type: object] [optional]
The owner of the optional callback function that is called once the Precomp Scene's content is loaded before it is rendered.
Precomp.writePngFile parameter: postLoadCallbackName
[type: string] [optional]
The name of the optional callback function that is called once the Precomp Scene's content is loaded before it is rendered.
Precomp.writePngFile parameter: postLoadCallbackArgs
[type: Array, any] [optional]
Parameters for the optional callback function that is called once the Precomp Scene's content is loaded before it is rendered.
Precomp.writePngFile parameter: unMultiply
[type: boolean] [default: true] [optional]
Boolean determining if the contents of the RenderTarget are 'un-multiplied' before the '.png' is written. Since textures loaded in Incisor® use premultiplied alpha, un-multiplication would need to happen to get a file with transparency that was equivalent to the original asset files.
----------------------------------------------------------
Section 100: ProjectConfiguration
----------------------------------------------------------
ProjectConfiguration
[type: class] [NON-INSTANTIABLE]
Object housing the configuration settings for this project. Accessible via 'nc.projectConfiguration'. Many of the members of this object are customizable on a 'per configuration' basis by editing the ProjectSettings. The user-customizable 'PreloadConfiguration' code is executed within this object, so members created within that code will be accessible on this object.
ProjectConfiguration.incisorVersion
[type: string]
The specific 'version number' designation of the version of Incisor® that generated this project code.
ProjectConfiguration.incisorVersionSet
[type: string]
The 'version set' designation of the version of Incisor® that generated this project code.
ProjectConfiguration.projectName
[type: string]
The name of the current Incisor® project as determined in the 'ProjectSettings'.
ProjectConfiguration.publishTimestamp
[type: string]
The date when the current project was published using the format "YYYY.MM.DD.hh.mm.ss". For unpublished projects, this value will be 'devMode'.
ProjectConfiguration.coreCanvasResolutionX
[type: number] [default: 1920]
The core canvas pixel width. This represents the pixel width of the canvas RenderTarget at it's native scale. Runtime changes to this value must be made in PreloadConfiguration code, which is located in the 'ProjectCode/PreloadConfiguration' local directory.
ProjectConfiguration.coreCanvasResolutionY
[type: number] [default: 1080]
The core canvas pixel height. This represents the pixel height of the canvas RenderTarget at it's native scale. Runtime changes to this value must be made in PreloadConfiguration code, which is located in the 'ProjectCode/PreloadConfiguration' local directory.
ProjectConfiguration.canvasTransparency
[type: boolean] [default: false]
Boolean determining if any portion of the canvas will be transparent, enabling the html page to be partially viewed "through" the canvas.
ProjectConfiguration.mainCameraType
[type: string] [default: 'orthographic']
String value denoting the default camera type used for the 'mainCamera' in the 'mainScene'. Runtime changes to this value must be made in PreloadConfiguration code, which is located in the 'ProjectCode/PreloadConfiguration' local directory. Possible values for this property are 'orthographic' or 'perspective'.
ProjectConfiguration.maskingMode
[type: string] [default: 'overlapping']
String value denoting the masking mode for this project. The masking mode determines how different MaskGroups interact with eachother. Possible values for this property are 'overlapping' or 'disjoint'. When the maskingMode is 'overlapping', up to 8 MaskGroups can be defined and GraphicObjects can subscribe to any combination of those MaskGroups. When the maskingMode is 'disjoint', up to 255 MaskGroups can be defined, but GraphicObjects can only subscribe to one mask at a time.
ProjectConfiguration.preserveDrawingBuffer
[type: boolean] [default: true]
Boolean value determining if the drawing buffer is preserved for reading. Preserving the drawing buffer enables several useful development features, but may cause performance issues in published software on some devices. It is therefore recommended that this flag be set to true for when the project is unpublished, and false for when the project is published. This can be done using a 'CODE.includeIf___published' within the 'preloadConfiguration' method in the PreloadConfiguration code.
ProjectConfiguration.canvasParent
[type: object] [default: document.body]
DOM object that the canvas will be made a child of. For many projects the best value for this item is the default. Changes to this value must be made in PreloadConfiguration code, which is located in the 'ProjectCode/PreloadConfiguration' local directory.
ProjectConfiguration.isProjectPublished
[type: boolean]
Ready-only bool indicating if the project that is currently running is published.
ProjectConfiguration.urlParams
[type: object]
URL parameters. URL parameters included in the url used to access this project are automatically parsed and provided in this object.
ProjectConfiguration.defaultGraphicAssetEffectNodes
[type: [string]]
List of Nodes added to the presets for all GraphicAssets. This item is determined by the associated field in the ProjectSettings.
ProjectConfiguration.assetConfiguration
[type: AssetConfiguration]
Object housing the details of the current asset configuration. Runtime changes to this value must be made in PreloadConfiguration code, which is located in the 'ProjectCode/PreloadConfiguration' local directory. When setting these values, ensure the chosen values exist within the 'assetConfigurationDefinitions' in the 'ProjectSettings.json' file, and the overall assetConfiguration must in the list of 'supportedAssetConfigurations' listed within the current configuration within the 'ProjectSettings.json' file.
ProjectConfiguration.loadingTierDefinitions
[type: dictionary]
Object housing information about the loading tiers in this project. Loading tiers are a means to organize AssetComponents into separately downloadable groups.
ProjectConfiguration.loadingTierDefinitions.100
[type: LoadingTierDefinition]
Information about the 100 loading tier.
ProjectConfiguration.fontDefinitions
[type: dictionary]
Object housing information about the fonts in this project.
ProjectConfiguration.fontDefinitions.NullFont
[type: FontDefinition]
Information about the NullFont font.
ProjectConfiguration.fontDefinitions.incr_inspectorFont
[type: FontDefinition]
Information about the incr_inspectorFont font.
ProjectConfiguration.fontDefinitions.MonoSpace
[type: FontDefinition]
Information about the MonoSpace font.
ProjectConfiguration.refreshWithUpdatedParams()
[type: function]
Refreshes the project within the browser, applying current/updated values of 'ProjectConfiguration.urlParams'. For example, a project could have functionality to allow the end-user to change a custom configuration (e.i. themeColor) of the project from within the published project runtime, and this could be done by calling "nc.projectConfiguration.urlParams.themeColor = 'purple';", and then calling "nc.projectConfiguration.refreshWithUpdatedParams();". The browser would then refresh, the url would include the suffix "?themeColor=purple", and the nc.projectConfiguration.urlParams would be updated from the very beginning of the project runtime, allowing the configuration to inform the loading and setup process.
ProjectConfiguration.canvasPositionOverride(canvasElement, left, top, width, height)
[type: function]
An function that can override Incisor's built-in placement of the canvasElement, which as a default behaviour simply stretches the canvas over the entire browser window. This function is initially undefined, and can be defined to create custom canvas layout behaviours. This function is automatically called if the browser window is resized but it can also be called directly (if defined) in the event that the canvas needs to be moved for reasons not stemming from something other than a browser resize event.
ProjectConfiguration.canvasPositionOverride parameter: canvasElement
[type: HTMLCanvasElement]
The main canvas element for this project (accessable via 'nc.canvasElement').
ProjectConfiguration.canvasPositionOverride parameter: left
[type: number]
The input position of the left side of the canvas within the page window.
ProjectConfiguration.canvasPositionOverride parameter: top
[type: number]
The input position of the top side of the canvas within the page window.
ProjectConfiguration.canvasPositionOverride parameter: width
[type: number]
The input width of the canvas within the page window.
ProjectConfiguration.canvasPositionOverride parameter: height
[type: number]
The inpu height of the canvas within the page window.
----------------------------------------------------------
Section 101: AssetConfiguration
----------------------------------------------------------
AssetConfiguration
[type: class] [NON-INSTANTIABLE]
Dictionary of asset configurations.
AssetConfiguration."assetPackageScale"
[type: string]
Asset configuration for 'assetPackageScale'. Available options for this asset configuration can be found in the 'assetConfigurationDefinitions' item in the 'ProjectSettings'. This asset configuration is a built-in configuration. This is the current value for the 'assetPackageScale' configuration. This configuration changes the base resolution for all image assets loaded within the project.' Image assets can opt out of adherence to 'assetPackageScale' by changing the 'applyAssetPackageScaling' in the asset settings to false.
AssetConfiguration."soundQuality"
[type: string]
Asset configuration for 'soundQuality'. Available options for this asset configuration can be found in the 'assetConfigurationDefinitions' item in the 'ProjectSettings'. This asset configuration is a built-in configuration. This is the current value for the 'soundQuality' configuration. This configuration changes the compression bitrate and the number of channels for all sound assets loaded within the project.'
AssetConfiguration."language"
[type: string]
Asset configuration for 'language'. Available options for this asset configuration can be found in the 'assetConfigurationDefinitions' item in the 'ProjectSettings'. This asset configuration is a built-in configuration. This is the current value for the 'language' configuration. The language configuration determines which phrases are referenced in the 'ProjectTranscript.json.' This configuration can also be used to determine which language-specific assets to load based on flags within the given asset settings.
----------------------------------------------------------
Section 102: Publishing
----------------------------------------------------------
Publishing
[type: class] [NON-INSTANTIABLE] [requires: unpublished only, license - publishing]
Object housing functionality for publishing projects.
Publishing.publishProject(configurationName, hostPublishedProject)
[type: function] [returns: IncrCommsResponseObject]
Compiles the user code from the current project together with the Incisor® code to produce a complete, optimized, and ready-to-host web package. Publishing configuration options such as asset packaging settings, code formatting settings, and more are defined in ProjectSettings. By default, newly published projects will be placed in the 'Publishing' directory in the project.
Publishing.publishProject parameter: configurationName
[type: string] [optional]
The name of the configuration to be used in publishing this project.
Publishing.publishProject parameter: hostPublishedProject
[type: boolean] [optional]
Flag determining if the published project should be automatically hosted. [Default: false]
----------------------------------------------------------
Section 103: RenderTarget
----------------------------------------------------------
RenderTarget
[type: class]
RenderTargets are objects that contain Textures to render to, as well as settings for how those textures may be resized automatically based on environmental factors such as canvas size, canvas aspect ratio, and the current asset package scale.
RenderTarget.type
[type: string]
Type identifier.
RenderTarget.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
RenderTarget.name
[type: string]
The name of the RenderTarget. This name must be unique.
RenderTarget.coreWidth
[type: number] [default: 500]
The base width value of this RenderTarget. To get the final horizontal render resolution of this RenderTarget's Texture, start with this value, then apply all of the enabled automatic adjustments (such as canvasAspectMatching and assetPackageScaleResolutionScaling).
RenderTarget.coreHeight
[type: number] [default: 500]
The base height value of this RenderTarget. To get the final vertical render resolution of this RenderTarget's Texture, start with this value, then apply all of the enabled automatic adjustments (such as canvasAspectMatching and assetPackageScaleResolutionScaling).
RenderTarget.canvasAspectMatching
[type: boolean] [default: false]
Flag determining whether or not this RenderTarget automatically matches the aspect ratio of the canvas.
RenderTarget.canvasSizeResolutionScaling
[type: boolean] [default: false]
Flag determining whether or not this RenderTarget automatically scales its resolution based on the size of the canvas.
RenderTarget.capCanvasSizeResolutionScaling
[type: boolean] [default: false]
Flag determining whether or not the canvasSizeResolutionScaling factor for this RenderTarget is capped to 1. This only applies if canvasSizeResolutionScaling is true.
RenderTarget.assetPackageScaleResolutionScaling
[type: boolean] [default: false]
Flag determining whether or not this RenderTarget automatically scales its resolution based on the current assetPackageScale. The current assetPackageScale can be found at nc.projectConfiguration.assetConfiguration.assetPackageScale.
RenderTarget.auxiliaryResolutionScaleFactor
[type: number] [default: 1]
Additional factor that multiplies this RenderTarget's resolution scale.
RenderTarget.globalRenderTargetResolutionScaling
[type: boolean] [default: true]
Flag determining whether or not this RenderTarget automatically scales its resolution based on the current nc.globalRenderTargetResolutionScaler value.
RenderTarget.resizeLazyUpdater
[type: LazyUpdater]
The LazyUpdater in charge of updating the size of this RenderTarget's Texture. The 'updateIfNeeded' call for this LazyUpdater is called whenever this RenderTarget is rendered to, but you can call it directly if you need to ensure that changes to the RenderTarget size are applied immediately for any reason.
RenderTarget.texture
[type: Texture]
The Texture associated with this RenderTarget.
RenderTarget.renderResolutionLedger
[type: object] [requires: unpublished only]
Aan object containing a complete record of all of the factors that contribute to the final render resolution of this RenderTarget.
RenderTarget.getCurrentRenderResolution()
[type: function]
Returns a vector containing the current render resolution for this RenderTarget.
----------------------------------------------------------
Section 104: SceneObject
----------------------------------------------------------
SceneObject
[type: class]
SceneObjects are the fundamental objects that populate a given project's world/hierarchy. Every object in a Scene's hierarchy inherits from SceneObject.
SceneObject.type
[type: string]
Type identifier.
example:
// Objective: Determine the type of a SceneObject
// Expected Result: The console should have 3 log messages as follows:
// MySceneObject is of type SceneObject
// MyGraphicObject is of type GraphicObject
// MyButton is of type Button
// Create a SceneObject using the SceneObject constructor. This will add "MySceneObject" to the main scene.
let mySceneObject = new SceneObject( nc.mainScene, "MySceneObject" );
// Create a GraphicObject using the GraphicObject constructor adding it to "mySceneObject".
let myGraphicObject = new GraphicObject( nc.graphicAssets.WhiteBox, mySceneObject, "MyGraphicObject" );
// Create a Button using the Button constructor and adding it to myGraphicObject.
let myButton = new Button( nc.graphicAssets.WhiteTriangle, myGraphicObject, "MyButton" );
console.log(mySceneObject.name + ' is of type ' + mySceneObject.type);
console.log(myGraphicObject.name + ' is of type ' + myGraphicObject.type);
console.log(myButton.name + ' is of type ' + myButton.type);
SceneObject.inheritedTypes
[type: any]
Dictionary object listing all of the types this object is compatible with.
example:
// Objective: Determine the inherited types of a Button.
// Expected Result: The console log should read "inherited types {"SceneObject":true,"GraphicObject":true,"Button":true}".
// Create a SceneObject using the SceneObject constructor. This will add "MySceneObject" to the main scene.
let mySceneObject = new SceneObject( nc.mainScene, "MySceneObject" );
// Add a Button named "MyButton" to the SceneObject.
let myButton = new Button( nc.graphicAssets.WhiteBox, mySceneObject, "MyButton" );
console.log("inherited types", JSON.stringify( myButton.inheritedTypes ) );
SceneObject.name
[type: string] [default: 'SceneObject']
The name of the SceneObject.
example:
// Objective: Set and Get the name of a SceneObject.
// Expected Result: The console should have 2 log messages as follows:
// original name is MySceneObject
// new name is MyDifferentSceneObject
// Create a SceneObject using the SceneObject constructor. This will add "MySceneObject" to the main scene.
let mySceneObject = new SceneObject( nc.mainScene, "MySceneObject" );
console.log("original name is", mySceneObject.name );
// Update the name of the SceneObject.
mySceneObject.name = "MyDifferentSceneObject";
console.log("new name is", mySceneObject.name );
SceneObject.enabled
[type: boolean] [default: true]
Boolean determining if this SceneObject is enabled. Enabled SceneObjects are shown normally within the Scene while disabled SceneObjects are not shown. If a SceneObject is disabled, all of its children inherit its disabled state, but if it is enabled all of its childrens' states depend on their own 'enabled' properties.
example:
// Objective: Disable a SceneObject to disable its children.
// Expected Result: You do not see the white box.
// Create a SceneObject using the SceneObject constructor. This will add "MySceneObject" to the main scene.
let mySceneObject = new SceneObject( nc.mainScene, "MySceneObject" );
// Add a GraphicObject to the SceneObject using the GraphicObject constructor.
new GraphicObject( nc.graphicAssets.WhiteBox, mySceneObject, "WhiteBox" );
// Set mySceneObject to enabled = false.
mySceneObject.enabled = false;
SceneObject.children
[type: [SceneObject]]
The the array of this SceneObject's children SceneObjects in the hierarchy.
example:
// Objective: Add children to a SceneObject.
// Expected Result: The console log should read "children count 2".
// Create a SceneObject using the SceneObject constructor. This will add "MySceneObject" to the main scene.
let mySceneObject = new SceneObject( nc.mainScene, "MySceneObject" );
// Add 2 GraphicObjects to the SceneObject using the GraphicObject constructor.
new GraphicObject( nc.graphicAssets.WhiteBox, this.mySceneObject, "WhiteBox" );
new GraphicObject( nc.graphicAssets.WhiteTriangle, this.mySceneObject, "WhiteTriangle" );
console.log("children count", mySceneObject.children.length);
SceneObject.parent
[type: SceneObject]
The SceneObject that is this SceneObject's parent in the hierarcy. If this SceneObject is of type 'Scene', this value is left undefined. Set this property to change the parent of this SceneObject, or use 'SceneObject.setParent' to do the same thing but with the 'maintainGlobalPostion' optional parameter.
example:
// Objective: Get the parent of a scene object.
// Expected Result: The console log should read "parent name is MySceneObject".
// Create a SceneObject using the SceneObject constructor. This will add "MySceneObject" to the main scene.
let mySceneObject = new SceneObject( nc.mainScene, "MySceneObject" );
// Add a GraphicObject to the SceneObject using the GraphicObject constructor.
let myGraphicObject = new GraphicObject( nc.graphicAssets.WhiteBox, this.mySceneObject, "WhiteBox" );
// Console log the parent name of this GraphicObject.
console.log("parent name is", myGraphicObject.parent.name);
SceneObject.containingScene
[type: Scene]
The Scene in which this SceneObject resides.
example:
// Objective: Determine the containing scene of a SceneObject.
// Expected Result: The console should have 2 log messages as follows:
// The containing scene for 'MyMainSceneObject' is MainScene
// The containing scene for 'MyOtherSceneObject' is MyScene
// Create a SceneObject using the SceneObject constructor. This will add "MyMainSceneObject" to the main scene.
let mySceneObject = new SceneObject( nc.mainScene, "MyMainSceneObject" );
console.log("The containing scene for 'MyMainSceneObject' is", mySceneObject.containingScene.name);
// Create a new Scene and name it "MyScene".
let myScene = new Scene("MyScene");
// Create a SceneObject using the SceneObject constructor. This will add "MyOtherSceneObject" to myScene ("MyScene").
let myOtherSceneObject = new SceneObject( myScene, "MyOtherSceneObject" );
console.log("The containing scene for 'MyOtherSceneObject' is", myOtherSceneObject.containingScene.name);
SceneObject.position
[type: Vector3] [default: new Vector3(0,0,0)]
The position of this SceneObject relative to it's parent.
example:
// Objective: Move the position of the "WhiteTriangle" relative to the "WhiteBox".
// Expected Result: The "WhiteTriangle" is 300 world units above and 300 world units to the right of the "WhiteBox".
// Note: To use a custom graphic, add your image file to the assets directory and access it using nc.graphicAssets['MyImage']
// Add a GraphicObject to the main scene using the GraphicObject constructor.
new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "WhiteBox" );
// Add another GraphicObject to the main scene using the GraphicObject constructor, this time using the WhiteTriangle GraphicAsset.
let whiteTriangleGraphicObject = new GraphicObject( nc.graphicAssets.WhiteTriangle, nc.mainScene, "WhiteTriangle" );
// Update the position of the "WhiteTriangle", moving it 300 world units above and 300 world units to the right of the "WhiteBox".
whiteTriangleGraphicObject.position.x = 300;
whiteTriangleGraphicObject.position.y = 300;
SceneObject.scale
[type: Vector3] [default: new Vector3(1,1,1)]
The scale of this SceneObject relative to it's parent.
example:
// Objective: Using the scale property, increase the size of a GraphicObject.
// Expected Result: You will see a blue box in the center of the screen and a larger red box, now in the shape of a rectangle, to the right of it.
// Note: To use a custom graphic, add your image file to the assets directory and access it using nc.graphicAssets['MyImage']
// Add a GraphicObject to the main scene using the GraphicObject constructor.
let blueBox = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "BlueBox" );
// Use fillColor to make it blue.
blueBox.fillColor = new Color( 0, 0, 1, 1 ); // blue
// Add another GraphicObject to the main scene using the GraphicObject constructor.
let redBox = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "RedBox" );
// Use fillColor to make it red.
redBox.fillColor = new Color( 1, 0, 0, 1 ); // red
// Use position to move the red box to the right 500 world units.
redBox.position.x = 500;
// Use scale to make the red box a larger rectangle
redBox.scale.x = 2;
redBox.scale.y = 4;
SceneObject.rotation
[type: Vector3] [default: new Vector3(0,0,0)]
The rotation (in degrees) of this SceneObject relative to it's parent. Positive values correspond to counter-clockwise rotation around the given axis.
example:
// Objective: Create a SceneObject with a graphic and rotate it.
// Expected Result: The white box has rotated 45 degrees into a diamond shape.
// Create a SceneObject using the SceneObject constructor. This will add "MySceneObject" to the main scene.
let mySceneObject = new SceneObject( nc.mainScene, "MySceneObject" );
// Add a GraphicObject to the SceneObject using the GraphicObject constructor.
// Note: To use a custom graphic, add your image file to the assets directory and access it using nc.graphicAssets['MyImage']
new GraphicObject( nc.graphicAssets.WhiteBox, mySceneObject, "MyGraphicObject" );
// Rotate the SceneObject 45 degrees around the z axis.
mySceneObject.rotation.z = 45;
SceneObject.isEnabledWithInheritance
[type: boolean]
Boolean that reflects if the overall state of this SceneObject is 'enabled', incorporating the state of its anscesters.
example:
// Objective: Use isEnabledWithInheritance to determine the enabled value at various levels of the heirarchy.
// Expected Result: The console should have 2 log messages as follows:
// Top level scene object, enabled is true
// Bottom level scene object, enabled is false
// Create a SceneObject using the SceneObject constructor. This will add "MySceneObject" to the main scene.
let mySceneObject = new SceneObject( nc.mainScene, "MySceneObject" );
// Using the GraphicObject constructor, add a GraphicObject named "GraphicObject1" to the SceneObject.
let myGraphicObject1 = new GraphicObject( nc.graphicAssets.WhiteBox, mySceneObject, "GraphicObject1" );
// Using the GraphicObject constructor, add a GraphicObject named "GraphicObject2" to the GraphicObject myGraphicObject1 (GraphicObject1).
let myGraphicObject2 = new GraphicObject( nc.graphicAssets.WhiteTriangle, myGraphicObject1, "GraphicObject2" );
// Set myGraphicObject1 to enabled = false. ("GraphicObject1").
myGraphicObject1.enabled = false;
// Console log the isEnabledWithInheritance value of the top level SceneObject ("MySceneObject").
console.log("Top level scene object, enabled is", mySceneObject.isEnabledWithInheritance); // true
// Console log the isEnabledWithInheritance value of the bottom level SceneObject ("GraphicObject2").
console.log("Bottom level scene object, enabled is", myGraphicObject2.isEnabledWithInheritance); // false
SceneObject.hierarchyDepth
[type: number]
Number indicating how many ancesters this SceneObject has.
example:
// Objective: Retrieve the hierarchy depth of a SceneObject.
// Expected Result: The console log should read "myGraphicObject2 hierarchy depth is 3".
// Create a SceneObject using the SceneObject constructor. This will add "MySceneObject" to the main scene.
let mySceneObject = new SceneObject( nc.mainScene, "MySceneObject" );
// Using the GraphicObject constructor, add a GraphicObject named "GraphicObject1" to the SceneObject.
let myGraphicObject1 = new GraphicObject( nc.graphicAssets.WhiteBox, mySceneObject, "GraphicObject1" );
// Using the GraphicObject constructor, add a GraphicObject named "GraphicObject2" to the GraphicObject myGraphicObject1 (GraphicObject1).
let myGraphicObject2 = new GraphicObject( nc.graphicAssets.WhiteTriangle, myGraphicObject1, "GraphicObject2" );
// Console log the hierarchy depth of myGraphicObject2 ("GraphicObject2").
console.log("myGraphicObject2 hierarchy depth is", myGraphicObject2.hierarchyDepth);
SceneObject.layoutObject
[type: LayoutObject] [NON-INSTANTIABLE]
Object housing information about this particular SceneObject's LayoutObject functionality. LayoutObject functionality applies to SceneObjects that have been added as elements to a LayoutStack, which is responsible for organizing visual content (TextBoxes, Graphics, Buttons, etc...) into dynamic vertical or horizontal stacks. Until a SceneObject has been configured with LayoutObject functionality (either by calling 'SceneObject.configureLayoutObject' or by adding the SceneObject as an element to a LayoutStack), the 'SceneObject.layoutObject' member will be undefined.
example:
// Objective: Configure a layout object.
// Expected Result: The console should read "layout object width and height after configuration: 20 10".
// Create a SceneObject using the SceneObject constructor. This will add "MySceneObject" to the main scene.
this.mySceneObject = new SceneObject( nc.mainScene, "MySceneObject" );
// Add a callback function.
this.myCallback = function(args) {
// return a Vector2 with a width of 20 and a height of 10
return new Vector2( 20, 10 );
}
// Add a reference to a callback function passing the owner of the function and the function name.
this.mySceneObject.configureLayoutObject( this, "myCallback" );
console.log('layout object width and height after configuration:', this.mySceneObject.layoutObject.width, this.mySceneObject.layoutObject.height);
SceneObject.uiKeyboardNavigator
[type: UiKeyboardNavigator] [NON-INSTANTIABLE] [requires: module - extendedUi]
Object housing functionality that enables for keyboard navigation of this SceneObject's ui-related descendants. Keyboard navigation enables the end-user to press the tab, space, and enter keys to outline and trigger any 'uiKeyboardNavigable' descendants of the SceneObject owning this UiKeyboardNavigator when it is 'in focus' according to 'nc.singularFocusObject'. This property defaults to undefined, but can be enabled, by calling 'SceneObject.configureUiKeyboardNavigator()'.
SceneObject.uiKeyboardNavigable
[type: UiKeyboardNavigable] [NON-INSTANTIABLE] [requires: module - extendedUi]
Object housing functionality that enables for this SceneObject to be accessible via keyboard navigation. Keyboard navigation enables the end-user to press the arrow keys, tab, space, and enter keys to outline and trigger any 'uiKeyboardNavigable' SceneObjects within a UiKeyboardNavigator-enabled parent that is currently 'in focus' according to 'nc.singularFocusObject'. This property defaults to undefined, but can be enabled, by calling 'SceneObject.configureUiKeyboardNavigable()'.
SceneObject.uiVisualFocus
[type: UiVisualFocus] [NON-INSTANTIABLE] [requires: module - extendedUi]
Object housing functionality that enables for the SceneObject owning it to be 'visually focused', which focuses the end-user's attention the given SceneObject by placing it in front of a dimmer layer whenever the object is the the current 'singularFocusObject'. Calling 'configureUiVisualFocus' populates the 'uiVisualFocus' member for the owning SceneObject. It should be noted that the dimmer layer that the newly focused item is placed in front of is actually a button which, when pressed, calls the 'attemptExitUiVisualFocus' member of the current singularFocusObject if that member is defined.
SceneObject.snapToNearestWorldPosition
[type: boolean] [default: false]
Flag that determines if this SceneObject's global position is always snapped to the nearest integer (for x and y only). This property is mainly used to help provide pixel-perfect rendering for TextBoxes, see 'TextBox.useNearestPixelRendering' for more information.
SceneObject.focusFallback
[type: SceneObject] [default: nc.defaultFocusFallback]
Sets up a 'focus fallback' for this SceneObject. Once set, if 'nc.relinquishFocus' is called while this SceneObject is focused, then the fallback object will automatically become the new focused object.
SceneObject.customAddOns
[type: dictionary]
A dictionary of the CustomAddOns included on a given SceneObject. It should be noted that by default, each of the CustomAddOns are undefined, and that their member will be populated once they are added to a SceneObject in the Incisor inspector or directly through code.
SceneObject.excludeChildrenFromBlueprint
[type: boolean] [default: false]
Flag that determines if this SceneObject's children will be ignored during any 'gatherObjectBlueprint' calls. This flag should be set to true for objects that dynamically generate their own children objects so that those children are not mistakenly duplicated when a blueprint is used to reproduce a collection of objects. This flag general defaults to false, except with Construct instances and TextAssemblies, since those obects produce their own children on the fly. You would also want to set this flag to true if you are making a CustomObject that produces it's own children or a CustomAddOn that produces children within its owner.
SceneObject.localMatrix
[type: Matrix4] [default: Matrix4()]
Matrx4 representing the transformation of this SceneObject with respect to its parent. If 'localMatrixOverrideMode' is false, this is automatically calculated based on the position, rotation, and scale of the SceneObject.
SceneObject.worldMatrix
[type: Matrix4] [default: Matrix4()]
Matrx4 representing the transformation of the SceneObject with respect to the Scene that contains it. If 'worldMatrixOverrideMode' is false, this is automatically calculated by multiplying this SceneObject's parent's worldMatrix by this SceneObject's localMatrix. Because the same calculation is done for all ancestors, this Matrix4 accumulates the transformations of all ancestor SceneObjects.
SceneObject.localMatrixOverrideMode
[type: boolean] [default: false]
If true, this SceneObejct's localMatrix will no longer be automatically be updated to reflect the SceneObejct's position, rotation, and scale. This is useful if the localMatrix is being calculated manually, so automatic updates are undesired.
SceneObject.worldMatrixOverrideMode
[type: boolean] [default: false]
If true, this SceneObejct's worldMatrix will no longer be automatically be updated to reflect the transformations of itself and its ancestors. This is useful if the worldMatrix is being calculated manually, so automatic updates would interfere.
SceneObject.isDisposed
[type: boolean] [default: undefined]
Flag indicating if this SceneObject has been disposed. If the SceneObject has not been disposed, this property will be undefined.
SceneObject.fillColor
[type: Color]
The EffectController for the 'FillColor' EffectNode, which entirely fills the associated Geometry with the red, green, blue, and alpha color values provided. While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
SceneObject.colorMultiply
[type: Color]
The EffectController for the 'ColorMultiply' EffectNode, which multiplies the red, green, blue, and alpha color values of the Material it is applied to. While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
SceneObject.shapify
[type: shapify]
The EffectController for the 'Shapify' EffectNode. The Shapify EffectNode converts edge data stored in a 'shapified' Texture into a presentable image with edges that stay sharp regardless of the scale of the associated GraphicObject. This is an instance of a dynamically defined EffectController with base type 'Vector2'. To get a new instance, use "nc.effectControllers['shapify'].new()". While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
SceneObject.shear
[type: shear]
EffectController for the Shear EffectNode, which distorts the shape to appear slanted or skewed. This is an instance of a dynamically defined EffectController with base type 'Vector3'. To get a new instance, use "nc.effectControllers['shear'].new()". While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
SceneObject.shear_center
[type: Vector2]
EffectController for the Shear EffectNode, which distorts the shape to appear slanted or skewed. While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
SceneObject.enable()
[type: function]
Sets this SceneObject's 'enabled' value to true.
example:
// Objective: Call enable() on a previously disabled SceneObject.
// Expected Result: The console should have 2 log messages as follows:
// enabled state is false
// enabled state is true
// Create a SceneObject using the SceneObject constructor. This will add "MySceneObject" to the main scene.
this.mySceneObject = new SceneObject( nc.mainScene, "MySceneObject" );
// Add a callback function.
this.myCallback = function(args) {
console.log('enabled state is', args);
}
// Add a reference to a callback function passing the owner of the function and the function name.
this.mySceneObject.addEnabledStateChangeCallback( this, "myCallback" );
// Set the enabled state of mySceneObject to false.
this.mySceneObject.enabled = false;
// Call enable() on mySceneObject. This will fire an enabled state change callback.
this.mySceneObject.enable();
SceneObject.disable()
[type: function]
Sets this SceneObject's 'enabled' value to false.
example:
// Objective: Call disable() on a previously enabled SceneObject.
// Expected Result: The console should read "enabled state is false".
// Create a SceneObject using the SceneObject constructor. This will add "MySceneObject" to the main scene.
this.mySceneObject = new SceneObject( nc.mainScene, "MySceneObject" );
// Add a callback function.
this.myCallback = function(args) {
console.log('enabled state is', args);
}
// Add a reference to a callback function passing the owner of the function and the function name.
this.mySceneObject.addEnabledStateChangeCallback( this, "myCallback" );
// By default, the SceneObject is already enabled. Call disable() on mySceneObject. This will fire an enabled state change callback.
this.mySceneObject.disable();
SceneObject.addEnabledStateChangeCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback function to the list of callbacks that occur whenever the state of this SceneObject's 'enabled' property changes. The true/false enabled state is sent to the callback as its first paremeter, followed by any 'callbackArgs' provided.
SceneObject.addEnabledStateChangeCallback parameter: callbackOwner
[type: object]
The object owning the callback function that is called when this SceneObject's enabled state changes.
SceneObject.addEnabledStateChangeCallback parameter: callbackName
[type: string]
The name of the function that is called when this SceneObject's enabled state changes.
SceneObject.addEnabledStateChangeCallback parameter: callbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when this SceneObject's enabled state changes.
example:
// Objective: Add an 'Enabled State Change' callback.
// Expected Result: The console should have 2 log messages as follows:
// enabled state is false
// enabled state is true
// Create a SceneObject using the SceneObject constructor. This will add "MySceneObject" to the main scene.
this.mySceneObject = new SceneObject( nc.mainScene, "MySceneObject" );
// Add a callback function.
this.myCallback = function(args) {
console.log('enabled state is', args);
}
// Add a reference to a callback function passing the owner of the function and the function name.
this.mySceneObject.addEnabledStateChangeCallback( this, "myCallback" );
// Set mySceneObject to enabled = false. This will fire an enabled state change callback.
this.mySceneObject.enabled = false;
// Set mySceneObject to enabled = true. This will fire an enabled state change callback.
this.mySceneObject.enabled = true;
SceneObject.addUiZoomCallback(callbackOwner, callbackName, callbackArgs, additionalCallbackOrder)
[type: function]
Adds a callback for when this SceneObject encounters a change in uiZoom. This is similar to adding a callback to the general uiZoomChange AppEvent, but with the added benefit that these callbacks happen in hierarchy-depth order from greatest to least. This means that callbacks associated with an object having 7 ancestors will occur before that of an object with 2 ancestors. This hierarchy-depth sorting enables layout changes to happen in a way that works better with LazyUpdaters. The nc.uiZoom.totalZoom value is sent to the callback as its first paremeter, followed by any 'callbackArgs' provided.
SceneObject.addUiZoomCallback parameter: callbackOwner
[type: object]
The object owning the callback function that is called upon uiZoom change.
SceneObject.addUiZoomCallback parameter: callbackName
[type: string]
The name of the function that is called upon uiZoom change.
SceneObject.addUiZoomCallback parameter: callbackArgs
[type: Array, any] [optional]
Arguments for the function that is called upon uiZoom change.
SceneObject.addUiZoomCallback parameter: additionalCallbackOrder
[type: number] [default: 0] [optional]
An additional sorting value affecting when this callback will happen relative to other such callbacks associated with this SceneObject.
SceneObject.removeUiZoomCallback(callbackOwner, callbackName)
[type: function]
Removes the given callback.
SceneObject.removeUiZoomCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
SceneObject.removeUiZoomCallback parameter: callbackName
[type: string]
The name of the function.
SceneObject.removeEnabledStateChangeCallback(callbackOwner, callbackName)
[type: function]
Removes an 'enabledStateChange' callback.
SceneObject.removeEnabledStateChangeCallback parameter: callbackOwner
[type: object]
The object owning the callback function to remove.
SceneObject.removeEnabledStateChangeCallback parameter: callbackName
[type: string]
The name of the callback function to remove.
example:
// Objective: Add an 'Enabled State Change' callback.
// Expected Result: The console should have 2 log messages as follows:
// enabled state is false
// enabled state is true
// Create a SceneObject using the SceneObject constructor. This will add "MySceneObject" to the main scene.
this.mySceneObject = new SceneObject( nc.mainScene, "MySceneObject" );
// Add a callback function.
this.myCallback = function(args) {
console.log('enabled state is', args);
}
// Add a reference to a callback function passing the owner of the function and the function name.
this.mySceneObject.addEnabledStateChangeCallback( this, "myCallback" );
// Set mySceneObject to enabled = false. This will fire an enabled state change callback.
this.mySceneObject.enabled = false;
// Set mySceneObject to enabled = true. This will fire an enabled state change callback.
this.mySceneObject.enabled = true;
// Remove the reference to a callback function passing the owner of the function and the function name.
this.mySceneObject.removeEnabledStateChangeCallback( this, "myCallback" );
// Set mySceneObject to enabled = false. This will NO LONGER fire an enabled state change callback and no console message will be logged.
this.mySceneObject.enabled = false;
SceneObject.dispose()
[type: function]
Removes this SceneObject and its descendants from the hierarchy, and removes internal Incisor® references to aid memory management.
example:
// Objective: Call dispose() on a SceneObject.
// Expected Result: The console should have 2 log messages as follows:
// descendants before disposal 3
// after wait descendants after disposal 1
// Create a SceneObject using the SceneObject constructor. This will add "MySceneObject" to the main scene.
let mySceneObject = new SceneObject( nc.mainScene, "MySceneObject" );
// Using the GraphicObject constructor, add a GraphicObject named "GraphicObject1" to the SceneObject.
let myGraphicObject1 = new GraphicObject( nc.graphicAssets.WhiteBox, mySceneObject, "GraphicObject1" );
// Using the GraphicObject constructor, add a GraphicObject named "GraphicObject2" to myGraphicObject1.
let myGraphicObject2 = new GraphicObject( nc.graphicAssets.WhiteTriangle, myGraphicObject1, "GraphicObject2" );
// Using the GraphicObject constructor, add a GraphicObject named "GraphicObject3" to myGraphicObject2.
let myGraphicObject3 = new GraphicObject( nc.graphicAssets.WhiteTriangle, myGraphicObject2, "GraphicObject3" );
// Log the number of descendants of mySceneObject before calling dispose().
console.log( "descendants before disposal", mySceneObject.getDescendants().length );
// Call dispose() on myGraphicObject2.
myGraphicObject2.dispose();
// The call to dispose() can take some time to complete so lets wait 2 seconds before we log again.
// Create a callback function to log the descendants after calling dispose().
this.myWait = function() {
console.log( "after wait descendants after disposal", mySceneObject.getDescendants().length );
}
// Using nc.WaitThen, wait 2 seconds before attempting to log the descendants again.
nc.waitThen( 2, this, "myWait" );
SceneObject.addDisposalCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback function to the list of callbacks that occur when this SceneObject is disposed.
SceneObject.addDisposalCallback parameter: callbackOwner
[type: object]
The object owning the callback function that is called when this SceneObject is disposed.
SceneObject.addDisposalCallback parameter: callbackName
[type: string]
The name of the function that is called when this SceneObject is disposed.
SceneObject.addDisposalCallback parameter: callbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when this SceneObject is disposed.
example:
// Objective: Add a 'Disposal' callback.
// Expected Result: The console should read "disposal callback: myDisposalData".
// Create a SceneObject using the SceneObject constructor. This will add "MySceneObject" to the main scene.
this.mySceneObject = new SceneObject( nc.mainScene, "MySceneObject" );
// Add a callback function.
this.myCallback = function(args) {
console.log('disposal callback:', args);
}
// Add a reference to a callback function passing the owner of the function, the function name, and any additional data we want.
this.mySceneObject.addDisposalCallback( this, "myCallback", ["myDisposalData"] );
// Call dispose() on mySceneObject. This will fire a disposal callback.
this.mySceneObject.dispose();
SceneObject.removeDisposalCallback(callbackOwner, callbackName)
[type: function]
Removes the given callback function from the list of callbacks that occur when this SceneObject is disposed.
SceneObject.removeDisposalCallback parameter: callbackOwner
[type: object]
The object owning the callback function that is called when this SceneObject is disposed.
SceneObject.removeDisposalCallback parameter: callbackName
[type: string]
The name of the function that is called when this SceneObject is disposed.
SceneObject.addRenderCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback function to the list of callbacks that occur when this SceneObject is 'rendered'.
SceneObject.addRenderCallback parameter: callbackOwner
[type: object]
The object owning the callback function that is called when this SceneObject is rendered.
SceneObject.addRenderCallback parameter: callbackName
[type: string]
The name of the function that is called when this SceneObject is rendered.
SceneObject.addRenderCallback parameter: callbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when this SceneObject is rendered.
SceneObject.removeRenderCallback(callbackOwner, callbackName)
[type: function]
Removes the given callback function.
SceneObject.removeRenderCallback parameter: callbackOwner
[type: object]
The object owning the callback function.
SceneObject.removeRenderCallback parameter: callbackName
[type: string]
The name of the function.
SceneObject.setParent(parent, maintainGlobalPosition)
[type: function]
Makes this SceneObject the child of the given SceneObject in the hierachy.
SceneObject.setParent parameter: parent
[type: SceneObject]
The SceneObject that will become this SceneObject's new parent.
SceneObject.setParent parameter: maintainGlobalPosition
[type: boolean] [default: false] [optional]
Boolean determining if the global position, scale, and rotation should be preserved during the change in hierarchy. Note that this preservation is not always possible during a parent change.
example:
// Objective: Set the parent of a SceneObject
// Expected Result: The console should have 2 log messages as follows:
// GraphicObjectChild's parent is GraphicObjectA
// GraphicObjectChild's parent is now GraphicObjectB
// Create a GraphicObject using the GraphicObject constructor. Name it "GraphicObjectA".
let graphicObjectA = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "GraphicObjectA" );
// Create a second GraphicObject using the GraphicObject constructor. Name it "GraphicObjectB".
let graphicObjectB = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "GraphicObjectB" );
// Create a third GraphicObject using the GraphicObject constructor. This time, make its parent graphicObjectA. Name it "GraphicObjectChild".
let graphicObjectChild = new GraphicObject( nc.graphicAssets.WhiteBox, graphicObjectA, "GraphicObjectChild" );
// Console log the parent.
console.log("GraphicObjectChild's parent is", graphicObjectChild.parent.name);
// Set the parent to graphicObjectB.
graphicObjectChild.setParent( graphicObjectB );
// Console log the parent.
console.log("GraphicObjectChild's parent is now", graphicObjectChild.parent.name);
SceneObject.getAncestors()
[type: function] [returns: [SceneObject]]
Returns a list of this SceneObject's ancesters.
example:
// Objective: Get the ancestors of a SceneObject.
// Expected Result: The console should have 2 log messages as follows:
// myGraphicObject3 ancestors count 4
// myGraphicObject1 ancestors count 2
// Create a SceneObject using the SceneObject constructor. This will add "MySceneObject" to the main scene.
let mySceneObject = new SceneObject( nc.mainScene, "MySceneObject" );
// Using the GraphicObject constructor, add a GraphicObject named "GraphicObject1" to the SceneObject.
let myGraphicObject1 = new GraphicObject( nc.graphicAssets.WhiteBox, mySceneObject, "GraphicObject1" );
// Using the GraphicObject constructor, add a GraphicObject named "GraphicObject2" to the GraphicObject myGraphicObject1 (GraphicObject1).
let myGraphicObject2 = new GraphicObject( nc.graphicAssets.WhiteTriangle, myGraphicObject1, "GraphicObject2" );
// Using the GraphicObject constructor, add a GraphicObject named "GraphicObject3" to the GraphicObject myGraphicObject2 (GraphicObject2).
let myGraphicObject3 = new GraphicObject( nc.graphicAssets.WhiteTriangle, myGraphicObject2, "GraphicObject3" );
// Console log the ancestors count.
console.log( "myGraphicObject3 ancestors count", myGraphicObject3.getAncestors().length );
console.log( "myGraphicObject1 ancestors count", myGraphicObject1.getAncestors().length );
SceneObject.getDescendants(enabledOnly, includeEnclosedScenes)
[type: function] [returns: [SceneObject]]
Returns a list of this SceneObject's descendants.
SceneObject.getDescendants parameter: enabledOnly
[type: boolean] [default: true] [optional]
Boolean determining if only enabled SceneObjects are added to the returned list.
SceneObject.getDescendants parameter: includeEnclosedScenes
[type: boolean] [optional]
Boolean determining if sub-descendants of ScrollingPanels' Scenes will be included in the returned list. [DAFAULT: false]
example:
// Objective: Get the descendants of a SceneObject.
// Expected Result: The console should have 2 log messages as follows:
// myGraphicObject3 descendants count 0
// myGraphicObject1 descendants count 2
// Create a SceneObject using the SceneObject constructor. This will add "MySceneObject" to the main scene.
let mySceneObject = new SceneObject( nc.mainScene, "MySceneObject" );
// Using the GraphicObject constructor, add a GraphicObject named "GraphicObject1" to the SceneObject.
let myGraphicObject1 = new GraphicObject( nc.graphicAssets.WhiteBox, mySceneObject, "GraphicObject1" );
// Using the GraphicObject constructor, add a GraphicObject named "GraphicObject2" to the GraphicObject myGraphicObject1 (GraphicObject1).
let myGraphicObject2 = new GraphicObject( nc.graphicAssets.WhiteTriangle, myGraphicObject1, "GraphicObject2" );
// Using the GraphicObject constructor, add a GraphicObject named "GraphicObject3" to the GraphicObject myGraphicObject2 (GraphicObject2).
let myGraphicObject3 = new GraphicObject( nc.graphicAssets.WhiteTriangle, myGraphicObject2, "GraphicObject3" );
// Console log the descendants count.
console.log( "myGraphicObject3 descendants count", myGraphicObject3.getDescendants().length );
console.log( "myGraphicObject1 descendants count", myGraphicObject1.getDescendants().length );
SceneObject.getGlobalPosition(returnVector3)
[type: function] [returns: Vector3]
Returns a Vector3 with the global position of this SceneObject within the Scene.
SceneObject.getGlobalPosition parameter: returnVector3
[type: Vector3] [optional]
Optional Vector3 that can be supplied to avoid the generation of a new Vector3 object for efficiency.
example:
// Objective: Get the global position of a SceneObject.
// Expected Result: 'InnerSceneObject' global position x,y 200 200
// Create a new Scene and name it "MyScene".
let myScene = new Scene("MyScene");
// Create a SceneObject using the SceneObject constructor. This will add "OuterSceneObject" to "MyScene".
let outerSceneObject = new SceneObject( myScene, "OuterSceneObject" );
// Create a SceneObject using the SceneObject constructor. This will add "InnerSceneObject" to "OuterSceneObject".
let innerSceneObject = new SceneObject( outerSceneObject, "InnerSceneObject" );
// Update the position of the outerSceneObject, moving it up and to the right, 100 world units.
outerSceneObject.position.x = 100;
outerSceneObject.position.y = 100;
// Update the position of the innerSceneObject, moving it up and to the right, 100 world units.
innerSceneObject.position.x = 100;
innerSceneObject.position.y = 100;
// Console log the x and y of mySceneObject using getGlobalPosition().
console.log( "'InnerSceneObject' global position x,y", innerSceneObject.getGlobalPosition().x, innerSceneObject.getGlobalPosition().y );
SceneObject.swoopGlobalPosition(endValues, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs, pauseImmunity, speedControl)
[type: function] [returns: Swooper]
Swoops this SceneObject's position using global coordinates.
SceneObject.swoopGlobalPosition parameter: endValues
[type: [number]]
The array of target global position values [x,y,z].
SceneObject.swoopGlobalPosition parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation in seconds.
SceneObject.swoopGlobalPosition parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
SceneObject.swoopGlobalPosition parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
SceneObject.swoopGlobalPosition parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
SceneObject.swoopGlobalPosition parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
SceneObject.swoopGlobalPosition parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
SceneObject.swoopGlobalPosition parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
example:
// Objective: "Swoop" the position of the white box.
// Expected Result: The white box moves up and to the right, 300 world units, over a duration of 10 seconds.
// Add a GraphicObject to the main scene using the GraphicObject constructor.
let whiteBox = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "WhiteBox" );
// Call swoopGlobalPosition() giving it the array of x,y,z values to swoop to over a duration of 10 seconds.
whiteBox.swoopGlobalPosition( [300,300,0], 10 );
SceneObject.getGlobalScale(returnVector3)
[type: function] [returns: Vector3]
Returns a Vector3 with the global scale of this SceneObject within the Scene.
SceneObject.getGlobalScale parameter: returnVector3
[type: Vector3] [optional]
Optional Vector3 that can be supplied to avoid the generation of a new Vector3 object for efficiency.
example:
// Objective: Get the global scale of a SceneObject.
// Expected Result: The console should read "scale x,y 2 2.
// Add a GraphicObject to the main scene using the GraphicObject constructor.
let whiteBox = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "WhiteBox" );
// Use scale to make the "WhiteBox" twice as large
whiteBox.scale.x = 2;
whiteBox.scale.y = 2;
console.log( "scale x,y", whiteBox.getGlobalScale().x, whiteBox.getGlobalScale().y );
SceneObject.swoopGlobalScale(endValues, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs, pauseImmunity, speedControl)
[type: function] [returns: Swooper]
Swoops this SceneObject's scale using global coordinates.
SceneObject.swoopGlobalScale parameter: endValues
[type: [number]]
The array of target global scale values [x,y,z].
SceneObject.swoopGlobalScale parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation.
SceneObject.swoopGlobalScale parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
SceneObject.swoopGlobalScale parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
SceneObject.swoopGlobalScale parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
SceneObject.swoopGlobalScale parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
SceneObject.swoopGlobalScale parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
SceneObject.swoopGlobalScale parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
example:
// Objective: "Swoop" the scale of the white box.
// Expected Result: The white box expands to 5 times its original size over a duration of 10 seconds.
// Add a GraphicObject to the main scene using the GraphicObject constructor.
let whiteBox = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "WhiteBox" );
// Call swoopGlobalScale() giving it the array of x,y,z values to expand to over a duration of 10 seconds.
whiteBox.swoopGlobalScale( [5,5,0], 10 );
SceneObject.getViewPosition(camera, returnVector3)
[type: function] [returns: Vector3]
Returns a Vector3 containing the coordinates for this SceneObject within the given Camera's view area. The camera's view area bounds are confined to x within [-.5, .5] and y within [-.5, .5] where -.5 corresponds to left and bottom.
SceneObject.getViewPosition parameter: camera
[type: Camera] [default: nc.mainCamera]
The Camera to 'look through' when obtaining the view position of this SceneObject.
SceneObject.getViewPosition parameter: returnVector3
[type: Vector3] [optional]
Optional Vector3 that can be supplied to avoid the generation of a new Vector3 object for efficiency.
example:
// Objective: Get the view position of a SceneObject within a Camera's view area
// Expected Result: The console should have 2 log messages that look something like the following:
// 'MyGraphicObject' view position x,y 0.030978934324659233 0
// 'MyGraphicObject' view position x,y 0.061957868649318466 0
//
// NOTE: Because view position is relative to the Camera's view area, your x value will depend on the resolution of your screen.
// Try resizing your screen and running the test again. You will notice your x value has changed.
//
// Using the GraphicObject constructor, add a GraphicObject named "MyGraphicObject" to the main scene
let myGraphicObject = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "MyGraphicObject" );
// Update the x position of myGraphicObject, moving it to the right 100 world units.
myGraphicObject.position.x = 100;
// Console log the x and y of "MyGraphicObject" using getViewPosition().
console.log( "'MyGraphicObject' view position x,y", myGraphicObject.getViewPosition().x, myGraphicObject.getViewPosition().y );
// Update the x position of myGraphicObject again, moving it to the right 200 world units.
myGraphicObject.position.x = 200;
// Console log the x and y of "MyGraphicObject" using getViewPosition().
console.log( "'MyGraphicObject' view position x,y", myGraphicObject.getViewPosition().x, myGraphicObject.getViewPosition().y );
SceneObject.getGlobalRotation(returnVector3)
[type: function] [returns: Vector3]
Returns a Vector3 with the global rotation of this SceneObject within the Scene.
SceneObject.getGlobalRotation parameter: returnVector3
[type: Vector3] [optional]
Optional Vector3 that can be supplied to avoid the generation of a new Vector3 object for efficiency.
SceneObject.swoopGlobalRotation(endValues, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs, pauseImmunity, speedControl)
[type: function] [returns: Swooper]
Swoops this SceneObject's rotation using global coordinates.
SceneObject.swoopGlobalRotation parameter: endValues
[type: [number]]
The array of target global scale values [x,y,z].
SceneObject.swoopGlobalRotation parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation.
SceneObject.swoopGlobalRotation parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
SceneObject.swoopGlobalRotation parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
SceneObject.swoopGlobalRotation parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
SceneObject.swoopGlobalRotation parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
SceneObject.swoopGlobalRotation parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
SceneObject.swoopGlobalRotation parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
SceneObject.setEffectNodes(effectNodes, alsoSetDescendants)
[type: function]
Sets the EffectNodes for the Materials associated with this SceneObject. EffectNodes are GPU-driven visual effects assigned to SceneObjects, GraphicObjects, and ultimately Materials. Each EffectNode can be manipulated dynamically by one or more EffectControllers, which are accessable as direct members of the given SceneObject or Material. When a GraphicObject is set to a particular GraphicAsset, it's Materials adopt the GraphicAsset's EffectNode and EffectController presets by default, but they can be customized at any time.
SceneObject.setEffectNodes parameter: effectNodes
[type: [EffectNode], EffectNode]
The new list of EffectNodes that will apply to the Materials associated with this SceneObject.
SceneObject.setEffectNodes parameter: alsoSetDescendants
[type: boolean] [default: true] [optional]
Boolean determining if this SceneObject's descendants' Materials will also adopt the provided list of EffectNodes.
SceneObject.addEffectNodes(effectNodes, alsoAddToDescendants)
[type: function]
Adds the given EffectNodes to the Materials associated with this SceneObject. EffectNodes are GPU-driven visual effects assigned to SceneObjects, GraphicObjects, and ultimately Materials. Each EffectNode can be manipulated dynamically by one or more EffectControllers, which are accessable as direct members of the given SceneObject or Material. When a GraphicObject is set to a particular GraphicAsset, it's Materials adopt the GraphicAsset's EffectNode and EffectController presets by default, but they can be customized at any time.
SceneObject.addEffectNodes parameter: effectNodes
[type: [EffectNode], EffectNode]
The EffectNodes to add to this SceneObject and its Materials.
SceneObject.addEffectNodes parameter: alsoAddToDescendants
[type: boolean] [default: true] [optional]
Boolean determining if the given EffectNodes will also be added to the SceneObject's descendants' Materials.
SceneObject.setLayers(layer, sceneObjectList)
[type: function]
Sets the Layers of all of the GraphicObject descendants of this SceneObject to the supplied Layer.
SceneObject.setLayers parameter: layer
[type: Layer]
The layer to change this SceneObject's descendants to.
SceneObject.setLayers parameter: sceneObjectList
[type: [SceneObject]] [optional]
Optional list designating exactly which decendants to set the layers for. If left undefined, all GraphicObject descendants' layers will be updated.
example:
// Objective: Swap the position of GraphicObjects using setLayers().
// Action: Click the white triangle Button to swap the layering of the red and white boxes.
// Expected Result: Upon clicking the white triangle Button, the red and white boxes will swap positions.
// Start by creating 2 different GraphicObjects, red and white.
let redBox = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "RedBox" );
redBox.fillColor = new Color( 1,0,0,1 ); // make the white box red
let whiteBox = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "WhiteBox" );
// Offset the White Box, 25 world units, down and to the right.
whiteBox.position.x = 25;
whiteBox.position.y = -25;
// Define a new Layer named "LayerA" and set the red box to "LayerA".
nc.defineLayer( "LayerA", nc.mainScene );
redBox.layer = nc.layers.LayerA;
// Define a new Layer named "LayerB" and set the white box to "LayerB".
nc.defineLayer( "LayerB", nc.mainScene );
whiteBox.layer = nc.layers.LayerB;
// Using the nc factory method, create a white triangle button to handle the action of swapping layers.
let button = nc.addButton( nc.graphicAssets.WhiteTriangle, nc.mainScene, "MyButton" );
button.position.x = -120; // offset the button to the left
// Add a button callback function.
this.mySwapCallback = function(args) {
// Swap the red and white Layers of the boxes.
if ( redBox.layer === nc.layers.LayerA ) {
redBox.setLayers( nc.layers.LayerB );
whiteBox.setLayers( nc.layers.LayerA );
} else {
redBox.setLayers( nc.layers.LayerA );
whiteBox.setLayers( nc.layers.LayerB );
}
}
// Add a reference to a callback function passing the owner of the function and the function name.
button.addReleaseCallback( this, "mySwapCallback" );
SceneObject.setSubLayers(subLayer, sceneObjectList)
[type: function]
Sets the SubLayer values of all of the GraphicObject descendants of this SceneObject to the supplied subLayer value.
SceneObject.setSubLayers parameter: subLayer
[type: Layer]
The subLayer to change this SceneObject's descendants to.
SceneObject.setSubLayers parameter: sceneObjectList
[type: [SceneObject]] [optional]
Optional list designating exactly which decendants to set the layers for. If left undefined, all GraphicObject descendants' layers will be updated.
SceneObject.configureLayoutObject(refreshLayoutCallbackOwner, refreshLayoutCallbackName, refreshLayoutCallbackArgs)
[type: function]
Function to configure the SceneObject with LayoutObject functionality, which prepares it to be added as an element to a LayoutStack. Once configured, the configuration information can be found (and adjusted if necessary) in the SceneObject.layoutObject. Most SceneObject-inheriting objects have standard LayoutObject functionality that is automatically configured when they are added as elements to a LayoutStack, so this method is mainly for creating custom LayoutObject functionality. Configuration consists of supplying a callback to a user-defined function that refreshes the layout of the SceneObject in question and returns a Vector2 containing the resulting dimensions.
SceneObject.configureLayoutObject parameter: refreshLayoutCallbackOwner
[type: object]
The object owning the callback function that is called by the LayoutStack containing this LayoutObject when the layout is refreshed.
SceneObject.configureLayoutObject parameter: refreshLayoutCallbackName
[type: string]
The name of the callback function that is called by the LayoutStack containing this LayoutObject when the layout is refreshed.
SceneObject.configureLayoutObject parameter: refreshLayoutCallbackArgs
[type: Array, any]
Arguments for the callback function that is called by the LayoutStack containing this LayoutObject when the layout is refreshed.
example:
// Objective: Configure a layout object.
// Expected Result: The console should read "layout object width and height after configuration: 20 10".
// Create a SceneObject using the SceneObject constructor. This will add "MySceneObject" to the main scene.
this.mySceneObject = new SceneObject( nc.mainScene, "MySceneObject" );
// Add a callback function.
this.myCallback = function(args) {
// return a Vector2 with a width of 20 and a height of 10
return new Vector2( 20, 10 );
}
// Add a reference to a callback function passing the owner of the function and the function name.
this.mySceneObject.configureLayoutObject( this, "myCallback" );
console.log('layout object width and height after configuration:', this.mySceneObject.layoutObject.width, this.mySceneObject.layoutObject.height);
SceneObject.configureUiKeyboardNavigator()
[type: function]
Function to configure the SceneObject with UiKeyboardNavigator functionality, which enables the end-user to press the tab, space, and enter keys to outline and trigger any 'uiKeyboardNavigable' descendants of the SceneObject owning this UiKeyboardNavigator when it is 'in focus' according to 'nc.singularFocusObject'. Calling 'configureUiKeyboardNavigator' populates the 'uiKeyboardNavigator' member for the owning SceneObject.
SceneObject.configureUiKeyboardNavigable(setOutlineCallbackOwner, setOutlineCallbackName, triggerCallbackOwner, triggerCallbackName)
[type: function]
Function to configure the SceneObject with UiKeyboardNavigable functionality, which enables the end-user access the SceneObject using keyboard navigation. Calling 'configureUiKeyboardNavigable' populates the 'uiKeyboardNavigable' member for the owning SceneObject.
SceneObject.configureUiKeyboardNavigable parameter: setOutlineCallbackOwner
[type: object]
The owner of the callback that occurs whenever keyboard navigation changes the 'outline' state of the UiKeyboardNavigable object. The outline state will be sent to the callback as its first parameter.
SceneObject.configureUiKeyboardNavigable parameter: setOutlineCallbackName
[type: string]
The name of the callback that occurs whenever keyboard navigation changes the 'outline' state of the UiKeyboardNavigable object. The outline state will be sent to the callback as its first parameter.
SceneObject.configureUiKeyboardNavigable parameter: triggerCallbackOwner
[type: object]
The owner of the callback that occurs whenever keyboard navigation triggers the UiKeyboardNavigable object via the spacebar or enter keys.
SceneObject.configureUiKeyboardNavigable parameter: triggerCallbackName
[type: string]
The name of the callback that occurs whenever keyboard navigation triggers the UiKeyboardNavigable object via the spacebar or enter keys
SceneObject.configureUiVisualFocus()
[type: function]
Function to configure the SceneObject with UiVisualFocus functionality, which focuses the end-user's attention on the given SceneObject by placing it in front of a dimmer layer whenever the object is the the current 'singularFocusObject'. Calling 'configureUiVisualFocus' populates the 'uiVisualFocus' member for the owning SceneObject. It should be noted that the dimmer layer that the newly focused item is placed in front of is actually a button which, when pressed, calls the 'attemptExitUiVisualFocus' member of the current singularFocusObject if that member is defined.
SceneObject.updateWorldMatrix(updateAncestors, updateDescendants)
[type: function]
The worldMatrix is normally updated during scene traversal for rendering. If an updated worldMatrix is needed before then, this function forces the worldMatrix to be updated.
SceneObject.updateWorldMatrix parameter: updateAncestors
[type: boolean] [default: false] [optional]
If true, the world matrices of all ancestors whose 'worldMatrixOverrideMode' is false will first be updated. This is useful if the worldMatrix is being updated to account for an ancestor's transformation changing.
SceneObject.updateWorldMatrix parameter: updateDescendants
[type: boolean] [default: false] [optional]
If true, the world matrices of all descendants whose 'worldMatrixOverrideMode' is false with also be updated. This is useful if the world matrices of descendants need to immediately account for this SceneObejct's updated worldMatrix.
----------------------------------------------------------
Section 105: Scene
----------------------------------------------------------
Scene
[type: class] [extends: SceneObject]
A Scene is a root SceneObject in the hierarchy. All SceneObjects are either Scenes or descendants of Scenes.
Scene.layerOrderLedger
[type: [string]]
A read-only list of this Scene's layer names in order from back to front.
Scene.defineLayer(name, placeBehindThisLayer)
[type: function] [returns: Layer]
Defines a new Layer within this Scene. For a list of all Layers within all Scenes, see 'nc.layers'. For a list of all Layers within specific Scenes, see 'nc.layersByScene'.
Scene.defineLayer parameter: name
[type: string]
The name of the new Layer.
Scene.defineLayer parameter: placeBehindThisLayer
[type: Layer] [default: nc.layers.DefaultLayer] [optional]
Supply this optional Layer, and the newly defined Layer will be populated behind the provided Layer.
----------------------------------------------------------
Section 106: Layer
----------------------------------------------------------
Layer
[type: class] [NON-INSTANTIABLE]
Object representing a rendering order group. The 'GraphicObject.layer' property can assigned to specific Layers to manipulate the render order of the given GraphicObject. Use 'Scene.defineLayer' to add a new Layer to a Scene. To manipulate the render order of GraphicObjects within the same Layer, see the 'GraphicObject.subLayer' property.
Layer.type
[type: string]
The type identifier.
Layer.name
[type: string]
The name of the Layer
----------------------------------------------------------
Section 107: LayersByScene
----------------------------------------------------------
LayersByScene
[type: class] [NON-INSTANTIABLE]
Dictionary of Dictionaries of Layers per Scene.
LayersByScene."MainScene"
[type: LayersInScene0]
Dictionary of Layers in the 'MainScene' Scene.
----------------------------------------------------------
Section 108: ScrollingPanel
----------------------------------------------------------
ScrollingPanel
[type: class] [extends: CursorInputOverrideButton]
A ScrollingPanel is a specialized GraphicObject with a Scene that it renders to its RenderTarget/Texture. The Cameara that renders the Scene is the 'view window' into the Scene in question, and if the content from the Scene is larger than the Camera's bounds, then scroll pills appear, and the end-user can navigate around the Scene by scrolling. Within the Scene, a LayoutStack manages the layout of the contained content an informs the ScrollingPanel of the contents' size.
ScrollingPanel.scene
[type: Scene]
The Scene where the content in this ScrollingPanel resides.
ScrollingPanel.bodyStack
[type: LayoutStack]
The LayoutStack that manages the content in this ScrollingPanel. In order for any content to be properly recognized by this ScrollingPanel, it must be added to the LayoutStack using 'ScrollingPanel.layoutStack.addElements'
ScrollingPanel.camera
[type: OrthographicCamera]
The Camera that renders the 'view window' of this ScrollingPanel to it's RenderTarget/Texture.
ScrollingPanel.renderTarget
[type: RenderTarget]
The RenderTarget that this ScrollingPanel is rendered to.
ScrollingPanel.width
[type: number] [default: 500]
The width of the ScrollingPanel. This also informs the width of the Camera's view area within the Scene.
ScrollingPanel.height
[type: number] [default: 500]
The height of the ScrollingPanel. This also informs the height of the Camera's view area within the Scene.
ScrollingPanel.dragPanelToScroll
[type: boolean] [default: true]
Flag determining if the end-user can scroll by dragging anywhere within the ScrollingPanel. If false, the user can still Scroll using the standard mouse/trackpad methods, or by dragging the scroll pills.
ScrollingPanel.dragPanelMomentum
[type: boolean] [default: true]
Flag determining if the scrolling motion maintains momentum when the end-user 'flings' their finger across the ScrollPanel (if 'dragPanelToScrol=true').
ScrollingPanel.panelDragMomentumDecay
[type: number] [default: 0.9]
Value that multiplies the momentum speed of the ScrollingPanel (if applicable) each fixedUpdate, causing the 'flung' scrolling to slow down eventually.
ScrollingPanel.scrollPillVertical
[type: UiPanel]
A UiPanel/Button that can be dragged up and down to control the vertical scroll of this ScrollingPanel. The scroll pills are children of the ScrollingPanel, and are not within the ScrollingPanel's Scene.
ScrollingPanel.scrollPillHorizontal
[type: UiPanel]
A UiPanel/Button that can be dragged left and right to control the horizontal scroll of this ScrollingPanel. The scroll pills are children of the ScrollingPanel, and are not within the ScrollingPanel's Scene.
ScrollingPanel.scrollPillThickness
[type: number] [default: nc.uiStyle.spacer_medium]
Width of the verticalScrollPill and height of the horizontalScrollPill. This value will be automatically adjusted down if it is more than 25% of the width or height of this ScrollingPanel.
ScrollingPanel.scrollPillShapeRatio
[type: number] [default: 3]
Number determining the length to width ratio of the scroll pills. This value will be automatically adjusted down if it results in a scroll pill that is longer than 50% of its range of motion.
ScrollingPanel.scrollPillColor
[type: Color]
The Color of the scroll pills.
ScrollingPanel.scrollPillHighlightColor
[type: Color]
The Color of the scroll pills when highlighted. The 'alpha' value from this color is disregarded.
ScrollingPanel.scrollPillOpacity
[type: number]
The baseline opacity of the scroll pills.
ScrollingPanel.scrollAmountVertical
[type: number]
The current vertical scroll amount ranging from 0 to 1.
ScrollingPanel.scrollAmountHorizontal
[type: number]
The current horizontal scroll amount ranging from 0 to 1.
ScrollingPanel.scrollPillFadeDelay
[type: number] [default: 1.2]
The number of seconds (since the latest scrolling activity) before the scroll pills will fade away. The pills will re-appear upon new scroll activity. Set this value to 0 to make the scroll pills never fade away.
ScrollingPanel.pivotPoint
[type: Vector2] [default: new Vector2(-.5,.5)]
The pivot point of the ScrollingPanel.
ScrollingPanel.useNearestPixelRendering
[type: boolean] [default: false]
A ScrollingPanel is ultimately a 'pre-rendered' Scene that is positioned in the outer Scene and then rendered again. Because of this, certain canvas sizes or TextBox positioning can lead to slightly blurrier rendering that can be noticable for finer detail. Calling this function can mitigate such fine-detail-blurriness, as it sets the downscalingMode and upscalingMode to 'nearest', and sets the 'snapToNearestWorldPosition' to true. These settings help to ensure that the ScrollingPanel texture pixels are always aligned with the canvas pixels, preserving the original crispy edges. The tradeoff with using this mode is that the position of text will appear to always snap to the nearest pixel, which can lead to jerky-looking movement at slow speeds, and also rotation and other transformations will tear badly.
ScrollingPanel.uiZoomAffectsPanelSize
[type: boolean] [default: true]
Boolean determining if uiZoom affects the affective view size of the ScrollingPanel.
ScrollingPanel.popToOuterSceneAndMaintainPosition(sceneObject)
[type: function]
Re-parents a descendant of the ScrollingPanel Scene to the SceneContaining the ScrollingPanel itself while maintaining visual global position.
ScrollingPanel.popToOuterSceneAndMaintainPosition parameter: sceneObject
[type: SceneObject]
The SceneObject to move from the ScrollingPanel Scene to the Scene that contains the ScrollingPanel.
ScrollingPanel.getOuterScenePosition(sceneObject)
[type: function]
Returns a Vector3 corresponding to the global position of a SceneObject residing in the ScrollingPanel Scene, but from the context of the 'outer' Scene which contains the ScrollingPanel itself. This can be used to align something in the 'outer' Scene with something inside the ScrollingPanel Scene.
ScrollingPanel.getOuterScenePosition parameter: sceneObject
[type: SceneObject]
The SceneObject within the ScrollingPanel Scene to get the position of.
ScrollingPanel.scrollToObject(sceneObject, width, height, widthBuffer, heightBuffer)
[type: function]
Scrolls the ScrollingPanel so that the given SceneObject is visible within its Camera's viewing area. Dimensions, and buffer values can be supplied to ensure that the entire SceneObject is made visible upon calling this function.
ScrollingPanel.scrollToObject parameter: sceneObject
[type: SceneObject]
The SceneObject to scroll to.
ScrollingPanel.scrollToObject parameter: width
[type: number] [default: 0] [optional]
The width of the SceneObject can be supplied here to help ensure that the entire object is visible within the Camera's viewing area. If the SceneObject has a configured LayoutObject, then this parameter can be left undefined, and the LayourObject's width will automatically be applied.
ScrollingPanel.scrollToObject parameter: height
[type: number] [default: 0] [optional]
The height of the SceneObject can be supplied here to help ensure that the entire object is visible within the Camera's viewing area. If the SceneObject has a configured LayoutObject, then this parameter can be left undefined, and the LayourObject's height will automatically be applied.
ScrollingPanel.scrollToObject parameter: widthBuffer
[type: number] [default: 0] [optional]
A buffer can be supplied here to ensure that the scrolling results in the SceneObject being visible with X amount of room to spare.
ScrollingPanel.scrollToObject parameter: heightBuffer
[type: number] [default: 0] [optional]
A buffer can be supplied here to ensure that the scrolling results in the SceneObject being visible with Y amount of room to spare.
----------------------------------------------------------
Section 109: SlotReel
----------------------------------------------------------
SlotReel
[type: class] [extends: SceneObject] [requires: module - slotReels, license - proGaming]
A specialized SceneObject which populates and manipulates 'symbol' objects to create a spinning reel to be used for slot games. The 'spinning' effect is created by moving each GraphicObject along a modulus-style path, where the represented symbol changes when each GraphicObject reaches the 'jump' point in the path. The symbols can be customized by supplying a CustomObjectDefinition or CustomAddOnDefinition, which will be used in the population of each symbol.
SlotReel.defaultSymbolPathTravelY
[type: number] [default: 200]
If no 'symbolPathConstructDefinition' is connected to this SlotReel, then the defaultSymbolPathTravelX and defaultSymbolPathTravelY define the spinning motion of this SlotReel. The defaultSymbolPathTravelY value determines the amount of vertical travel per 'symbolPosition'. The symbolPosition property value is populated by the SlotReel as the symbols move, and it corresponds to each symbol's location along the symbol path, where a value of 0 corresponds to the center of the first main visible symbol, 1 corresponds to the next main visible symbol, and -1 corresponds to the top buffer symbol just above the symbol in position 0. So, the default value of 200 for this property means that each symbol will be 200 vertical world units from the next.
SlotReel.defaultSymbolPathTravelX
[type: number]
If no 'symbolPathConstructDefinition' is connected to this SlotReel, then the defaultSymbolPathTravelX and defaultSymbolPathTravelY define the spinning motion of this SlotReel. The defaultSymbolPathTravelX value determines the amount of horizontal travel per 'symbolPosition'. The symbolPosition property value is populated by the SlotReel as the symbols move, and it corresponds to each symbol's location along the symbol path, where a value of 0 corresponds to the center of the first main visible symbol, 1 corresponds to the next main visible symbol, and -1 corresponds to the top buffer symbol just above the symbol in position 0. So, the default value of 0 for this property means that each symbol does not travel horizontally as it moves along the symbol path.
SlotReel.spinSpeed
[type: number] [default: -0.25]
The spinSpeed property represents the rate of motion for each symbol object during the reel spin. The value corresponds to the amount of travel per 60th of a second, where a value of 1 indicates that each symbol will move one full symbol position each 60th of a second.
SlotReel.windupMotionFunctionOwner
[type: object]
The owner of the function that defines this SlotReel's motion during the 'windup' state. The windup motion for this SlotReel can be customized by providing a bespoke function here. The windup function should take 2 numeric parameters (progress and windupMagnitude), and return a symbolPostion offset value. The progress parameter sent to the windup function will interpolate smoothly from 0 to 1 over a time corresponding to this SlotReel's 'windupDuration' property. The windupMagnitude value sent to the windup function will be taken directly from ths SlotReel's 'windupMagnitude' property, and can be used (optionally) in the function to change the motion dynamically. The windup function should return a value corresponding to the 'symbolPosition' offset that all of the symbols will experience given the current 'progress' value; so for a windup function to make the symbols move up half a symbol position, the provided windup function should return a value of 0.5 at its peak.
SlotReel.windupMotionFunctionName
[type: string]
The name of the function that defines this SlotReel's motion during the 'windup' state. The windup motion for this SlotReel can be customized by providing a bespoke function here. The windup function should take 2 numeric parameters (progress and windupMagnitude), and return a symbolPostion offset value. The progress parameter sent to the windup function will interpolate smoothly from 0 to 1 over a time corresponding to this SlotReel's 'windupDuration' property. The windupMagnitude value sent to the windup function will be taken directly from ths SlotReel's 'windupMagnitude' property, and can be used (optionally) in the function to change the motion dynamically. The windup function should return a value corresponding to the 'symbolPosition' offset that all of the symbols will experience given the current 'progress' value; so for a windup function to make the symbols move up half a symbol position, the provided windup function should return a value of 0.5 at its peak.
SlotReel.windupDuration
[type: number]
The amount of time that this SlotReel will spend in the 'windup' state.
SlotReel.windupMagnitude
[type: number]
A value sent to the windup motion function that can be used (optionally) within the function to enable the windup motion to be manipulated dynamically.
SlotReel.bounceMotionFunctionOwner
[type: object]
The owner of the function that defines this SlotReel's motion during the 'bounce' state. The bounce motion for this SlotReel can be customized by providing a bespoke function here. The bounce function should take 2 numeric parameters (progress and bounceMagnitude), and return a symbolPostion offset value. The progress parameter sent to the bounce function will interpolate smoothly from 0 to 1 over a time corresponding to this SlotReel's 'bounceDuration' property. The bounceMagnitude value sent to the bounce function will be taken directly from ths SlotReel's 'bounceMagnitude' property, and can be used (optionally) in the function to change the motion dynamically. The bounce function should return a value corresponding to the 'symbolPosition' offset that all of the symbols will experience given the current 'progress' value; so for a bounce function to make the symbols move up half a symbol position, the provided bounce function should return a value of 0.5 at its peak.
SlotReel.bounceMotionFunctionName
[type: string]
The name of the function that defines this SlotReel's motion during the 'bounce' state. The bounce motion for this SlotReel can be customized by providing a bespoke function here. The bounce function should take 2 numeric parameters (progress and bounceMagnitude), and return a symbolPostion offset value. The progress parameter sent to the bounce function will interpolate smoothly from 0 to 1 over a time corresponding to this SlotReel's 'bounceDuration' property. The bounceMagnitude value sent to the bounce function will be taken directly from ths SlotReel's 'bounceMagnitude' property, and can be used (optionally) in the function to change the motion dynamically. The bounce function should return a value corresponding to the 'symbolPosition' offset that all of the symbols will experience given the current 'progress' value; so for a bounce function to make the symbols move up half a symbol position, the provided bounce function should return a value of 0.5 at its peak.
SlotReel.bounceDuration
[type: number]
The amount of time that this SlotReel will spend in the 'bounce' state.
SlotReel.bounceMagnitude
[type: number]
A value sent to the bounce motion function that can be used (optionally) within the function to enable the bounce motion to be manipulated dynamically.
SlotReel.assembleReelDataOnTheFly
[type: boolean] [default: false]
Boolean indicating if this SlotReel is in 'assembleReelDataOnTheFly' mode. When true, the data for this reel is initially only seeded with a small portion of of reel data, and each reel spin adds its symbols (as provided to the 'setTarget' function) to the end of the reel data array. The reel data continues to grow with each spin until it meets the 'reelDataAssemblyMax' threshold, at which point the additional symbols overwrite a random portion of the existing reel data. When false, the entire reel must be provided initially.
SlotReel.reelDataAssemblyMax
[type: number] [default: 200]
When 'assembleReelDataOnTheFly' for this SlotReel is true, this property acts a reel data length cap. Once the reel data length reaches this value additional symbols provided in the 'setTarget' call are randomly placed within the reel data, overwriting previously placed reel data.
SlotReel.reelState
[type: string]
Read-only string indicating which state this SlotReel is in. States include 'stopped', 'windup', 'spinFree', 'stopping', 'stopImminent', and 'bounce', which can be found in constants.slotReelStates. - The 'stopped' state corresponds when the SlotReel is stopped. - The 'windup' state corresponds just before the main portion of the spin, when the SlotReel is 'winding up'. - The 'spinFree' state corresponds to when SlotReel is freely spinning, which will continue indefinitely until 'beginStop' or 'slam' are called. - The 'stopping' state corresponds to the time during the spin after 'beginStop' has been called; the SlotReel will continue in this state until the final stopping symbols have been found. - The 'stopImminent' state corresponds to when the final stopping symbols are active/visible on the SlotReel, and they just need to travel into their final position. - The 'bounce' state corresponds to right before the SlotReel spin is over, and the symbols are bouncing around to simulate a physical recoil action.
SlotReel.pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity]
The PauseEvent or Array of PauseEvents that this SlotReel will be immune to. Set this parameter to [] for this Swooper to have no pause immunity.
SlotReel.speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl]
The SpeedControl or Array of SpeedControls that this SlotReel is affected by.
SlotReel.numMainSymbols
[type: number]
The number of 'symbol' GraphicObjects that are meant to be the main visible symbols for this SlotReel. This property is read-only since its value is set once in the constructor.
SlotReel.numTopBufferSymbols
[type: number]
The number of symbol objects that will be populated 'above' the main visible symbols for this SlotReel. It should be noted that since the motion of the symbols in this SlotReel is completely customizable, these buffer symbols will not necessarily be above the main symbols. This property is read-only since its value is set once in the constructor.
SlotReel.numBottomBufferSymbols
[type: number]
The number of symbol objects that will be populated 'below' the main visible symbols for this SlotReel. It should be noted that since the motion of the symbols in this SlotReel is completely customizable, these buffer symbols will not necessarily be below the main symbols. This property is read-only since its value is set once in the constructor.
SlotReel.numSymbols
[type: number]
The total number of symbol objects that will be populated for this SlotReel, which includes the numMainSymbols, numTopBufferSymbols, and numBottomBufferSymbols. This property is read-only since its value is effectively set once in the constructor.
SlotReel.symbolDefinition
[type: CustomAddOnDefinition]
The definition of the CustomObject CustomAddOn that was used to populate each of the symbol objects. The CustomObject or CustomAddOn in question should implement the 'setSymbol' function, which takes a single string parameter which will be passed whenever the associated symbol is altered. It can also implement the 'symbolPosition' numeric property, which will be updated by the SlotReel as each symbol moves along the symbol path for this SlotReel. The definition of this object is also where further customization of each symbol can be defined. This property is read-only since its value is set once in the constructor.
SlotReel.symbolPathOverrideMode
[type: boolean] [default: false]
Boolean determining if the SlotReel's positioning of its symbol objects along the reel path is overriden. To entirely override reel path positioning of the symbols, set this property to true, and be sure to implement an 'updateSymbolPosition' function within the symbolDefinition object. Within that function, you can create custom positioning for each symbol based on the 'symbolPosition' property, which indicates the relative or 'unit' position of each symbol (ie a reel with 3 main symbols and a single buffer on top and bottom would have symbols with symbolPosition values of -1, 0, 1, 2, 3). Using the 'symbolPosition' property, you can write functionality to position each symbol as desired based on its relative position.
SlotReel.populateInitialReelData(reelData, initialSymbols)
[type: function]
Call this function to provide this SlotReel with its initial reel data, and the symbols that will appear when the SlotReel is first displayed.
Reel data consists of an array of strings that represent the designation of each symbol on the 'reel strip'.
The data that is provided depends on whether or not the SlotReel is in 'assembleReelDataOnTheFly' mode.
If assembleReelDataOnTheFly is true, then only a small portion of reel data need be provided, as each subsequent call to 'setTarget' will add to the reel data.
If assembleReelDataOnTheFly is false, then the entire reel data set must be provided here.
SlotReel.populateInitialReelData parameter: reelData
[type: [string]]
The set of initial reel data to provide to this SlotReel. If assembleReelDataOnTheFly is true, only a small portion of reel data need be provided, otherwise the entire reel data set must be provided here.
SlotReel.populateInitialReelData parameter: initialSymbols
[type: [string]] [optional]
An array of strings representing the initial symbols to populate on the reel when it is first displayed. If left undefined, starting symbols will be taken directly from the reelData provided.
SlotReel.setTarget(target)
[type: function]
Sets the target position in the reel data (the reel stop), or the target group of symbols to be displayed to be displayed when the SlotReel comes to a stop.
If assembleReelDataOnTheFly is false, then provide an index in the reel data here, and the symbol at that index will be displayed in this SlotReel's first main visible
position (position 0) spin ends, with the subsequent symbols displayed below respectively.
If assembleReelDataOnTheFly is true, then provide an array of strings corresponding to the symbols to be displayed when the SlotReel spin stops - in this case
be sure to provide enough symbol strings for the top buffer symbols, the main symbols, and the bottom buffer symbols.
SlotReel.setTarget parameter: target
[type: number, [string]]
If assembleReelDataOnTheFly is false provide the final stopping reel data index, if it's true provide final stopping set of symbols in an array.
SlotReel.beginSpin()
[type: function]
Function that begins the spin sequence for this SlotReel, changing the reelState from 'stopped' to 'windup'.
The SlotReel will perform the windup sequence, and then the reelState will be changed to 'spinFree',
which will lead the SlotReel to spin until further interaction.
SlotReel.beginStop(performSplice)
[type: function]
Function the starts the process of stopping a reel from spinning, changing the reelState from 'spinFree' to 'stopping'.
While the reelState is 'stopping', the SlotReel will continue to spin until it encounters the set of symbols it needs for the
final stopped position. A 'performSplice' boolean (when true) will tell the SlotReel to jump to the position in the reel data such that
each new symbol made visible during the spin will be one of the final symbols needed - this expedites the stopping process.
This value should be false if the reel is meant to spin just a finite number of positions (i.e. 1 position), as a value of true
would only extend the stopping process in this case.
SlotReel.beginStop parameter: performSplice
[type: boolean] [default: true] [optional]
Boolean indicating if the SlotReel should jump to a place in the reel data such that the very next symbols made visible will be the final stopping symbols needed to stop the spin.
SlotReel.slam()
[type: function]
Function that can be called during the SlotReel spin sequence to abruptly skip to the 'bounce' reelState.
SlotReel.getSymbol(index)
[type: function] [returns: SceneObject]
Returns the 'symbol' object at the given index.
Any index in [-numTopBufferSymbols, numMainSymbols+numBottomBufferSymbols-1] can be provided, as that is the set of available symbolPositions.
If the SlotReel is currently in any reelState other than 'stopped' then the 'symbol' GraphicObject with the symbolPosition that is nearest to the index provided will be returned.
It should be noted that the type of the returned object depends on the original 'symbolDefinition' supplied to the SlotReel's constructor. If a CustomObjectDefinition was provided,
then the returned object will have that type, otherwise the returned object will be of type GraphicObject.
SlotReel.getSymbol parameter: index
[type: number]
The index of the 'symbol' GraphicObject to fetch. Any index in [-numTopBufferSymbols, numMainSymbols+numBottomBufferSymbols-1] can be provided, as that is the set of available symbolPositions.
SlotReel.getSymbols(presortBySymbolPosition)
[type: function] [returns: [SceneObject]]
Returns an Array with all of the 'symbol' objects in this SlotReel.
It should be noted that the type of the objects in the returned array depends on the original 'symbolDefinition' supplied to the SlotReel's constructor.
If a CustomObjectDefinition was provided, then the returned array will contain objects of that type, otherwise the the array will contain GraphicObjects.
SlotReel.getSymbols parameter: presortBySymbolPosition
[type: boolean] [optional]
Boolean indicating if the returned symbols should be sorted by their 'symbolPosition' values.
SlotReel.addReelStateChangeCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback that occurs whenever the 'reelState' of this SlotReel is changed.
The new reelState and the previous reelState are sent to the callback as its first two parameters.
- The 'stopped' state corresponds when the SlotReel is stopped.
- The 'windup' state corresponds just before the main portion of the spin, when the SlotReel is 'winding up'.
- The 'spinFree' state corresponds to when SlotReel is freely spinning, which will continue indefinitely until 'beginStop' or 'slam' are called.
- The 'stopping' state corresponds to the time during the spin after 'beginStop' has been called; the SlotReel will continue in this state until the final stopping symbols have been found.
- The 'stopImminent' state corresponds to when the final stopping symbols are active/visible on the SlotReel, and they just need to travel into their final position.
- The 'bounce' state corresponds to right before the SlotReel spin is over, and the symbols are bouncing around to simulate a physical recoil action.
SlotReel.addReelStateChangeCallback parameter: callbackOwner
[type: object]
The object owning the callback function that occurs whenever the FlowState changes.
SlotReel.addReelStateChangeCallback parameter: callbackName
[type: string]
The name of the callback function that occurs whenever the FlowState changes.
SlotReel.addReelStateChangeCallback parameter: callbackArgs
[type: Array, any] [optional]
Args for the callback function that is triggered whenever the FlowState changes.
SlotReel.removeReelStateChangeCallback(callbackOwner, callbackName)
[type: function]
Removes the given callback.
SlotReel.removeReelStateChangeCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
SlotReel.removeReelStateChangeCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
----------------------------------------------------------
Section 110: Sound
----------------------------------------------------------
Sound
[type: class] [extends: PlaybackController] [NON-INSTANTIABLE] [requires: module - sounds]
A specialized PlaybackController that manages the playback of sound assets.
Sound.name
[type: string]
The Sounds's name. This must be unique among Sounds.
Sound.isLoaded
[type: boolean]
Boolean indicating if this Sound is currently loaded.
Sound.loadingTierRequirements
[type: [number]]
The LoadingTier that this Sound belongs too. LoadingTiers are a means to organize AssetComponents into separately downloadable groups.
Sound.duplicateSource
[type: string] [default: undefined]
String indicating the source of this Sound if it is a duplicate. Incisor® automatically detects when two or more AssetComponents are identical, ensuring that only one copy of the associated data is loaded to reduce the loaded size of the project. Those AssetComponents that are duplicates are marked by indicating the name of the source of their data. This member is undefined for AssetComponents that are not duplicates.
Sound.mainVolume
[type: number]
The current volume setting for this Sound, where 0 is quiet and 1 is full volume.
Sound.volumeControl
[type: [VolumeControl]] [default: [nc.volumeControls.MainVolumeControl]]
The VolumeControls that this Sounds currently subscribes to. VolumeControls are a way to control the volumes of groups of sounds, much like a 'audio bus'.
Sound.netVolume
[type: number]
The net volume, including the mainVolume of the Sound, and all of the volumes of the Sound's VolumeControls.
Sound.swoopVolume(volume, duration, completionCallbackOwner, completionCallbackName, completionCallbackArgs)
[type: function] [returns: Swooper]
Interpolates the mainVolum over the designated period of time.
Sound.swoopVolume parameter: volume
[type: number]
The target volume to swoop to.
Sound.swoopVolume parameter: duration
[type: number] [default: 0]
The duration of the volume change
Sound.swoopVolume parameter: completionCallbackOwner
[type: object]
The object owning the function that will be called when the swoop is complete.
Sound.swoopVolume parameter: completionCallbackName
[type: string]
The name of the function that will be called when the swoop is complete.
Sound.swoopVolume parameter: completionCallbackArgs
[type: Array, any]
Parameters for the function that will be called when the swoop is complete.
----------------------------------------------------------
Section 111: VolumeControl
----------------------------------------------------------
VolumeControl
[type: class] [NON-INSTANTIABLE] [requires: module - sounds]
VolumeControls are a way to control the volumes of groups of sounds, much like a 'audio bus'. To make a particular Sound subscribe to a VolumeControl, add the VolumeControl to the Sound's 'volumeControl' array.
VolumeControl.type
[type: string]
Type identifier.
VolumeControl.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
VolumeControl.name
[type: string]
The VolumeControl's name. This must be unique among VolumeControls.
VolumeControl.volume
[type: number]
The volume value for this VolumeControl. The volume values for Sounds typically range from 0 to 1.
----------------------------------------------------------
Section 112: SpriteSetter
----------------------------------------------------------
SpriteSetter
[type: class] [extends: PlaybackController] [NON-INSTANTIABLE]
A SpriteSetter is a PlaybackController that switches a GraphicObject's graphicAsset between numerically sequential GraphicAssets. It is typically used to create a sprite animation.
SpriteSetter.type
[type: string]
Type identifier.
SpriteSetter.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
SpriteSetter.getAssociatedGraphicAssets()
[type: function] [returns: [GraphicAsset]]
Returns a copy of the array of GraphicAssets that are iterated through during playback.
SpriteSetter.setAssociatedGraphicAssets(graphicAsset)
[type: function]
Manually populates the array of GraphicAssets that will be iterated through during playback.
SpriteSetter.setAssociatedGraphicAssets parameter: graphicAsset
[type: [GraphicAsset], GraphicAsset]
GraphicAsset or Array of Graphic Assets that will be iterated through during playback.
SpriteSetter.setKeyGraphicAsset(graphicAsset)
[type: function]
Sets the key GraphicAsset. This GraphicAsset's name should end in a number. All GraphicAssets whose name matches the key GraphicAsset's name with a different trailing number will be used to set the SpriteSetter's associated GraphicAssets list. For example, if the key GraphicAsset is named "MyAnimation001", all GraphicAssets with the name "MyAnimation" followed by any sequence of the digits 0-9 will be gathered into this SpriteSetter's associated GraphicAssets.
SpriteSetter.setKeyGraphicAsset parameter: graphicAsset
[type: GraphicAsset]
The GraphicAssets used for automatical detection all all numerically similar GraphicAssets.
----------------------------------------------------------
Section 113: Supervisor
----------------------------------------------------------
Supervisor
[type: class] [requires: module - extendedUi]
A Supervisor is a class that helps manage the processes behind UI components that allow the end-user to monitor and adjust values and properties during runtime. For example, the UiNumberSupervisor_TextField type is a specialized UiTextField that contains an additional Supervisor member, and its purpose is to serve as a visual 'supervisor' for any numeric property, displaying the current value as it changes, and updating the value if the end-user types a new number into the UiTextField. The Supervisor object itself houses callbacks for setting the target property, getting the target property, and updating the associated visual compoenents (i.e. setting the string in the UiTextField to the target number value).
Supervisor.type
[type: string]
Type identifier.
Supervisor.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
Supervisor.supervisedPropertyGetterCallbackOwner
[type: object]
The owner of the callback function that is called whenever this Supervisor needs to retrieve the property being supervised. The provided callback function must return the value being supervised.
Supervisor.supervisedPropertyGetterCallbackName
[type: string]
The name of the callback function that is called whenever this Supervisor needs to retrieve the property being supervised. The provided callback function must return the value being supervised.
Supervisor.supervisedPropertyGetterCallbackArgs
[type: any]
Arguments for the callback function that is called whenever this Supervisor needs to retrieve the property being supervised. The provided callback function must return the value being supervised.
Supervisor.supervisedPropertySetterCallbackOwner
[type: object]
The owner of the callback function that is called whenever this Supervisor sets the value of the property being supervised. The provided callback function will receive the new value for the property as its first parameter.
Supervisor.supervisedPropertySetterCallbackName
[type: string]
The name of the callback function that is called whenever this Supervisor sets the value of the property being supervised. The provided callback function will receive the new value for the property as its first parameter.
Supervisor.supervisedPropertySetterCallbackArgs
[type: any]
Arguments for the callback function that is called whenever this Supervisor sets the value of the property being supervised. The provided callback function will receive the new value for the property as its first parameter.
Supervisor.updateVisualsCallbackOwner
[type: object]
The owner of the callback function that is called whenever this Supervisor updates the visuals to reflect changes to the value of the property being supervised. The provided callback function will receive the up-to-date property value as its first parameter.
Supervisor.updateVisualsCallbackName
[type: string]
The name of the callback function that is called whenever this Supervisor updates the visuals to reflect changes to the value of the property being supervised. The provided callback function will receive the up-to-date property value as its first parameter.
Supervisor.updateVisualsCallbackArgs
[type: any]
Arguments for the callback function that is called whenever this Supervisor updates the visuals to reflect changes to the value of the property being supervised. The provided callback function will receive the up-to-date property value as its first parameter.
Supervisor.setSupervisedProperty(value)
[type: function]
Sets the supervised property's value. This call is invoked upon the end-user manipulation of the associated visual components.
Supervisor.setSupervisedProperty parameter: value
[type: any]
The value to set the supervised property to.
Supervisor.performStandardSetup(supervisedPropertyOwner, supervisedPropertyName, validationFunctionOwner, validationFunctionName)
[type: function]
Creates and connects to 'standard' setter and getter functions that are simply defined by getting an property (by owner and name), and setting a property (by owner and name); For more custom functionality, such as conditional getting and setting functionality, custom getter and setter functions can be built and linked to directly using 'supervisedPropertyGetterCallbackOwner', 'supervisedPropertyGetterCallbackName', 'supervisedPropertySetterCallbackOwner', and 'supervisedPropertySetterCallbackName'.
Supervisor.performStandardSetup parameter: supervisedPropertyOwner
[type: object]
The owner of the propertry being supervised.
Supervisor.performStandardSetup parameter: supervisedPropertyName
[type: string]
The name of the propertry being supervised.
Supervisor.performStandardSetup parameter: validationFunctionOwner
[type: object] [optional]
The owner of an optional validation function. This function receives, sanitizes, and returns the supervised property.
Supervisor.performStandardSetup parameter: validationFunctionName
[type: string] [optional]
The name of an optional validation function. This function receives, sanitizes, and returns the supervised property.
Supervisor.performStandardSetupForMultiSupervision(standardSetupPropertyOwnerArray, supervisedPropertyName, validationFunctionOwner, validationFunctionName)
[type: function]
Creates and connects to 'standard' setter and getter functions for "multi-supervision" scenarios; For more custom functionality, such as conditional getting and setting functionality, custom getter and setter functions can be built and linked to directly using 'supervisedPropertyGetterCallbackOwner', 'supervisedPropertyGetterCallbackName', 'supervisedPropertySetterCallbackOwner', and 'supervisedPropertySetterCallbackName'.
Supervisor.performStandardSetupForMultiSupervision parameter: standardSetupPropertyOwnerArray
[type: Array]
The array where the objects owning the supervised properties will be referenced.
Supervisor.performStandardSetupForMultiSupervision parameter: supervisedPropertyName
[type: string, [string]]
The name of the propertry being supervised. An array can be supplied here if the supervised property not a direct member.
Supervisor.performStandardSetupForMultiSupervision parameter: validationFunctionOwner
[type: object] [optional]
The owner of an optional validation function. This function receives, sanitizes, and returns the supervised property.
Supervisor.performStandardSetupForMultiSupervision parameter: validationFunctionName
[type: string] [optional]
The name of an optional validation function. This function receives, sanitizes, and returns the supervised property.
----------------------------------------------------------
Section 114: Swooper
----------------------------------------------------------
Swooper
[type: class] [NON-INSTANTIABLE]
Object controlling the 'swooping' (or interpolation) of a given numeric property or properties over a duration (using fixedUpdate). An object of this type is returned from all 'swoop' calls, providing a means to manage the given swooping process.
Swooper.type
[type: string]
Type identifier.
Swooper.name
[type: string]
Name of the Swooper.
Swooper.numProperties
[type: number]
The number of properties being interpolated by this Swooper.
Swooper.progress
[type: number] [default: 0]
The number representing the progress of the interpolation of the value or values on where 0 corresponds to the startValues, and 1 corresponds to the endValues. This value is not meant to be manipulated as it is automatically changed over time via the internal fixedUpdate used by this Swooper.
Swooper.tweenType
[type: TweenType] [default: nc.tweenTypes.Linear]
The TweenType for this Swooper. A TweenType defines a method of interpolation between any two values or sets of values. The default TweenType is 'Linear', which defines a perfectly even interpolation between the startValues and endValues. TweenTypes can vary the timing of interpolation between two sets of values, as well as the path of the interpolation.
Swooper.controllers
[type: TweenControllers] [default: {}]
Dictionary of dictionaries (per TweenType) of values that can be used to control this motion dynamically.
Swooper.startValues
[type: [number]]
Array containing the starting value or values for the Swooper. The length of this array depends on this Swoop's 'numProperties'. Upon initiating a Swooper for a given numeric property/properties, their current values are stored in this array and used as the initial conditions for the interpolation.
Swooper.endValues
[type: [number]]
Array containing the ending value or values for the Swooper. The length of this array depends on this Swoop's 'numProperties'. These values define the final target values for the swooped properties.
Swooper.currentValues
[type: [number]]
Array containing the current value(s) for this Swooper. These are the values that the Tween function manipulates based its 'progress' property to create the desired movement.
Swooper.workspace
[type: object]
An un-specified JS object of 'any' type to enable the user to stash persistant elements of their swooper within the tweenFunction.
Swooper.completionCallbackOwner
[type: object] [default: undefined]
The object owning the optional callback function invoked when this Swooper completes.
Swooper.completionCallbackName
[type: string] [default: undefined]
The name of the optional callback function invoked when this Swooper completes.
Swooper.completionCallbackArgs
[type: any] [default: undefined]
Arguments for the optional callback function invoked when this Swooper completes.
Swooper.updaterCallbackOwner
[type: object] [default: undefined]
The object owning the optional callback function invoked continuously (every fixedUpdate) during the interpolation process.
Swooper.updaterCallbackName
[type: string] [default: undefined]
The name of the optional callback function invoked continuously (every fixedUpdate) during the interpolation process.
Swooper.pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] for this Swooper to have no pause immunity.
Swooper.speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
Swooper.stop(setToEndValues, performCompletionCallback)
[type: function]
Stops the Swooper if it is in progress.
Swooper.stop parameter: setToEndValues
[type: boolean] [default: false] [optional]
Determines if the target properties are set to the endValues.
Swooper.stop parameter: performCompletionCallback
[type: boolean] [default: false] [optional]
Determines if the pre-determined completionCallback (if defined) is performed.
----------------------------------------------------------
Section 115: TweenType
----------------------------------------------------------
TweenType
[type: class]
Object defining a specific type of interpolation.
TweenType.type
[type: string]
Type identifier.
TweenType.name
[type: string]
Name of the Motion.
TweenType.tweenFunction()
[type: function]
A reference to the function that defines the nature of the TweenType's motion.
TweenType.tweenControllerNames
[type: [string]]
A list of optional tween controllers. These can be used to dynamically affect the nature of the TweenType's motion.
TweenType.tweenControllerDefaultValues
[type: [number]]
A list of optional tween controller default values.
TweenType.description
[type: string]
The description of the TweenType - this will appear in the autocomplete documentation.
TweenType.controllerDescriptions
[type: [string]]
The description of the TweenType controllers - these descriptions will appear in the autocomplete documentation.
----------------------------------------------------------
Section 116: TweenControllers
----------------------------------------------------------
TweenControllers
[type: class] [NON-INSTANTIABLE]
Dictionary of all registered TweenControllers.
----------------------------------------------------------
Section 117: TextAssembly
----------------------------------------------------------
TextAssembly
[type: class] [extends: SceneObject]
Specialized SceneObject that presents a group of GraphicObjects as text. TextAssemblies tend to be less performant that TextBoxes, as they result in more SceneObjects being rendered, But TextAssemblies have the adventage of being able to manipulate indivual characters freely.
TextAssembly.type
[type: string]
Type identifier.
TextAssembly.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
TextAssembly.string
[type: string] [default: ""]
The string value of the text to be displayed by this TextAssembly.
TextAssembly.phraseID
[type: string] [default: undefined]
Property to set this TextAssembly's string based on the associated phrase in the ProjectTranscript, which is updated based on the current language setting of the project. See 'nc.phraseIDs' for a list of available phrases.
example:
// Objective: Set the text of a TextAssembly based on a phrase defined in the ProjectTranscript.
// Expected Result: You will see "Hello World" on screen if the project language is 'en', or "Hola Mundo" if the language is 'es'.
this.textAssembly = new TextAssembly();
this.textAssembly.phraseID = nc.phraseIDs["Hello World"];
TextAssembly.boxWidth
[type: number] [default: 0]
The maximum width that the laid out text will adhere to if 'wrapToFit' or 'scaleToFit' are true. When greater than 0, this value also determines the positioning of left or right justified text. A value of 0 corresponds to no limits on the width of the text.
TextAssembly.boxHeight
[type: number] [default: 0]
The maximum height that the laid out text will adhere to if 'scaleToFit' is true. When greater than 0, this value also determines the positioning of top-justified or bottom-justified text. A value of 0 corresponds to no limits on the height of the text.
TextAssembly.wrapToFit
[type: boolean] [default: true]
Bool determining if text will automatically flow onto new lines in order to fit the text within the designated 'boxWidth' value.
TextAssembly.scaleToFit
[type: boolean] [default: true]
Bool determining if the text will automatically be scaled down to fit within the boxWidth and/or boxHeight.
TextAssembly.horizontalJustification
[type: string] [default: "left"]
The horizontalJustification of this TextAssembly. For acceptable values, see 'nc.constants.justfications'. Setting this value will change the horizontal justification for all of the text in this TextAssembly, but the value can be set for individual sections of the text using 'TextAssembly.setHorizontalJustification'.
TextAssembly.verticalJustification
[type: string] [default: "top"]
The verticalJustification of this TextAssembly. For acceptable values, see 'nc.constants.justfications'. Setting this value will change the vertical justification for all of the text in this TextAssembly.
TextAssembly.textWidth
[type: number]
The read-only width of the text (once laid out). This number encapsulates the final width of the laid out text, including all of the TextFormats, the boxWidth and boxHeight, scaleToFit, wrapToFit etc...
TextAssembly.textHeight
[type: number]
The read-only height of the text (once laid out). This number encapsulates the final height of the laid out text, including all of the TextFormats, the boxWidth and boxHeight, scaleToFit, wrapToFit etc...
TextAssembly.scaleToFitFactor
[type: number]
For Texts or Textboxes with 'scaleToFit' set to true, this number denotes the multiplier that was applied in order for the given text to fit within the boxWidth, and boxHeight.
TextAssembly.baselinePosition
[type: number] [default: .22]
Number representing the vertical placement of the baseline within each line of text in this TextAssembly. A value of 0 corresponds to the baseline of the text being positioned at the very bottom of each line, and a value of .5 corresponds to the baseline of the text being positioned in the middle of each line.
TextAssembly.textFormat
[type: TextFormat] [default: new TextFormat()]
Object housing information about the customization of the characters within this TextAssembly. This includes font, scale, baseline shift, kerning, line height, as well as information about EffectNodes and EffectController values used on the characters. Setting or adjusting this value will set the TextFormat for all of the characters in this TextAssembly. See 'TextAssembly.setTextFormat' to set the TextFormat for individual sections of this TextAssembly.
TextAssembly.layoutLazyUpdater
[type: LazyUpdater]
The LazyUpdater ultimately responsible for initiating the layout of the text. The setting of 'needsUpdate' and the calling of 'updateIfNeeded' is magaged as much as is possible internally by Incisor®, but if the need to force an update arises, set 'needsUpdate' to true, and call 'updateIfNeeded'.
TextAssembly.showWhiteSpace
[type: boolean] [default: false]
Boolean indicating if whitespace characters will be visible in this TextAssembly.
TextAssembly.setSubstitutionCharacter(characterToSubstitute, graphicAsset, textFormat)
[type: function]
Method used to swap all instances of the given character with a designated GraphicAsset. A TextFormat can also be supplied to help position and format the substituted GraphicAsset within the text.
TextAssembly.setSubstitutionCharacter parameter: characterToSubstitute
[type: string]
The the character that will be replaced with the designated GraphicAsset.
TextAssembly.setSubstitutionCharacter parameter: graphicAsset
[type: GraphicAsset] [optional]
The GraphicAsset that will substitute for the given characters. When this parameter is undefined, any previously defined substitution using the provided character will be disposed. The formats for previously substituted characters will need to be dealt with separately.
TextAssembly.setSubstitutionCharacter parameter: textFormat
[type: TextFormat] [optional]
Optional TextFromat to apply to the substituted GraphicAsset, which can be used to adjust its positioning and formating.
TextAssembly.setTextFormat(textFormat, startIdx, numChars)
[type: function]
Sets the text format of the designated portion of text within a TextAssembly.
TextAssembly.setTextFormat parameter: textFormat
[type: TextFormat]
The TextFormat that the specified characters will adopt.
TextAssembly.setTextFormat parameter: startIdx
[type: number] [optional]
The index of the first character in the segment affected by this change. If left undefined, the given textFormat will be applied to all characters.
TextAssembly.setTextFormat parameter: numChars
[type: number] [default: infinity] [optional]
The length of the segment affected by this change.
TextAssembly.setHorizontalJustification(justification, startIdx, numChars)
[type: function]
Sets the horizontal justification of the given range of characters. It should be noted that when characters are laid out into multiple lines, the horizontal justification for a given line is determined by the horizontal horizontalJustification value associated with the first character on that line.
TextAssembly.setHorizontalJustification parameter: justification
[type: string]
The horizontal justification that the specified characters will adopt. See 'nc.constants.justifications' for justification values.
TextAssembly.setHorizontalJustification parameter: startIdx
[type: number] [optional]
The index of the first character in the segment affected by this change. If left undefined, the given horizontalJustification will be applied to all characters.
TextAssembly.setHorizontalJustification parameter: numChars
[type: number] [default: infinity] [optional]
The length of the segment affected by this change.
TextAssembly.insert(startIndex, stringToInsert)
[type: function]
Inserts the given string at the given index.
TextAssembly.insert parameter: startIndex
[type: number]
The index that the first character of the inserted string.
TextAssembly.insert parameter: stringToInsert
[type: string]
The string to insert.
TextAssembly.delete(startIndex, count)
[type: function]
Deletes the given range of characters.
TextAssembly.delete parameter: startIndex
[type: number]
The index of the first character to delete.
TextAssembly.delete parameter: count
[type: number]
The number of characters to delete.
TextAssembly.addStringUpdateCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback that occurs whenever this TextBox string changed. The updated string is sent to the callback as its first parameter.
TextAssembly.addStringUpdateCallback parameter: callbackOwner
[type: object]
The object owning the callback function that occurs whenever this TextBox string changed.
TextAssembly.addStringUpdateCallback parameter: callbackName
[type: string]
The name of the callback function that occurs whenever this TextBox string changed.
TextAssembly.addStringUpdateCallback parameter: callbackArgs
[type: any] [optional]
Args for the callback function that occurs whenever this TextBox string changed.
TextAssembly.removeStringUpdateCallback(callbackOwner, callbackName)
[type: function]
Removes the given stringUpdate callback.
TextAssembly.removeStringUpdateCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
TextAssembly.removeStringUpdateCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
TextAssembly.clearPools()
[type: function]
Several object-pooling techniques are used internally within the TextAssembly and TextBox objects. Displaying/rendering text with large numbers of characters can leave a significant memory-footprint in these pools. This memory can be freed by calling this method - though the call itself may result in a one-time performance hit if large strings have been displayed/rendered previously.
TextAssembly.getCharacters()
[type: function] [returns: [GraphicObject]]
Returns a new array containing the list of GraphicObjects that comprise the TextAssembly's current string.
----------------------------------------------------------
Section 118: TextBox
----------------------------------------------------------
TextBox
[type: class] [extends: Button]
A specialized Button that renders text to it's texture. All TextBoxes are connected to an internal text-rendering scene that renders directly to the given TextBox's RenderTarget. TextBoxes have 3 editing modes: none, selectable, and editable. Though TextBoxes inherit from Button, their default value for "buttonActive" value is false when the editing mode is set to 'none' TextBoxes tend to be more performant than TextAssemblies, since the resulting object is singular vs the many character-children of TextAssemblies.
TextBox.type
[type: string]
Type identifier.
TextBox.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
TextBox.string
[type: string] [default: ""]
The string value of the text to be displayed by this TextBox. Setting this value directly clears the 'phraseID' property of this TextBox (if applicable).
example:
// Objective: Set the text of a TextBox.
// Expected Result: You will see "My Text" on screen.
this.textBox = new TextBox();
this.textBox.string = "My Text";
TextBox.phraseID
[type: string] [default: undefined]
Property to set this TextBox's string based on the associated phrase in the ProjectTranscript, which is updated based on the current language setting of the project. See 'nc.phraseIDs' for a list of available phrases.
example:
// Objective: Set the text of a TextBox based on a phrase defined in the ProjectTranscript.
// Expected Result: You will see "Hello World" on screen if the project language is 'en', or "Hola Mundo" if the language is 'es'.
this.textBox = new TextBox();
this.textBox.phraseID = nc.phraseIDs["Hello World"];
TextBox.boxWidth
[type: number] [default: 0]
The maximum width that the laid out text will adhere to if 'wrapToFit' or 'scaleToFit' are true. When greater than 0, this value also determines the positioning of left or right justified text. A value of 0 corresponds to no limits on the width of the text.
TextBox.boxHeight
[type: number] [default: 0]
The maximum height that the laid out text will adhere to if 'scaleToFit' is true. When greater than 0, this value also determines the positioning of top-justified or bottom-justified text. A value of 0 corresponds to no limits on the height of the text.
TextBox.wrapToFit
[type: boolean] [default: true]
Bool determining if text will automatically flow onto new lines in order to fit the text within the designated 'boxWidth' value.
TextBox.scaleToFit
[type: boolean] [default: true]
Bool determining if the text will automatically be scaled down to fit within the boxWidth and/or boxHeight.
TextBox.horizontalJustification
[type: string] [default: 'left']
The horizontalJustification of this TextBox. For acceptable values, see 'nc.constants.justfications'. Setting this value will change the horizontal justification for all of the text in this TextBox, but the value can be set for individual sections of the text using 'TextBox.setHorizontalJustification'.
TextBox.verticalJustification
[type: string] [default: 'top']
The verticalJustification of this TextBox. For acceptable values, see 'nc.constants.justfications'. Setting this value will change the vertical justification for all of the text in this TextBox.
TextBox.textWidth
[type: number]
The read-only width of the text (once laid out). This number encapsulates the final width of the laid out text, including all of the TextFormats, the boxWidth and boxHeight, scaleToFit, wrapToFit etc...
TextBox.textHeight
[type: number]
The read-only height of the text (once laid out). This number encapsulates the final height of the laid out text, including all of the TextFormats, the boxWidth and boxHeight, scaleToFit, wrapToFit etc...
TextBox.scaleToFitFactor
[type: number]
For Texts or Textboxes with 'scaleToFit' set to true, this number denotes the multiplier that was applied in order for the given text to fit within the boxWidth, and boxHeight.
TextBox.baselinePosition
[type: number] [default: .22]
Number representing the vertical placement of the baseline within each line of text in this TextBox. A value of 0 corresponds to the baseline of the text being positioned at the very bottom of each line, and a value of .5 corresponds to the baseline of the text being positioned in the middle of each line.
TextBox.textFormat
[type: TextFormat] [default: TextFormat()]
Object housing information about the customization of the characters within this TextBox. This includes font, scale, baseline shift, kerning, line height, as well as information about EffectNodes and EffectController values used on the characters. Setting or adjusting this value will set the TextFormat for all of the characters in this TextBox. See 'TextBox.setTextFormat' to set the TextFormat for individual sections of this TextBox.
TextBox.layoutLazyUpdater
[type: LazyUpdater]
The LazyUpdater is ultimately responsible for initiating the layout of the text. The setting of 'needsUpdate' and the calling of 'updateIfNeeded' is magaged as much as is possible internally by Incisor®, but if the need to force an update arises, set 'needsUpdate' to true, and call 'updateIfNeeded'.
TextBox.loadingTierRequirements
[type: [number]]
A list of the loading tier requirements for this TextBox. These requirements tell the TextBox if/when the GraphicAssets used by the characters are loaded, and therefore inform when the text can first be rendered to the TextBox. If left undefined, this value will default to the loadingTierRequirements of the geometry of the first character's GraphicAssets.
TextBox.isTrimmed
[type: boolean] [default: 'false']
Flag determining if the Texture and Geometry of this TextBox are trimmed to fit the rendered text. If false, the Texture and Geometry will extend to the full bounds of this TextBox's boxWidth and boxHeight.
TextBox.editingMode
[type: string] [default: 'none']
Value determining the editing mode of this TextBox. See 'nc.constants.textBoxEditingModes' for a list of available options. When set to 'none' this TextBox is not interactive. When set to 'selectable' this TextBox is interactive via the keyboard and cursor: text in this TextBox can be selected but not edited. When set to 'editable' this TextBox is interactive via the keyboard and cursor: text in this TextBox can be selected and edited.
example:
// Objective: Edit the text of a TextBox.
// Expected Result: Click on "My Text" and edit it.
// Create a new TextBox.
this.textBox = new TextBox();
this.textBox.string = "My Text";
// Set the editingMode to editable.
this.textBox.editingMode = nc.constants.textBoxEditingModes.editable;
TextBox.highlightColor
[type: Vector4] [default: Vector4(.5,.6,1,.3)]
The color value for the selection highlighter boxes.
TextBox.backgroundColor
[type: Vector4] [default: Vector4(0,0,0,0)]
The background color for the TextBox.
TextBox.pivotPoint
[type: Vector2] [default: Vector2(0,0)]
The pivot point for the TextBox, with [0,0] meaning center pivot, and [.5,.5] meaning right-top pivot. TextBoxes are center-based by default like to most GraphicObjects. It should be noted that pivotPoint and justification are seperate concepts and do not affect each other. Justification affects the alignment of the text within the bounds of the TextBox, and pivotPoint affects where the 'origin' of the TextBox is relative to those bounds.
TextBox.renderTarget
[type: RenderTarget]
This TextBox's RenderTarget - the RenderTarget that its text gets rendered to.
TextBox.useNearestPixelRendering
[type: boolean] [default: false]
A TextBox is ultimately 'pre-rendered' text that is positioned in the Scene and then rendered again. Because of this, certain canvas sizes or TextBox positioning can lead to slightly blurrier edges that can be noticable for small text. Calling this function can mitigate such small-text-blurriness, as it sets the downscalingMode and upscalingMode to 'nearest', and sets the 'snapToNearestWorldPosition' to true. These settings help to ensure that the TextBox texture pixels are always aligned with the canvas pixels, preserving the original crispy edges. The tradeoff with using this mode is that the position of text will appear to always snap to the nearest pixel, which can lead to jerky-looking movement at slow speeds, and also rotation and other transformations will tear badly. If these restrictions are un-workable, a "TextAssembly" is a good alternative.
TextBox.tabEndsEditing
[type: boolean] [default: true]
Boolean determining if pressing the 'Tab' key ends the current editing session, relinquishing the focus. If this is true, and the newly focused object is a UiKeybaordNavigator, then the keyboard navigation would also be advanced. If this value is false, then pressing the 'Tab' key inserts 3 spaces.
TextBox.returnEndsEditing
[type: boolean] [default: true]
Boolean determining if pressing the 'Return' key ends the current editing session, relinquishing the focus. If this value is false, then pressing the 'Return' key inserts a newline.
TextBox.singularFocusTarget
[type: SceneObject]
The SceneObject that 'nc.singularFocusObject' will be set to when the end-user actively selects or edits this TextBox. The default value is set to this TextBox, but in the case where this TextBox is a descendant of a SceneObject that would be a better choice for singular focus (like when a TextBox is part of a TextField etc...), this option can be used to substitute a singular focus recipient.
TextBox.showWhiteSpace
[type: boolean] [default: false]
Boolean indicating if whitespace characters will be visible in this TextBox.
TextBox.numHorizontalGridSegments
[type: number] [default: 1]
The number of horizontal grid segments that will be used in this TextBox's Geometry.
TextBox.numVerticalGridSegments
[type: number] [default: 1]
The number of vertical grid segments that will be used in this TextBox's Geometry.
TextBox.canvasSizeResolutionScaling
[type: number]
A boolean determining if the resolution of this TextBox is affected by the scale of the canvas relative to it's core dimensions. In other words, if this flag is false, then the TextBox's RenderTarget is a static resolution, and if it is true then the RenderTarget will get bigger when the canvas is displayed bigger, and smaller as the canvas is shrunk. This flag effectively sets the 'canvasSizeResolutionScaling' value of this TextBox's RenderTarget, but in addition, it connects the TextBox to the 'canvasResize' appEvent, informing the TextBox to re-render whenever the canvas is resized.
TextBox.htmlBacking
[type: HtmlBacking]
Object that allows this TextBox to be backed by a hidden HTML text input element. This allows mobile virtual keyboards to appear automatically when focusing on an Incisor TextBox.
TextBox.setSubstitutionCharacter(characterToSubstitute, graphicAsset, textFormat)
[type: function]
Method used to swap all instances of the given character with a designated GraphicAsset. A TextFormat can also be supplied to help position and format the substituted GraphicAsset within the text.
TextBox.setSubstitutionCharacter parameter: characterToSubstitute
[type: string]
The the character that will be replaced with the designated GraphicAsset.
TextBox.setSubstitutionCharacter parameter: graphicAsset
[type: GraphicAsset]
The GraphicAsset that will substitute for the given characters.
TextBox.setSubstitutionCharacter parameter: textFormat
[type: TextFormat] [optional]
Optional TextFromat to apply to the substituted GraphicAsset, which can be used to adjust its positioning and formating.
example:
// Objective: Substitute a character in a TextBox.
// Expected Result: The letter "A" in the word "PLAY" will be replaced by a white triangle.
// Create a new TextBox.
this.textBox = new TextBox();
this.textBox.string = "PRESS PLAY";
// Replace the letter A with a white triangle.
this.textBox.setSubstitutionCharacter( "A", nc.graphicAssets.WhiteTriangle );
// Create a TextFormat, update some of its properties and set it on the TextBox.
let textFormat = new TextFormat();
textFormat.kerning = 2;
textFormat.characterScaleY = .5;
textFormat.characterScaleX = .5;
textFormat.verticalShift = .50;
this.textBox.setTextFormat( textFormat, 8, 1 );
TextBox.setTextFormat(textFormat, startIdx, numChars)
[type: function]
Sets the text format of the designated portion of text within a TextBox.
TextBox.setTextFormat parameter: textFormat
[type: TextFormat]
The TextFormat that the specified characters will adopt.
TextBox.setTextFormat parameter: startIdx
[type: number] [optional]
The index of the first character in the segment affected by this change. If left undefined, the given textFormat will be applied to all characters.
TextBox.setTextFormat parameter: numChars
[type: number] [default: infinity] [optional]
The length of the segment affected by this change.
example:
// Objective: Use a TextFormat to manipulate characters in a TextBox.
// Expected Result: You will see the phrase "I Love Incisor". The word "Love" and the letter "I" in Incisor will be stretched and given extra space.
// Create a new TextBox.
this.textBox = new TextBox();
this.textBox.string = "I Love Incisor";
// Create a TextFormat and update some of its properties.
let textFormat = new TextFormat();
textFormat.kerning = 3;
textFormat.characterScaleY = 3;
textFormat.characterScaleX = 1.5;
// Set the TextFormat and provide the start index and number of characters affected.
this.textBox.setTextFormat( textFormat, 2, 6 );
TextBox.setHorizontalJustification(justification, startIdx, numChars)
[type: function]
Sets the horizontal justification of the given range of characters. It should be noted that when characters are laid out into multiple lines, the horizontal justification for a given line is determined by the horizontal horizontalJustification value associated with the first character on that line.
TextBox.setHorizontalJustification parameter: justification
[type: string]
The horizontal justification that the specified characters will adopt. See 'nc.constants.justifications' for justification values.
TextBox.setHorizontalJustification parameter: startIdx
[type: number] [optional]
The index of the first character in the segment affected by this change. If left undefined, the given horizontalJustification will be applied to all characters.
TextBox.setHorizontalJustification parameter: numChars
[type: number] [default: infinity] [optional]
The length of the segment affected by this change.
TextBox.insert(startIndex, stringToInsert)
[type: function]
Inserts the given string at the given index.
TextBox.insert parameter: startIndex
[type: number]
The index that the first character of the inserted string.
TextBox.insert parameter: stringToInsert
[type: string]
The string to insert.
TextBox.delete(startIndex, count)
[type: function]
Deletes the given range of characters.
TextBox.delete parameter: startIndex
[type: number]
The index of the first character to delete.
TextBox.delete parameter: count
[type: number]
The number of characters to delete.
TextBox.clearPools()
[type: function]
Several object-pooling techniques are used internally within the TextAssembly and TextBox objects. Displaying/rendering text with large numbers of characters can leave a significant memory-footprint in these pools. This memory can be freed by calling this method - though the call itself may result in a one-time performance hit if large strings have been displayed/rednered previously.
TextBox.getSelectionRange()
[type: function] [returns: RangeInfo]
Returns an object containing the start index, end index, and character count of the current selection. If the current selection is empty the values in the returned object will be -1.
TextBox.selectRange(startIndex, count)
[type: function]
Selects the given range of characters.
TextBox.selectRange parameter: startIndex
[type: number] [default: 0] [optional]
The first index of the desired range to select. If left undefined, the entire text will be selected.
TextBox.selectRange parameter: count
[type: number] [optional]
The number of characters to be selected.
TextBox.addStringUpdateCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback that occurs whenever this TextBox string changed (even during editing). The updated string is sent to the callback as its first parameter.
TextBox.addStringUpdateCallback parameter: callbackOwner
[type: object]
The object owning the callback function that occurs whenever this TextBox string changed.
TextBox.addStringUpdateCallback parameter: callbackName
[type: string]
The name of the callback function that occurs whenever this TextBox string changed.
TextBox.addStringUpdateCallback parameter: callbackArgs
[type: Array, any] [optional]
Args for the callback function that occurs whenever this TextBox string changed.
TextBox.removeStringUpdateCallback(callbackOwner, callbackName)
[type: function]
Removes the given stringUpdate callback.
TextBox.removeStringUpdateCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
TextBox.removeStringUpdateCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
TextBox.addEditCommitCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback that occurs whenever this TextBox's 'editingMode' is changed from 'constants.textBoxEditingModes.editing' to any other value. The updated string is sent to the callback as its first parameter, and the original string is sent as the second parameter.
TextBox.addEditCommitCallback parameter: callbackOwner
[type: object]
The object owning the callback function that occurs whenever this TextBox string changed.
TextBox.addEditCommitCallback parameter: callbackName
[type: string]
The name of the callback function that occurs whenever this TextBox string changed.
TextBox.addEditCommitCallback parameter: callbackArgs
[type: Array, any] [optional]
Args for the callback function that occurs whenever this TextBox string changed.
TextBox.removeEditCommitCallback(callbackOwner, callbackName)
[type: function]
Removes the given editCommit callback.
TextBox.removeEditCommitCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
TextBox.removeEditCommitCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
----------------------------------------------------------
Section 119: HtmlBacking
----------------------------------------------------------
HtmlBacking
[type: class] [NON-INSTANTIABLE]
Object that allows this TextBox to be backed by a hidden HTML text input element. This allows mobile virtual keyboards to appear automatically when focusing on an Incisor TextBox.
HtmlBacking.enabled
[type: boolean]
Boolean determining if HTML backing is enabled. When enabled, an HTML textbox is added to the parent of the canvas element, and text input is routed through this hidden input, which allows support for mobile virtual keyboards.
HtmlBacking.autoPosition
[type: boolean]
Boolean determining whether the HTML textbox will be automatically places at the same coordinates as the canvas element when Incisor TextBox editing begins.
----------------------------------------------------------
Section 120: RangeInfo
----------------------------------------------------------
RangeInfo
[type: class] [NON-INSTANTIABLE]
Object describing a range of indices, including a startIndex, endIndex, and count.
RangeInfo.startIndex
[type: number]
The first index included in the range of indices.
RangeInfo.endIndex
[type: number]
The lase index included in the range of indices.
RangeInfo.count
[type: number]
The number of indices included in the range.
----------------------------------------------------------
Section 121: TextFormat
----------------------------------------------------------
TextFormat
[type: class]
Object containing text formatting information that can be applied the characters within TextAssembly or TextBox objects.
TextFormat.type
[type: string]
Type identifier.
TextFormat.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
TextFormat.fontName
[type: string] [default: "MainFont"]
The name of the font that characters with this TextFormat will use. See 'nc.fontNames' for the names of the fonts available in this project. Please note that changing the fontName will result in the entire 'characterMaterial' object being reset to the materialPresets of the "xxx_Char0" character of the new font.
TextFormat.characterScaleX
[type: number] [default: 1]
The x-axis scale multiplier for characters that use this TextFormat.
TextFormat.characterScaleY
[type: number] [default: 1]
The y-axis scale multiplier for characters that use this TextFormat.
TextFormat.kerning
[type: number] [default: 0]
Number representing an added or reduced spacing between characters that use this TextFormat. This kerning number denotes the proportion of the 'characterWidth' (see ProjectConfiguration.fontDefitions) that will be added to or subtracted from the width of each character. The effects of kerning are also automatically multiplied by the given format's 'characterScaleX' value, UiZoom.totalZoom (if applicable), and the 'scaleToFitFactor' (if applicable).
TextFormat.verticalShift
[type: number] [default: 0]
Number representing a veritcal offset that will be applied to the characters that use this TextFormat. This number denotes the proportion of the font's 'lineHeight' (see ProjectConfiguration.fontDefitions) that will be added to or subtracted from the vertical position of the characters using this TextFormat. The effects of verticalShift are also automatically multiplied by the given format's 'characterScaleY' value, UiZoom.totalZoom (if applicable), and the 'scaleToFitFactor' (if applicable).
TextFormat.lineHeightMultiplier
[type: number] [default: 1]
Number that multiplies the effective layout height of characters the that use this TextFormat. As a default, the 'layout height' of any character within a font is the font's 'lineHeight' value (see ProjectConfiguration.fontDefitions). This number acts as a multiplier on that effective character height.
TextFormat.characterMaterial
[type: CharacterMaterial]
Object defining EffectNodes amd EffectController values that will be applied to the characters that used this TextFormat.
TextFormat.clone()
[type: function] [returns: TextFormat]
Returns a new TextFormat instance with the same values.
----------------------------------------------------------
Section 122: CharacterMaterial
----------------------------------------------------------
CharacterMaterial
[type: class] [NON-INSTANTIABLE]
Object representing the EffectNodes and EffectController values that will be applied to all of the TextBox or TextAssembly characters using the TextFormat that owns this CharacterMaterial.
CharacterMaterial.type
[type: string]
Type identifier.
CharacterMaterial.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
CharacterMaterial.fillColor
[type: Color]
The EffectController for the 'FillColor' EffectNode, which entirely fills the associated Geometry with the red, green, blue, and alpha color values provided. While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
CharacterMaterial.mainTexture
[type: Texture]
The EffectController for the 'SampleMainTexture' EffectNode that tells it which Texture to render.
CharacterMaterial.colorMultiply
[type: Color]
The EffectController for the 'ColorMultiply' EffectNode, which multiplies the red, green, blue, and alpha color values of the Material it is applied to. While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
CharacterMaterial.shapify
[type: shapify]
The EffectController for the 'Shapify' EffectNode. The Shapify EffectNode converts edge data stored in a 'shapified' Texture into a presentable image with edges that stay sharp regardless of the scale of the associated GraphicObject. This is an instance of the dynamically defined EffectController 'shapify' (base type: 'Vector2'). To get a new instance, use "nc.effectControllers['shapify'].new()". While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
CharacterMaterial.shear
[type: shear]
EffectController for the Shear EffectNode, which distorts the shape to appear slanted or skewed. This is an instance of the dynamically defined EffectController 'shear' (base type: 'Vector3'). To get a new instance, use "nc.effectControllers['shear'].new()". While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
CharacterMaterial.shear_center
[type: Vector2]
EffectController for the Shear EffectNode, which distorts the shape to appear slanted or skewed. While some EffectNodes and EffectControllers are included in projects automatically, many must first be added to the project as 'codeAsset' files using the 'TemplateLibrary' menu.
CharacterMaterial.getEffectNodes()
[type: function] [returns: [EffectNode]]
Returns this CharacterMaterial's current EffectNodes. EffectNodes are GPU-driven visual effects assigned to SceneObjects, GraphicObjects, and ultimately Materials. Each EffectNode can be manipulated dynamically by one or more EffectControllers, which are accessable as direct members of this CharacterMaterial.
CharacterMaterial.setEffectNodes(effectNodes)
[type: function]
Sets the EffectNodes for this CharacterMaterial, effectively setting them for all of the affected characters. EffectNodes are GPU-driven visual effects assigned to SceneObjects, GraphicObjects, and ultimately Materials. Each EffectNode can be manipulated dynamically by one or more EffectControllers, which are accessable as direct members of this CharacterMaterial.
CharacterMaterial.setEffectNodes parameter: effectNodes
[type: [EffectNode], EffectNode]
The new list of EffectNodes that will apply this CharacterMaterial, which applies to all affected characters.
CharacterMaterial.addEffectNodes(effectNodes)
[type: function]
Adds the given EffectNodes to this CharacterMaterial, effectively adding them to all of the affected characters. EffectNodes are GPU-driven visual effects assigned to SceneObjects, GraphicObjects, and ultimately Materials. Each EffectNode can be manipulated dynamically by one or more EffectControllers, which are accessable as direct members of this CharacterMaterial.
CharacterMaterial.addEffectNodes parameter: effectNodes
[type: [EffectNode], EffectNode]
The EffectNodes to add to this CharacterMaterial, which applies to all affected characters.
----------------------------------------------------------
Section 123: Texture
----------------------------------------------------------
Texture
[type: class] [extends: AssetComponent] [NON-INSTANTIABLE]
A Texture is a pixel map used for filling the surface of Geometry during rendering.
Texture.wrapModeHorizontal
[type: string]
Mode denoting how this Texture will behave beyond its horizontal bounds. The acceptable wrap modes can be found in 'nc.constants.wrapModes'.
Texture.wrapModeVertical
[type: string]
Mode denoting how this Texture will behave beyond its vertical bounds. The various wrap modes can be found in 'nc.constants.wrapModes'.
Texture.downscalingMode
[type: string]
Mode denoting how this Texture will be sampled when it is smaller than it's native size. The various downscaling modes can be found in 'nc.constants.textureDownscalingModes'.
Texture.upscalingMode
[type: string]
Mode denoting how this Texture will be sampled when it is larger than it's native size. The various upscaling modes can be found in 'nc.constants.textureUpscalingModes'.
Texture.spriteSheet
[type: string] [default: undefined]
The name of the SpriteSheet that this Texture is a part of (if applicable).
Texture.getResolution()
[type: function] [returns: Vector2]
Returns a Vector2 with the pixel dimensions of this Texture.
----------------------------------------------------------
Section 124: Timeline
----------------------------------------------------------
Timeline
[type: class] [extends: TimePlaybackController] [NON-INSTANTIABLE]
Timelines are specialized PlaybackControllers that control animation of Constructs created in the Incisor® GUI.
Timeline.type
[type: string]
Type identifier.
Timeline.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
Timeline.name
[type: string] [default: 'SceneObject']
The name of the SceneObject.
Timeline.influence
[type: number]
This value determines the degree to which this particular timeline controls its construct. The total influence among all of the timelines always adds up to 1. When a particular Timeline's influence is actively increased, the influence of all other Timelines is decreased passively and proportionally in order to maintain a total influence of 1. A Timeline's influence cannot be directly decreased, it must be done passively be increasing the influence of another Timeline.
Timeline.swoopInfluence(endValue, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs)
[type: function] [returns: Swooper]
Swoops (interpolates) the Timeline's influence from its current value to the given end value over the duration.
It should be noted, that Timeline.influence cannont be directly decreased, this must be done passively be increasing
the influence of another Timeline.
Timeline.swoopInfluence parameter: endValue
[type: number]
The ending value for the influence.
Timeline.swoopInfluence parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation.
Timeline.swoopInfluence parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
Timeline.swoopInfluence parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
Timeline.swoopInfluence parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
Timeline.swoopInfluence parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
Timeline.playOnce_swoopInfluence(fadeInTime, fadeOutTime, returnToTimeline, lazyStopCallbackOwner, lazyStopCallbackName, lazyStopCallbackArgs)
[type: function]
Plays this Timeline once, swooping influence up at its start and return-swooping influence just before its end for smooth transitions.
The 'Ease' TweenType is used for both swoops.
[REQUIREMENT: module - waitThens]
Timeline.playOnce_swoopInfluence parameter: fadeInTime
[type: number] [optional]
The amount of time to fade in this Timeline's influence. If left undefined, the value will default to either .25 seconds, or 10% of this Timeline's duration (whichever is smaller).
Timeline.playOnce_swoopInfluence parameter: fadeOutTime
[type: number] [optional]
The amount of time to fade out this Timeline's influence before it ends. If left undefined, the value will default to either .25 seconds, or 10% of this Timeline's duration (whichever is smaller).
Timeline.playOnce_swoopInfluence parameter: returnToTimeline
[type: Timeline] [optional]
The Timeline that will have influence after this 'event' completes. If this value is left undefined, then it will default to the Timeline that had the highest influence when this function was originally invoked.
Timeline.playOnce_swoopInfluence parameter: lazyStopCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the timeline is complete.
Timeline.playOnce_swoopInfluence parameter: lazyStopCallbackName
[type: string] [optional]
The name of the function that is called when the timeline is complete.
Timeline.playOnce_swoopInfluence parameter: lazyStopCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the timeline is complete.
Timeline.play_swoopInfluence(fadeInTime)
[type: function]
Invokes 'play' on the Timeline while swooping it's influence up over the given duration.
Timeline.play_swoopInfluence parameter: fadeInTime
[type: number] [default: 0.25]
The amount of time to fade in this Timeline's influence.
----------------------------------------------------------
Section 125: TimeStamp
----------------------------------------------------------
TimeStamp
[type: class] [NON-INSTANTIABLE] [requires: module - timeStamp]
Object housing functionality for time stamps, the Incisor® standardized format for date and time.
TimeStamp.getTimeStamp(includeMilliseconds)
[type: function] [returns: string]
Produces the current time in the Incisor® standardized time stamp format: YYYY.MM.DD.hh.mm.ss(.mmmm)
TimeStamp.getTimeStamp parameter: includeMilliseconds
[type: boolean]
A boolean indicating if the timestamp will include milliseconds.
TimeStamp.compareTimestamps(firstTimestamp, secondTimestamp)
[type: function] [returns: string]
Compares two timestamps and returns a string describing their relationship ("lessThan","equal", or "greaterThan").
TimeStamp.compareTimestamps parameter: firstTimestamp
[type: string]
The first timestamp to compare.
TimeStamp.compareTimestamps parameter: secondTimestamp
[type: string]
The second timestamp to compare.
TimeStamp.compareIncisorVersionSets(firstVersionSetName, secondVersionSetName)
[type: function] [returns: string]
Compares the names of two Incisor® version sets and returns a string describing their relationship ("lessThan","equal", or "greaterThan").
TimeStamp.compareIncisorVersionSets parameter: firstVersionSetName
[type: string]
The first Incisor® version set name to compare.
TimeStamp.compareIncisorVersionSets parameter: secondVersionSetName
[type: string]
The second Incisor® version set name to compare.
----------------------------------------------------------
Section 126: UiBooleanSupervisor_checkbox
----------------------------------------------------------
UiBooleanSupervisor_checkbox
[type: class] [extends: UiGraphicButton] [requires: module - extendedUi]
A specialized UiGraphicButton that includes a Supervisor member, enabling it to monitor and adjust a boolean property's value during runtime. To use this class, configure the 'supervisedPropertyGetter' and 'supervisedPropertySetter' callbacks on the Supervisor. Once configured, the visibility of the 'graphicObject' member will be updated every fixed update to reflect the most current value of the supervised property, and the value of the supervised property will also be 'adjustable' via cursor interaction.
UiBooleanSupervisor_checkbox.supervisor
[type: Supervisor]
Supervisor with callbacks that enable this UiBooleanSupervisor_checkbox to monitor and adjust a boolean property's value during runtime.
----------------------------------------------------------
Section 127: UiButton
----------------------------------------------------------
UiButton
[type: class] [extends: LayoutStack] [requires: module - extendedUi]
A ui-specialized horizontal LayoutStack housing a text-based Button (including a UiPanel background) with various UI functionalities and defaults applied. UI functionality includes: • pre-configured with LayoutObject functionality. • uiStyle TextFormats and Colors applied. • pre-configured with 'UiKeyboardNavigable' functionality. • uiZoom-enabled. • nearestPixelRendering-enabled.
UiButton.isActive
[type: boolean] [default: true]
Boolean determining if the UiButton is available for end-user-internaction, or if it is unavailable and 'grayed out'.
UiButton.mainText
[type: TextBox]
The TextBox with main text for this UiButton. The size of the text informs the button's size and layout.
UiButton.displayLabel
[type: boolean] [default: false]
Boolean determining if a label TextBox is displayed to the left of the UiButton.
UiButton.label
[type: UiText] [default: undefined]
A UiText that acts as a label for the UiButton. Please note that this item is undefined until the 'displayLabel' property is set to true.
UiButton.mainButton
[type: Button]
The main Button for the UiButton, this object is a UiPanel which also implements Button.
UiButton.outline
[type: UiOutline]
The outline of the button, which is used to indicate when the end-user outlines this UiButton using keyboard navigation (tab, arrows, etc...).
UiButton.buttonBackgroundColor
[type: Color] [default: nc.uiStyle.color_buttonPanel]
The Color of the Button background.
UiButton.highlightedButtonBackgroundColor
[type: Color] [default: nc.uiStyle.color_highlightedButtonPanel]
The Color of the Button background when it's highlighted.
UiButton.addTriggerCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback that occurs whenever this UiButton is triggered via the cursor or keyboard navigation. The triggering browser-created event, and the UiButton itself are sent to the callback as its first two parameters.
UiButton.addTriggerCallback parameter: callbackOwner
[type: object]
The object owning the callback function that occurs whenever this UiButton is triggered via the cursor or keyboard navigation.
UiButton.addTriggerCallback parameter: callbackName
[type: string]
The name of the callback function that occurs whenever this UiButton is triggered via the cursor or keyboard navigation.
UiButton.addTriggerCallback parameter: callbackArgs
[type: Array, any] [optional]
Args for the callback function that is triggered whenever this UiButton is triggered via the cursor or keyboard navigation.
example:
// Objective: Add a TriggerCallback to a button
// Expected Result: You will see a button with the button text "Press Me". Pressing it will display text that says "You pressed the button."
// Add a callback function.
this.myCallback = function(args) {
let txt = new UiText( nc.mainScene, "ButtonMessageText" );
txt.position.x = 100;
txt.string = "You pressed the button."
}
let button = new UiButton( nc.mainScene, "MyButton" );
button.mainText.string = "Press Me";
button.displayLabel = false;
// add the trigger callback
button.addTriggerCallback( this, "myCallback" );
UiButton.removeTriggerCallback(callbackOwner, callbackName)
[type: function]
Removes the given trigger callback.
UiButton.removeTriggerCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
UiButton.removeTriggerCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
example:
// Objective: Remove a TriggerCallback to a button
// Expected Result: The "Press Me" button will increment the press count. Upon pressing the "Stop Counting" button, the "Press Me" button will no longer function.
let presses = 0;
let txt = new UiText( nc.mainScene, "ButtonMessageText" );
txt.position.x = 100;
txt.string = "You pressed the button 0 times.";
// Add a callback function ti increment the press count.
this.counter = function(args) {
presses++;
txt.string = "You pressed the button " + presses + " times.";
}
// Add a callback function to stop the counter callback
this.stopper = function(args) {
pressMeButton.removeTriggerCallback( this, "counter" );
}
// the button that will increment the press count
let pressMeButton = new UiButton( nc.mainScene, "PressMeButton" );
pressMeButton.mainText.string = "Press Me";
pressMeButton.displayLabel = false;
// add the trigger callback
pressMeButton.addTriggerCallback( this, "counter" );
// the button that will remove the counter callback
let stopCountingButton = new UiButton( nc.mainScene, "StopCountingButton" );
stopCountingButton.mainText.string = "Stop Counting";
stopCountingButton.displayLabel = false;
stopCountingButton.position.x = -150;
// add the trigger callback
stopCountingButton.addTriggerCallback( this, "stopper" );
----------------------------------------------------------
Section 128: UiCollapsibleStack
----------------------------------------------------------
UiCollapsibleStack
[type: class] [extends: LayoutStack] [requires: module - extendedUi]
A ui-specialized vertical LayoutStack with an interactive title header that toggles the visibility of a main LayoutStack. UI functionality includes: • pre-configured with LayoutObject functionality. • uiStyle TextFormats and Colors applied. • pre-configured with 'UiKeyboardNavigable' functionality. • uiZoom-enabled. • nearestPixelRendering-enabled.
UiCollapsibleStack.bodyStack
[type: LayoutStack]
The LayoutStack containing the main body of this UiCollapsibleStack. This LayoutStack is what is shown/expanded or hidden/collapsed by toggling the title header button.
UiCollapsibleStack.titleStack
[type: LayoutStack]
The LayoutStack containing the title header UiCollapsibleStack. This LayoutStack holds the interactive text/button that collapses and expands the content of this UiCollapsibleStack.
UiCollapsibleStack.titleTextBox
[type: TextBox]
The header title TextBox for this UiCollapsibleStack.
UiCollapsibleStack.caretIcon
[type: GraphicObject]
An caret image that indicates if the UiCollapsibleStack is collapsed or expanded.
UiCollapsibleStack.caretIconScaleFactor
[type: number]
A scale multiplier for the caretIcon GraphicObject. Use this property instead of directly scaling the caretIcon GraphicObject to preserve UiZoom and LayoutObject functionality.
UiCollapsibleStack.mainButton
[type: Button]
The main Button for the UiCollapsibleStack title heaader button, this object is a UiPanel which also implements Button. This item defaults to 'visible=false'.
UiCollapsibleStack.outline
[type: UiOutline]
The outline of the button, which is used to indicate when the end-user outlines this UiCollapsibleStack using keyboard navigation (tab, arrows, etc...).
UiCollapsibleStack.isExpanded
[type: boolean] [default: false]
Boolean determining if the UiCollapsibleStack is collapsed or expanded.
UiCollapsibleStack.buttonTextColor
[type: Color] [default: nc.uiStyle.color_interactiveText]
The base Color of the titleTextBox for this UiCollapsibleStack.
UiCollapsibleStack.highlightedButtonTextColor
[type: Color] [default: nc.uiStyle.color_highlightedInteractiveText]
The highlighted Color of the titleTextBox for this UiCollapsibleStack.
UiCollapsibleStack.buttonIncludesTitle
[type: boolean] [default: true]
Boolean indicating if the mainButton for this UiCollapsibleStack spans over the titleTextBox. When false the mainButton for this UiCollapsibleStack only encapsulates the caretIcon.
UiCollapsibleStack.addTriggerCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback that occurs whenever this UiCollapsibleStack is triggered via the cursor or keyboard navigation. In this case, 'triggering' also toggles the collapsed/expanded state of this UiCollapsibleStack, making this callback a good means to update the contents of the LayoutStack. The triggering browser-created event, and the UiCollapsibleStack itself are sent to the callback as its first two parameters.
UiCollapsibleStack.addTriggerCallback parameter: callbackOwner
[type: object]
The object owning the callback function that occurs whenever this UiCollapsibleStack is triggered via the cursor or keyboard navigation.
UiCollapsibleStack.addTriggerCallback parameter: callbackName
[type: string]
The name of the callback function that occurs whenever this UiCollapsibleStack is triggered via the cursor or keyboard navigation.
UiCollapsibleStack.addTriggerCallback parameter: callbackArgs
[type: Array, any] [optional]
Args for the callback function that is triggered whenever this UiCollapsibleStack is triggered via the cursor or keyboard navigation.
UiCollapsibleStack.removeTriggerCallback(callbackOwner, callbackName)
[type: function]
Removes the given trigger callback.
UiCollapsibleStack.removeTriggerCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
UiCollapsibleStack.removeTriggerCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
----------------------------------------------------------
Section 129: UiDropDownMenu
----------------------------------------------------------
UiDropDownMenu
[type: class] [extends: UiButton] [requires: module - extendedUi]
A specialized UiButton that displays a UiMenu. UI functionality includes: • pre-configured with LayoutObject functionality. • uiStyle TextFormats and Colors applied. • pre-configured with 'UiKeyboardNavigable' functionality. • uiZoom-enabled. • nearestPixelRendering-enabled.
UiDropDownMenu.uiMenu
[type: UiMenu]
The UiMenu that is displayed when the this button is triggered.
----------------------------------------------------------
Section 130: UiGraphicButton
----------------------------------------------------------
UiGraphicButton
[type: class] [extends: LayoutStack] [requires: module - extendedUi]
A ui-specialized horizontal LayoutStack housing an image-based Button (including a UiPanel background) with various UI functionalities and defaults applied. UI functionality includes: • pre-configured with LayoutObject functionality. • uiStyle TextFormats and Colors applied. • pre-configured with 'UiKeyboardNavigable' functionality. • uiZoom-enabled. • nearestPixelRendering-enabled.
UiGraphicButton.isActive
[type: boolean] [default: true]
Boolean determining if the UiGraphicButton is available for end-user-internaction, or if it is unavailable and 'grayed out'.
UiGraphicButton.graphicObject
[type: GraphicObject]
The GraphicObject for this UiGraphicButton.
UiGraphicButton.graphicScaleFactor
[type: number]
A scale multiplier for the graphic object. Use this property instead of directly scaling the GraphicObject to preserve UiZoom and LayoutObject functionality. Please note that this facter does not affect the size of the Button, just the GraphicObject displayed on it.
UiGraphicButton.width
[type: number]
The core width of the UiGraphicButton.
UiGraphicButton.height
[type: number]
The core height of the UiGraphicButton.
UiGraphicButton.displayLabel
[type: boolean] [default: false]
Boolean determining if a label TextBox is displayed to the left of the UiGraphicButton.
UiGraphicButton.label
[type: UiText] [default: undefined]
A UiText that acts as a label for the UiGraphicButton. Please note that this item is undefined until the 'displayLabel' property is set to true.
UiGraphicButton.mainButton
[type: Button]
The main Button for the UiGraphicButton, this object is a UiPanel which also implements Button.
UiGraphicButton.outline
[type: UiOutline]
The outline of the button, which is used to indicate when the end-user outlines this UiGraphicButton using keyboard navigation (tab, arrows, etc...).
UiGraphicButton.buttonBackgroundColor
[type: Color] [default: nc.uiStyle.color_buttonPanel]
The Color of the Button background.
UiGraphicButton.highlightedButtonBackgroundColor
[type: Color] [default: nc.uiStyle.color_highlightedButtonPanel]
The Color of the Button background when it's highlighted.
UiGraphicButton.addTriggerCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback that occurs whenever this UiGraphicButton is triggered via the cursor or keyboard navigation. The triggering browser-created event, and the UiGraphicButton itself are sent to the callback as its first two parameters.
UiGraphicButton.addTriggerCallback parameter: callbackOwner
[type: object]
The object owning the callback function that occurs whenever this UiGraphicButton is triggered via the cursor or keyboard navigation.
UiGraphicButton.addTriggerCallback parameter: callbackName
[type: string]
The name of the callback function that occurs whenever this UiGraphicButton is triggered via the cursor or keyboard navigation.
UiGraphicButton.addTriggerCallback parameter: callbackArgs
[type: Array, any] [optional]
Args for the callback function that is triggered whenever this UiGraphicButton is triggered via the cursor or keyboard navigation.
UiGraphicButton.removeTriggerCallback(callbackOwner, callbackName)
[type: function]
Removes the given trigger callback.
UiGraphicButton.removeTriggerCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
UiGraphicButton.removeTriggerCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
----------------------------------------------------------
Section 131: UiKeyboardNavigator
----------------------------------------------------------
UiKeyboardNavigator
[type: class] [NON-INSTANTIABLE] [requires: module - extendedUi]
Object housing functionality that enables for keyboard navigation of this SceneObject's ui-related descendants. Keyboard navigation enables the end-user to press the tab, space, and enter keys to outline and trigger any 'uiKeyboardNavigable' descendants of the SceneObject owning this UiKeyboardNavigator when it is 'in focus' according to 'nc.singularFocusObject'. SceneObjects have a member named "uiKeyboardNavigator", which defaults to undefined, but can be enabled, by calling 'SceneObject.configureUiKeyboardNavigator()'.
UiKeyboardNavigator.type
[type: string]
Type identifier.
UiKeyboardNavigator.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
UiKeyboardNavigator.defaultOutlined
[type: SceneObject]
If defined, this SceneObject will automatically be outlined when the SceneObject owning this UiKeyboardNavigator is the 'singularFocusObject'.
UiKeyboardNavigator.gotoNext(direction)
[type: function]
Instructs to the UiKeyboardNavigator to outline the next, current, or previous UiKeyboardNavigable descendant, based on the 'direction' paramter supplied.
UiKeyboardNavigator.gotoNext parameter: direction
[type: number] [default: 0] [optional]
Value supplied determining the direction of the navigation. 1 goes to next item, 0 outlines the current item, and -1 outlines the previous item.
UiKeyboardNavigator.dispose()
[type: function]
Disposes this UiKeyboardNavigator, disabling keyboard navigation for the SceneObject owning it, and freeing object for garbage collection.
----------------------------------------------------------
Section 132: UiKeyboardNavigable
----------------------------------------------------------
UiKeyboardNavigable
[type: class] [NON-INSTANTIABLE] [requires: module - extendedUi]
Object housing functionality that enables for this SceneObject to be accessible via keyboard navigation. Keyboard navigation enables the end-user to press the arrow keys, tab, space, and enter keys to outline and trigger any 'uiKeyboardNavigable' SceneObjects within a UiKeyboardNavigator-enabled parent that is currently 'in focus' according to 'nc.singularFocusObject'. SceneObjects have a member named "uiKeyboardNavigable", which defaults to undefined, but can be enabled, by calling 'SceneObject.configureUiKeyboardNavigable()'.
UiKeyboardNavigable.type
[type: string]
Type identifier.
UiKeyboardNavigable.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
UiKeyboardNavigable.anyKeyTriggers
[type: boolean] [default: false]
Flag determining if any key triggers the currently outlined UiKeyboardNavigable item. Standard UiKeyboardNavigable items are triggered by the "Enter" key and "Spacebar" key, when this flag is true, any key will trigger. Since the triggering keyboard event is sent through to the UiKeyboardNavigable item's 'trigger' callback, further costumizations can be added to the triggering key within the item itself (for example certain keys can be ignored etc...).
UiKeyboardNavigable.defaultOutlined
[type: SceneObject]
Optional SceneObject that will automatically be outlined the first time the owner of this UiKeyboardNavigation becomes the 'singularFocusObject'.
UiKeyboardNavigable.isActive
[type: boolean] [default: true]
Boolean determining if this UiKeyboardNavigable is currently active.
UiKeyboardNavigable.addSetOutlineCallback(callbackOwner, callbackName)
[type: function]
Adds a callback that occurs whenever this UiKeyboardNavigable item is in need of outlining or unoutlining. A boolean indicating the outline status is sent to the callback as its first parameter.
UiKeyboardNavigable.addSetOutlineCallback parameter: callbackOwner
[type: object]
The object owning the callback function that occurs whenever this UiKeyboardNavigable item is in need of outlining or unoutlining.
UiKeyboardNavigable.addSetOutlineCallback parameter: callbackName
[type: string]
The name of the callback function that occurs whenever this UiKeyboardNavigable item is in need of outlining or unoutlining.
UiKeyboardNavigable.removeSetOutlineCallback(callbackOwner, callbackName)
[type: function]
Removes the given setOutline callback.
UiKeyboardNavigable.removeSetOutlineCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
UiKeyboardNavigable.removeSetOutlineCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
UiKeyboardNavigable.addTriggerCallback(callbackOwner, callbackName)
[type: function]
Adds a callback that occurs whenever this UiKeyboardNavigable item triggered via the enter key or the space bar. The triggering browser-generated event is sent to the callback as its first parameter.
UiKeyboardNavigable.addTriggerCallback parameter: callbackOwner
[type: object]
The object owning the callback function that occurs whenever this UiKeyboardNavigable item triggered via the enter key or the space bar.
UiKeyboardNavigable.addTriggerCallback parameter: callbackName
[type: string]
The name of the callback function that occurs whenever this UiKeyboardNavigable item triggered via the enter key or the space bar.
UiKeyboardNavigable.removeTriggerCallback(callbackOwner, callbackName)
[type: function]
Removes the given trigger callback.
UiKeyboardNavigable.removeTriggerCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
UiKeyboardNavigable.removeTriggerCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
UiKeyboardNavigable.dispose()
[type: function]
Disposes this UiKeyboardNavigable, disabling keyboard navigation for the SceneObject owning it, and freeing object for garbage collection.
----------------------------------------------------------
Section 133: UiLinkButton
----------------------------------------------------------
UiLinkButton
[type: class] [extends: LayoutStack] [requires: module - extendedUi]
A ui-specialized horizontal LayoutStack housing a text-based Button with various UI functionalities and defaults applied. The UiLinkButton is similar to the UiButton, but has no visible background, and instead the text itself is the interactive component. UI functionality includes: • pre-configured with LayoutObject functionality. • uiStyle TextFormats and Colors applied. • pre-configured with 'UiKeyboardNavigable' functionality. • uiZoom-enabled. • nearestPixelRendering-enabled.
UiLinkButton.isActive
[type: boolean] [default: true]
Boolean determining if the UiLinkButton is available for end-user-internaction, or if it is unavailable and 'grayed out'.
UiLinkButton.mainText
[type: TextBox]
The TextBox with main text for this UiLinkButton. The size of the text informs the button's size and layout.
UiLinkButton.displayLabel
[type: boolean] [default: false]
Boolean determining if a label TextBox is displayed to the left of the UiLinkButton.
UiLinkButton.label
[type: UiText] [default: undefined]
A UiText that acts as a label for the UiLinkButton. Please note that this item is undefined until the 'displayLabel' property is set to true.
UiLinkButton.mainButton
[type: Button]
The main Button for the UiLinkButton, this object is a UiPanel which also implements Button. This item defaults to 'visible=false'.
UiLinkButton.outline
[type: UiOutline]
The outline of the button, which is used to indicate when the end-user outlines this UiLinkButton using keyboard navigation (tab, arrows, etc...).
UiLinkButton.buttonTextColor
[type: Color] [default: nc.uiStyle.color_interactiveText]
The base Color of the TextBox for this UiLinkButton.
UiLinkButton.highlightedButtonTextColor
[type: Color] [default: nc.uiStyle.color_highlightedInteractiveText]
The highlighted Color of the TextBox for this UiLinkButton.
UiLinkButton.addTriggerCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback that occurs whenever this UiLinkButton is triggered via the cursor or keyboard navigation. The triggering browser-created event, and the UiLinkButton itself are sent to the callback as its first two parameters.
UiLinkButton.addTriggerCallback parameter: callbackOwner
[type: object]
The object owning the callback function that occurs whenever this UiLinkButton is triggered via the cursor or keyboard navigation.
UiLinkButton.addTriggerCallback parameter: callbackName
[type: string]
The name of the callback function that occurs whenever this UiLinkButton is triggered via the cursor or keyboard navigation.
UiLinkButton.addTriggerCallback parameter: callbackArgs
[type: Array, any] [optional]
Args for the callback function that is triggered whenever this UiLinkButton is triggered via the cursor or keyboard navigation.
UiLinkButton.removeTriggerCallback(callbackOwner, callbackName)
[type: function]
Removes the given trigger callback.
UiLinkButton.removeTriggerCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
UiLinkButton.removeTriggerCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
----------------------------------------------------------
Section 134: UiMenu
----------------------------------------------------------
UiMenu
[type: class] [extends: SceneObject] [requires: module - extendedUi]
A ui-specialized SceneObject that functions as a menu with menuItem options that can be selected with the cursor or with keyboard navigation. UI functionality includes: • pre-configured with LayoutObject functionality. • uiStyle TextFormats and Colors applied. • pre-configured with 'UiKeyboardNavigable' functionality. • uiZoom-enabled. • pre-configured with 'UiVisualFocus' functionality. • nearestPixelRendering-enabled.
UiMenu.isOpen
[type: boolean] [default: false]
Boolean determining if the menu is open or closed.
UiMenu.menuBackground
[type: UiPanel]
The UiPanel shown behind the UiMenuItem options in this UiMenu.
UiMenu.searchable
[type: boolean]
Boolean determining if a search UiTextField appears at the top of the menu. When true, end-users can type in the field to filter the options shown in the UiMenu.
UiMenu.searchBarMenuItem
[type: UiMenuItem]
The search bar UiMenuItem.
UiMenu.searchIconScaleFactor
[type: number]
Scale multiplier for the search icon graphic.
UiMenu.minWidth
[type: number]
The minimum width of the UiMenu.
UiMenu.textFormat
[type: TextFormat]
The default TextFormat for the text within the UiMenu.
UiMenu.menuItemBackgroundColor
[type: Color]
The default Color for the UiMenuItem backgrounds.
UiMenu.textColor
[type: Color]
The default Color for the active text within the UiMenu.
UiMenu.inactiveTextColor
[type: Color]
The default Color for the inactive text within the UiMenu.
UiMenu.textBuffer
[type: number]
The size of the buffer spacer around and between text.
UiMenu.parentMenu
[type: UiMenu]
If this UiMenu is a subMenu, then this property will be populated with the parent UiMenu, otherwise it will be undefined.
UiMenu.singularFocusTarget
[type: SceneObject]
The SceneObject that 'nc.singularFocusObject' will be set to when this UiMenu opens. The default value is set to this UiMenu, but in the case where this UiMenu is a descendant of a SceneObject that would be a better choice for singular focus (like when a UiMenu is part of a UiDropDownMenu etc...), this option can be used to substitute a singular focus recipient.
UiMenu.addMenuItem(name, leftIconGraphicAsset, secondaryString, rightIconGraphicAsset, index)
[type: function] [returns: UiMenuItem]
Adds a new UiMenuItem to the UiMenu.
UiMenu.addMenuItem parameter: name
[type: string]
The string that will appear in the UiMenu.
UiMenu.addMenuItem parameter: leftIconGraphicAsset
[type: GraphicAsset] [optional]
Optional GraphicAsset to include on the left side of the UiMenuItem.
UiMenu.addMenuItem parameter: secondaryString
[type: string] [optional]
Optional secondary string to display on the right side of the UiMenuItem
UiMenu.addMenuItem parameter: rightIconGraphicAsset
[type: GraphicAsset] [optional]
Optional GraphicAsset to include on the right side of the UiMenuItem.
UiMenu.addMenuItem parameter: index
[type: number] [optional]
Index array location to insert the new UiMenuItem.
UiMenu.removeMenuItem(uiMenuItem)
[type: function]
Removes a UiMenuItem.
UiMenu.removeMenuItem parameter: uiMenuItem
[type: UiMenuItem]
The UiMenuItem to remove.
UiMenu.removeMenuItemByName(name)
[type: function]
Removes the UiMenuItem with the given name.
UiMenu.removeMenuItemByName parameter: name
[type: string]
The name of the UiMenuItem to remove.
UiMenu.addMenuItemTriggerCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback that occurs whenever one of the UiMenuItems is selected via the cursor or keyboard navigation. The triggering UiMenuItem, and the UiMenu itself are sent to the callback as its first two parameters.
UiMenu.addMenuItemTriggerCallback parameter: callbackOwner
[type: object]
The object owning the callback function that occurs whenever one of the UiMenuItems is selected via the cursor or keyboard navigation.
UiMenu.addMenuItemTriggerCallback parameter: callbackName
[type: string]
The name of the callback function that occurs whenever one of the UiMenuItems is selected via the cursor or keyboard navigation.
UiMenu.addMenuItemTriggerCallback parameter: callbackArgs
[type: Array, any] [optional]
Args for the callback function that occurs whenever one of the UiMenuItems is selected via the cursor or keyboard navigation.
UiMenu.removeMenuItemTriggerCallback(callbackOwner, callbackName)
[type: function]
Removes the given trigger callback.
UiMenu.removeMenuItemTriggerCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
UiMenu.removeMenuItemTriggerCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
UiMenu.addOpenCloseCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback that occurs whenever the UiMenu is opened or closed via triggering or direct manipulation of the 'isOpen' flag. The UiMenu itself is sent to the callback as its first parameter.
UiMenu.addOpenCloseCallback parameter: callbackOwner
[type: object]
The object owning the callback function that occurs whenever the UiMenu is opened or closed.
UiMenu.addOpenCloseCallback parameter: callbackName
[type: string]
The name of the callback function that occurs whenever the UiMenu is opened or closed.
UiMenu.addOpenCloseCallback parameter: callbackArgs
[type: Array, any] [optional]
Args for the callback function that occurs whenever the UiMenu is opened or closed.
UiMenu.removeOpenCloseCallback(callbackOwner, callbackName)
[type: function]
Removes the given trigger callback.
UiMenu.removeOpenCloseCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
UiMenu.removeOpenCloseCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
UiMenu.getMenuItems()
[type: function] [returns: [UiMenuItem]]
Retuns an array of the current UiMenuItems in this UiMenu.
UiMenu.clearMenuItems()
[type: function]
Clears all UiMenuItems.
----------------------------------------------------------
Section 135: UiMenuItem
----------------------------------------------------------
UiMenuItem
[type: class] [NON-INSTANTIABLE] [requires: module - extendedUi]
A ui-specialized object with the components that comprise a menu item option within a UiMenu. UI functionality includes: • pre-configured with LayoutObject functionality. • uiStyle TextFormats and Colors applied. • pre-configured with 'UiKeyboardNavigable' functionality. • uiZoom-enabled.
UiMenuItem.mainMenuItem
[type: TextBox, UiTextField]
The main item showing in the UiMenu for each UiMenuItem. For all UiMenuItems except the searchBarMenuItem, this object is of type TextBox.
UiMenuItem.mainButton
[type: UiPanel]
The main Button for the UiMenu for each UiMenuItem.
UiMenuItem.leftIconGraphicAsset
[type: GraphicAsset]
The GraphicAsset for an optional icon to show on the left side of the UiMenuItem.
UiMenuItem.leftIconScaleFactor
[type: number]
The scale factor for the optional icon to show on the left side of the UiMenuItem. Use this property instead of directly scaling the GraphicObject to preserve UiZoom and LayoutObject functionality.
UiMenuItem.leftIconGraphicObject
[type: GraphicObject]
The read-only GraphicObject for the optional icon to show on the left side of the UiMenuItem.
UiMenuItem.rightIconGraphicAsset
[type: GraphicAsset]
The GraphicAsset for an optional icon to show on the right side of the UiMenuItem.
UiMenuItem.rightIconScaleFactor
[type: number]
The scale factor for the optional icon to show on the right side of the UiMenuItem. Use this property instead of directly scaling the GraphicObject to preserve UiZoom and LayoutObject functionality.
UiMenuItem.rightIconGraphicObject
[type: GraphicObject]
The read-only GraphicObject for the optional icon to show on the right side of the UiMenuItem.
UiMenuItem.name
[type: string]
The main string shown in the UiMenu for this UiMenuItem.
UiMenuItem.secondaryString
[type: string]
The secondary string shown in the UiMenu on the right side of this UiMenuItem.
UiMenuItem.secondaryTextBox
[type: TextBox]
The read-only TextBox for the optional secondary text to show on the right side of the UiMenuItem.
UiMenuItem.triggeringClosesMenu
[type: boolean] [default: true]
Boolean determining if triggering this UiMenuItem automatically closes the menu.
UiMenuItem.subMenu
[type: UiMenu]
If this UiMenuItem opens a sub-menu, then this property will be populated a reference to thed associated UiMenu, otherwise it will be undefined.
UiMenuItem.dispose()
[type: function]
Disposes the UiMenuItem and all of its components
----------------------------------------------------------
Section 136: UiNumberSupervisor_textField
----------------------------------------------------------
UiNumberSupervisor_textField
[type: class] [extends: UiButton] [requires: module - extendedUi]
A specialized UiTextField that includes a Supervisor member, enabling it to monitor and adjust a number property's value during runtime. To use this class, configure the 'supervisedPropertyGetter' and 'supervisedPropertySetter' callbacks on the Supervisor. Once configured, the 'mainText' TextBox will be updated every fixed update to reflect the most current value of the supervised property, and the value of the supervised property will also be 'adjustable' via keyboard and cursor interaction.
UiNumberSupervisor_textField.supervisor
[type: Supervisor]
Supervisor with callbacks that enable this UiNumberSupervisor_textField to monitor and adjust a number property's value during runtime.
UiNumberSupervisor_textField.dragMultiplier
[type: number] [default: 1]
Number that multiplies the affect of dragging with this UiNumberSupervisor_textField. For reference, a value of 1 is fitting for a numeric property whose range is roughly 500;
UiNumberSupervisor_textField.sliderArrowsIcon
[type: GraphicObject]
GraphicObject on the leftmost side of this UiNumberSupervisor_textField indicating that it can be dragged and scrolled.
UiNumberSupervisor_textField.sliderArrowsIconScaleFactor
[type: number]
Number multiplying the scale of the 'sliderArrowsIcon' GraphicObject. Use this property instead of directly scaling the sliderArrowsIcon GraphicObject to preserve UiZoom and LayoutObject functionality.
UiNumberSupervisor_textField.displayPrecision
[type: number] [default: 3]
The number of digits shown to the right of the decimal within the UiTextField for this UiNumberSupervisor_textField.
----------------------------------------------------------
Section 137: UiPopupWindow
----------------------------------------------------------
UiPopupWindow
[type: class] [extends: LayoutStack] [requires: module - extendedUi]
A ui-specialized vertical LayoutStack that functions as a pop-up window. UI functionality includes: • pre-configured with LayoutObject functionality. • uiStyle TextFormats and Colors applied. • pre-configured with 'UiKeyboardNavigable' functionality. • uiZoom-enabled. • pre-configured with 'UiVisualFocus' functionality. • nearestPixelRendering-enabled.
UiPopupWindow.isOpen
[type: boolean]
Boolean determining if this UiPopupWindow is displayed/enabled. When this property is set to true, this UiPopupWindow becomes the 'singularFocusObject' and also assumes 'visual focus'.
UiPopupWindow.backgroundPanel
[type: UiPanel]
A UiPanel that serves as the background to the UiPopupWindow.
UiPopupWindow.topBarLeftStack
[type: LayoutStack]
The horizontal LayoutStack containing top bar, which includes the 'ex' button and the title TextBox.
UiPopupWindow.topBarBackground
[type: UiPanel]
A UiPanel that serves as the background to the top bar in the UiPopupWindow.
UiPopupWindow.exButton
[type: UiGraphicButton]
A UiGraphicButton that serves the 'ex' button in the top-left corner of the UiPopupWindow.
UiPopupWindow.titleText
[type: TextBox]
The TextBox serving as the top bar title for the UiPopUpWindow.
UiPopupWindow.bodyStack
[type: LayoutStack]
The LayoutStack containing the main body displayed by this UiPopupWindow.
UiPopupWindow.decisionButtonStack
[type: LayoutStack]
The horizontal LayoutStack containing decision buttons (UiButtons) displayed in the lower-right corner of this UiPopupWindow.
UiPopupWindow.isMovable
[type: boolean] [default: true]
Flag determining if the UiPopupWindow can be moved via dragging.
UiPopupWindow.allowEscape
[type: boolean] [default: false]
Boolean determining if the end-user can press the 'Escape' key, click the 'ex' button, or click outside of the visual focus dimmer background to exit the UiPopupWindow. Setting this value to false would effectively require that the end-user click one of the decision buttons to exit the UiPopupWindow.
UiPopupWindow.setDecisionButtons(decisionNames, rightmostUiButtonIsAutoOutlined)
[type: function]
A convienience function to bulk-add decision buttons, which are just a series of standardized UiButtons at the bottom of the UiPopupWindow. Once the decision buttons have been added, 'addDecisionButtonTriggerCallback' can be used to add a callback which receives the button's text string, the triggering UiButton itself, and the containing UiPopupWindow as its first three parameters.
UiPopupWindow.setDecisionButtons parameter: decisionNames
[type: [string]]
An array of strings, where each string will become a UiButton at the bottom of the UiPopupWindow.
UiPopupWindow.setDecisionButtons parameter: rightmostUiButtonIsAutoOutlined
[type: string] [optional]
Boolean determining if the rightmost decision button is automatically outlined whenever the UiPopupWindow is opened.
UiPopupWindow.addDecisionButtonTriggerCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback that occurs whenever a decision button is triggered via the cursor or keyboard navigation. The decision string, the triggering UiButton, and the containing UiPopupWindow itself are sent to the callback as its first three parameters.
UiPopupWindow.addDecisionButtonTriggerCallback parameter: callbackOwner
[type: object]
The object owning the callback function that occurs whenever a decision button is triggered via the cursor or keyboard navigation.
UiPopupWindow.addDecisionButtonTriggerCallback parameter: callbackName
[type: string]
The name of the callback function that occurs whenever a decision button is triggered via the cursor or keyboard navigation.
UiPopupWindow.addDecisionButtonTriggerCallback parameter: callbackArgs
[type: Array, any] [optional]
Args for the callback function that is triggered whenever a decision button is triggered via the cursor or keyboard navigation.
UiPopupWindow.addOpenCloseCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback that occurs whenever a UiPopupWindow is opened or closed. A boolean indicating if the UiPopupWindow is open, and the UiPopupWindow itself will be sent to the callback as the first two parameters.
UiPopupWindow.addOpenCloseCallback parameter: callbackOwner
[type: object]
The object owning the callback function that occurs whenever a this UiPopupWindow is opened or closed.
UiPopupWindow.addOpenCloseCallback parameter: callbackName
[type: string]
The name of the callback function that occurs whenever a this UiPopupWindow is opened or closed.
UiPopupWindow.addOpenCloseCallback parameter: callbackArgs
[type: Array, any] [optional]
Args for the callback function that occurs whenever a this UiPopupWindow is opened or closed.
UiPopupWindow.awaitClose()
[type: function]
Asynchronously awaits the closing of the UiPopupWindow.
----------------------------------------------------------
Section 138: UiStringSupervisor_menu
----------------------------------------------------------
UiStringSupervisor_menu
[type: class] [extends: UiDropDownMenu] [requires: module - extendedUi]
A specialized UiDropDownMenu that includes a Superivor member, enabling it to monitor and adjust a string property's value during runtime. To use this class, configure the 'supervisedPropertyGetter' and 'supervisedPropertySetter' callbacks on the Supervisor. Once configured, the 'mainText' member will be updated every fixed update to reflect the most current value of the supervised string property, and the value of the supervised property will also be 'adjustable' via cursor interaction with the UiMenu.
UiStringSupervisor_menu.supervisor
[type: Supervisor]
Supervisor with callbacks that enable this UiStringSupervisor_menu to monitor and adjust a boolean property's value during runtime.
UiStringSupervisor_menu.updateStringOptionsCallbackOwner
[type: object]
The owner of the optional callback function that will be called whenever the UiMenu is opened in order to update the list of options. The provided callback function should return an Array of strings meant to be the options presented by this UiStringSupervisor_menu.
UiStringSupervisor_menu.updateStringOptionsCallbackName
[type: string]
The name of the optional callback function that will be called whenever the UiMenu is opened in order to update the list of options. The provided callback function should return an Array of strings meant to be the options presented by this UiStringSupervisor_menu.
UiStringSupervisor_menu.updateStringOptionsCallbackArgs
[type: any]
Parameters for the optional callback function that will be called whenever the UiMenu is opened in order to update the list of options. The provided callback function should return an Array of strings meant to be the options presented by this UiStringSupervisor_menu.
UiStringSupervisor_menu.setStringOptions(stringOptions)
[type: function]
Method to update the list of string options available within the UiMenu. This method can be used once during setup in situations where the list of options is static. In such a case, the 'updateStringOptionsCallback' callback could be left undefined.
UiStringSupervisor_menu.setStringOptions parameter: stringOptions
[type: [string]]
The list of strings that will appear as options in the drop down menu.
----------------------------------------------------------
Section 139: UiStringSupervisor_textField
----------------------------------------------------------
UiStringSupervisor_textField
[type: class] [extends: UiTextField] [requires: module - extendedUi]
A specialized UiTextField that includes a Superivor member, enabling it to monitor and adjust a string property's value during runtime. To use this class, configure the 'supervisedPropertyGetter' and 'supervisedPropertySetter' callbacks on the Supervisor. Once configured, the 'mainText' TextBox will be updated every fixed update to reflect the most current value of the supervised property, and the value of the supervised property will also be 'adjustable' via direct editing of the 'mainText' TextBox.
UiStringSupervisor_textField.supervisor
[type: Supervisor]
Supervisor with callbacks that enable this UiStringSupervisor_textField to monitor and adjust a string property's value during runtime.
----------------------------------------------------------
Section 140: UiStyle
----------------------------------------------------------
UiStyle
[type: class] [NON-INSTANTIABLE] [requires: module - pixelsObjects]
Object housing default TextFormats, and Colors for various Gui objects such as 'UiButton', 'DropDownMenu' and 'PopUpWindow'.
UiStyle.type
[type: string]
Type identifier.
UiStyle.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
UiStyle.textFormat_heading
[type: TextFormat]
The default TextFormat for heading text in the Gui.
UiStyle.textFormat_subHeading
[type: TextFormat]
The default TextFormat for sub-heading text in the Gui.
UiStyle.textFormat_body
[type: TextFormat]
The default TextFormat for body text in the Gui.
UiStyle.textFormat_technical
[type: TextFormat]
The default TextFormat for technical text in the Gui.
UiStyle.textFormat_tiny
[type: TextFormat]
The default TextFormat for tiny text in the Gui.
UiStyle.color_appHeader
[type: Color]
The default color for the application header.
UiStyle.color_headerTitle
[type: Color]
The default color for the title in the header.
UiStyle.color_mainText
[type: Color]
The default color for text.
UiStyle.color_inactiveText
[type: Color]
The default color for text that is not active.
UiStyle.color_interactiveText
[type: Color]
The default color for interactive text.
UiStyle.color_semiInteractiveText
[type: Color]
The default color for semi-interactive text.
UiStyle.color_editorBackgroundDark
[type: Color]
The default color for the dark parts of editor backgrounds.
UiStyle.color_editorBackgroundLight
[type: Color]
The default color for the light parts of editor backgrounds.
UiStyle.color_highlightedInteractiveText
[type: Color]
The default color for highlighted interactive text.
UiStyle.color_mainPanelBackground
[type: Color]
The default color for background panels.
UiStyle.color_lightPanelBackground
[type: Color]
The default color for light background panels.
UiStyle.color_darkPanelBackground
[type: Color]
The default color for dark background panels.
UiStyle.color_panelHeader
[type: Color]
The default color for panel headers.
UiStyle.color_panelBorder
[type: Color]
The default color for panel borders.
UiStyle.color_panelHeaderHighlight
[type: Color]
The default color for highlighted header panels.
UiStyle.color_buttonPanel
[type: Color]
The default color for button panels.
UiStyle.color_highlightedButtonPanel
[type: Color]
The default color for highlighted button panels.
UiStyle.color_builtInHeaderMenu
[type: Color]
The default color for the built in header menus.
UiStyle.color_popupWindowHeader
[type: Color]
The default color for popup window headers.
UiStyle.color_brightHighlightedButtonPanel
[type: Color]
The default color for bright highlighted button panels.
UiStyle.color_navigationOutline
[type: Color]
The default color for navigation outlining and highlighting.
UiStyle.color_selection
[type: Color]
The default color for selected UI objects.
UiStyle.color_selectionOutlineBase
[type: Color]
A deeper, more saturated version of 'color_selection'.
UiStyle.graphicAssetName_caret
[type: string]
The name of the GraphicAsset to use wherever a caret icon (basically an arrow) is needed in UI components.
UiStyle.graphicAssetName_magnifyingglass
[type: string]
The name of the GraphicAsset to use wherever a magnifying glass icon (like next to a search bar) is needed in UI components.
UiStyle.graphicAssetName_checkmark
[type: string]
The name of the GraphicAsset to use wherever a checkmark icon is needed in UI components.
UiStyle.graphicAssetName_ex
[type: string]
The name of the GraphicAsset to use wherever an 'X' icon is needed in UI components.
UiStyle.graphicAssetName_minus
[type: string]
The name of the GraphicAsset to use wherever an '-' icon is needed in UI components.
UiStyle.spacer_tiny
[type: number]
The standard 'tiny' spacer for the gui.
UiStyle.spacer_small
[type: number]
The standard 'small' spacer for the gui.
UiStyle.spacer_medium
[type: number]
The standard 'medium' spacer for the gui.
UiStyle.spacer_large
[type: number]
The standard 'large' spacer for the gui.
UiStyle.addUiPanelCallbackOwner
[type: object]
The owner of the callback function responsible for returning a UiPanel, which is a customizable rectangle of color. UiPanels are used throughout the various gui objects, like UiButton, UiTextField, DropdownMenu, PopupMenu etc., and generally contribute to the look of the gui. The provided callback must return an instance of this UiPanel, which is a SceneObject that has 2 additional properties (probably built with getter/setters) 'width' and 'height'. Also, the object produced from this callback will need to have EffectNodes that respond to the 'colorMultiply' EffectController, as that EffectController is used to set the color for the UiPanel for its different uses throughout the ui. This callback is defaults to an internal function that returns a UiPanel that is essentially a WhiteBox, but can be changed to customize the look of the gui.
UiStyle.addUiPanelCallbackName
[type: string]
The name of the callback function responsible for returning a UiPanel, which is a customizable rectangle of color. UiPanels are used throughout the various gui objects, like UiButton, UiTextField, DropdownMenu, PopupMenu etc., and generally contribute to the look of the gui. The provided callback must return an instance of this UiPanel, which is a SceneObject that has 2 additional properties (probably built with getter/setters) 'width' and 'height'. Also, the object produced from this callback will need to have EffectNodes that respond to the 'colorMultiply' EffectController, as that EffectController is used to set the color for the UiPanel for its different uses throughout the ui. This callback is defaults to an internal function that returns a UiPanel that is essentially a WhiteBox, but can be changed to customize the look of the gui.
UiStyle.addUiOutlineCallbackOwner
[type: object]
The owner of the callback function responsible for returning a UiOutline, which is a customizable rectangular outline. UiOutlines are used throughout the various gui objects, like UiButton, UiTextField, DropdownMenu, PopupMenu etc., and generally contribute to the look of the gui. The provided callback must return an instance of this UiOutline, which is a SceneObject that has 2 additional properties (probably built with getter/setters) 'width' and 'height'. Also, the object produced from this callback will need to have EffectNodes that respond to the 'colorMultiply' EffectController, as that EffectController is used to set the color for the UiPanel for its different uses throughout the ui. This callback is defaults to an internal function that returns a UiOutline that is essentially a rectangle made of 4 WhiteBoxes, but can be changed to customize the look of the gui.
UiStyle.addUiOutlineCallbackName
[type: string]
The name of the callback function responsible for returning a UiOutline, which is a customizable rectangular outline. UiOutlines are used throughout the various gui objects, like UiButton, UiTextField, DropdownMenu, PopupMenu etc., and generally contribute to the look of the gui. The provided callback must return an instance of this UiOutline, which is a SceneObject that has 2 additional properties (probably built with getter/setters) 'width' and 'height'. Also, the object produced from this callback will need to have EffectNodes that respond to the 'colorMultiply' EffectController, as that EffectController is used to set the color for the UiPanel for its different uses throughout the ui. This callback is defaults to an internal function that returns a UiOutline that is essentially a rectangle made of 4 WhiteBoxes, but can be changed to customize the look of the gui.
UiStyle.addUiPanel(parent, name)
[type: function] [returns: UiPanel]
Adds a new UiPanel to the given parent SceneObject.
UiStyle.addUiPanel parameter: parent
[type: SceneObject] [default: nc.mainScene] [optional]
The parent SceneObject that the new UiPanel will become a child of.
UiStyle.addUiPanel parameter: name
[type: string] [default: 'UiPanel'] [optional]
The name of the new UiPanel.
UiStyle.addUiOutline(parent, name)
[type: function] [returns: UiOutline]
Adds a new UiOutline to the given parent SceneObject.
UiStyle.addUiOutline parameter: parent
[type: SceneObject] [default: nc.mainScene] [optional]
The parent SceneObject that the new UiOutline will become a child of.
UiStyle.addUiOutline parameter: name
[type: string] [default: 'UiOutline'] [optional]
The name of the new UiOutline.
UiStyle.standardVisualFeedback(sceneObject)
[type: function]
Provides a standardized visual feeback consiting of a fast burst of brightness. This feedback is used for most standardized trigger events such as Button presses and keynavigation triggers.
UiStyle.standardVisualFeedback parameter: sceneObject
[type: SceneObject]
The SceneObject that the visual feeback will be applied to.
----------------------------------------------------------
Section 141: UiPanel
----------------------------------------------------------
UiPanel
[type: class] [extends: SceneObject]
This is a customizable panel of color used throughout the various gui objects such as UiButton, UiTextField, DropdownMenu, PopupMenu etc., which generally contributes to the look of the gui. The nature of this object can be customized by supplying a new callback function to 'nc.uiStyle.addUiPanelCallbackOwner' and 'nc.uiStyle.addUiPanelCallbackName'.
UiPanel.width
[type: number]
Number controlling the width of the UiPanel.
UiPanel.height
[type: number]
Number controlling the height of the UiPanel.
UiPanel.colorMultiply
[type: Color]
Color controlling the coloring of the UiPanel.
----------------------------------------------------------
Section 142: UiOutline
----------------------------------------------------------
UiOutline
[type: class] [extends: SceneObject] [NON-INSTANTIABLE]
This is a customizable rectangular outline used throughout the various gui objects such as UiButton, UiTextField, DropdownMenu, PopupMenu etc., which generally contributes to the look of the gui. The nature of this object can be customized by supplying a new callback function to 'nc.uiStyle.addUiOutlineCallbackOwner' and 'nc.uiStyle.addUiOutlineCallbackName'.
UiOutline.width
[type: number]
Number controlling the width of the UiOutline.
UiOutline.height
[type: number]
Number controlling the height of the UiOutline.
UiOutline.colorMultiply
[type: Color]
Color controlling the coloring of the UiOutline.
----------------------------------------------------------
Section 143: UiTextField
----------------------------------------------------------
UiTextField
[type: class] [extends: LayoutStack] [requires: module - extendedUi]
A ui-specialized horizontal LayoutStack housing an editable TextBox with various UI functionalities and defaults applied. UI functionality includes: • pre-configured with LayoutObject functionality. • uiStyle TextFormats and Colors applied. • pre-configured with 'UiKeyboardNavigable' functionality. • uiZoom-enabled. • pre-configured with 'UiVisualFocus' functionality. • nearestPixelRendering-enabled.
UiTextField.isActive
[type: boolean] [default: true]
Boolean determining if the UiTextField is available for end-user-internaction, or if it is unavailable and 'grayed out'.
UiTextField.mainText
[type: TextBox]
The main editable TextBox for this UiTextField.
UiTextField.displayLabel
[type: boolean] [default: false]
Boolean determining if a label TextBox is displayed to the left of the UiTextField.
UiTextField.label
[type: UiText] [default: undefined]
A UiText that acts as a label for the UiTextField. Please note that this item is undefined until the 'displayLabel' property is set to true.
UiTextField.mainButton
[type: Button]
The main Button for the UiTextField, this object is a UiPanel which also implements Button.
UiTextField.outline
[type: UiOutline]
The outline of the button, which is used to indicate when the end-user outlines this UiTextField using keyboard navigation (tab, arrows, etc...).
UiTextField.buttonBackgroundColor
[type: Color] [default: nc.uiStyle.color_buttonPanel]
The Color of the Button background.
UiTextField.highlightedButtonBackgroundColor
[type: Color] [default: nc.uiStyle.color_highlightedButtonPanel]
The Color of the Button background when it's highlighted.
UiTextField.addTriggerCallback(callbackOwner, callbackName, callbackArgs)
[type: function]
Adds a callback that occurs whenever this UiTextField is triggered via the cursor or keyboard navigation. The triggering browser-created event, and the UiTextField itself are sent to the callback as its first two parameters.
UiTextField.addTriggerCallback parameter: callbackOwner
[type: object]
The object owning the callback function that occurs whenever this UiTextField is triggered via the cursor or keyboard navigation.
UiTextField.addTriggerCallback parameter: callbackName
[type: string]
The name of the callback function that occurs whenever this UiTextField is triggered via the cursor or keyboard navigation.
UiTextField.addTriggerCallback parameter: callbackArgs
[type: Array, any] [optional]
Args for the callback function that is triggered whenever this UiTextField is triggered via the cursor or keyboard navigation.
UiTextField.removeTriggerCallback(callbackOwner, callbackName)
[type: function]
Removes the given trigger callback.
UiTextField.removeTriggerCallback parameter: callbackOwner
[type: object]
The object owning the callback to be removed.
UiTextField.removeTriggerCallback parameter: callbackName
[type: string]
The name of the callback to be removed.
----------------------------------------------------------
Section 144: UiText
----------------------------------------------------------
UiText
[type: class] [extends: TextBox] [requires: module - extendedUi]
A ui-specialized TextBox with various UI functionalities and defaults applied. UI functionality includes: • pre-configured with LayoutObject functionality. • uiStyle TextFormats and Colors applied. • uiZoom-enabled. • nearestPixelRendering-enabled.
----------------------------------------------------------
Section 145: UiVectorSupervisor_textField
----------------------------------------------------------
UiVectorSupervisor_textField
[type: class] [extends: UiCollapsibleStack] [requires: module - extendedUi]
A specialized UiCollapsibleStack that includes a group of UiTextFields and a Superivor member, enabling it to monitor and adjust a Vector property's value during runtime. To use this class, configure the 'supervisedPropertyGetter' and 'supervisedPropertySetter' callbacks on the Supervisor. Once configured, the included UiTextFields will be updated every fixed update to reflect the most current values of the supervised Vector components, and the component values will also be 'adjustable' via direct editing of the UiTextFields, as well as through cursor interaction.
UiVectorSupervisor_textField.supervisor
[type: Supervisor]
Supervisor with callbacks that enable this UiStringSupervisor_textField to monitor and adjust a Vector's component values during runtime.
UiVectorSupervisor_textField.defaultDimension
[type: number] [default: 3]
The number of components shown by default - i.e. this is the number of components that will be shown when the supervisedPropertyGetter returns undefined.
UiVectorSupervisor_textField.displayPrecision
[type: number] [default: 3]
The number of digits shown to the right of the decimal within the component UiTextFields of this UiVectorSupervisor_textField.
UiVectorSupervisor_textField.getComponentTextFields()
[type: function] [returns: [UiTextField]]
Returns an array of the UiTextFields in this UiVectorSupervisor_textField.
UiVectorSupervisor_textField.setDragMultiplier(componentIndex, multiplierValue)
[type: function]
Sets a value that multiplies the affect of dragging the component label. For reference, a value of 1 is fitting for a component whose range is roughly 500;
UiVectorSupervisor_textField.setDragMultiplier parameter: componentIndex
[type: number]
The index of the component that the given multiplier will be applied to (0=x,1=y,2=z,3=w).
UiVectorSupervisor_textField.setDragMultiplier parameter: multiplierValue
[type: number]
The value that will multiply the affect of dragging the label associated with the given component.
----------------------------------------------------------
Section 146: UiVisualFocus
----------------------------------------------------------
UiVisualFocus
[type: class] [NON-INSTANTIABLE] [requires: module - extendedUi]
Object housing functionality that enables for the SceneObject owning it to be 'visually focused', which focuses the end-user's attention the given SceneObject by placing it in front of a dimmer layer whenever the object is the the current 'singularFocusObject'. Calling 'configureUiVisualFocus' populates the 'uiVisualFocus' member for the owning SceneObject. It should be noted that the dimmer layer that the newly focused item is placed in front of is actually a button which, when pressed, calls the 'attemptExitUiVisualFocus' member of the current singularFocusObject if that member is defined.
UiVisualFocus.dispose()
[type: function]
Disposes this UiVisualFocus, disabling the visual focus functionality for the SceneObject owning it, and freeing the object for garbage collection.
----------------------------------------------------------
Section 147: UiZoom
----------------------------------------------------------
UiZoom
[type: class] [NON-INSTANTIABLE]
Object housing functionality associated with the user interface zoom, which enables end-users to increase or decrease the overall size of text and other user interface items (when those items have uiZoom functionality enabled).
UiZoom.zoomValue
[type: number] [default: 1]
The number associated with the zoom level of user interface items.
UiZoom.totalZoom
[type: number] [default: 1]
The read-only value associated with the overall zoom level of user interface items, including the 'devicePixelRatio', which is set by the browser. For UI items to accurately adjust to both the zoomValue and the browser's devicePixelRatio, use this value.
UiZoom.autoEnableStandardUiZoomFunctionality
[type: boolean] [default: false]
Flag determining if certain uiZoom-capable objects will have the 'standard' uiZoom functionality automatically enabled upon their instantiation. Objects affected by this include TextBox, TextAssembly, LayoutStack, SrollingPanel, UiButton, UiTextField, UiCollapsibleStack, DropDownMenu, DropSideMenu, and PopupWindow. This flag works on a 'state-machine' basis; newly instantiated objects will automatically have the standard uiZoom functionality enabled while this flag is true. Otherwise, uiZoom functionality will not be automatically enabled on any objects, and would instead need to be manually enabled either using 'nc.uiZoom.enableStandardUiZoomFunctionality' or by implementing custom uiZoom functionality using 'nc.appEvents.uiZoomChange.addCallback'.
UiZoom.enableStandardUiZoomFunctionality(obj)
[type: function]
Certain built-in Incisor® objects have standard uiZoom functionality that can be enabled. For example, TextBox objects have a standard uiZoom implementation that can be enabled, which consists of applying the 'nc.uiZoom.totalZoom' multiplier to the individual characters' scale, as well as the maxWidth, and maxHeight. The list of objects that have standard uiZoom implementations include SceneObject, GraphcObject, TextBox, TextAssembly, LayoutStack, SrollingPanel, UiButton, UiTextField, UiCollapsibleStack, DropDownMenu, DropSideMenu, and PopupWindow. Provide any of these objects as a parameter to this function, and their uiZoom functionality will be enabled. You can also set the 'autoEnableStandardUiZoomFunctionality' flag to true, which tells Incisor® to automatically enable the standard uiZoom functionality upon instantiation for some objects. If you want to create custom uiZoom functionality, just add a callback using 'nc.appEvents.uiZoomChange.addCallback', and perform the desired custom operations in that function.
UiZoom.enableStandardUiZoomFunctionality parameter: obj
[type: object]
The object to enable the standard UiZoom functionality on.
----------------------------------------------------------
Section 148: UrlParameterIterator
----------------------------------------------------------
UrlParameterIterator
[type: class] [NON-INSTANTIABLE] [requires: module - urlParameterIterator, license - advancedTools]
Object housing testing functionality that enables a project to refresh itself repeatedly with different url parameters. Such functionality can help with batch testing of a project's configurations or settings. To use this functionality, first call the 'UrlParameterIteration.setup' method, passing it an array of objects where each object represents the url parameters you would like the browser to refresh with. When ready to start the iteration, call 'UrlParameterIteration.start'. Then add the desired functionality per url parameter - be sure to implement what you want conditionally based on the url params (otherwise everything will happen on every refresh). When the desired tasks (testing, screen shots, etc...) have completed for each set of url parameters, call 'UrlParameterIteration.next', this will proceed to refresh with the next set of url parameters.
UrlParameterIterator.setup(urlParametersList, postIterationCallbackOwner, postIterationCallackName)
[type: function]
Function that informs the UrlParameterIterator of the set of url parameters that it will iterate over. This function must be called un-conditionally upon every refresh in order for the UrlPerameterIterator to function properly.
UrlParameterIterator.setup parameter: urlParametersList
[type: [object]]
Array of objects where each object represents the active url parameters for a particular iteration.
UrlParameterIterator.setup parameter: postIterationCallbackOwner
[type: object]
The object owning the callback function to be called when the iteration completes.
UrlParameterIterator.setup parameter: postIterationCallackName
[type: string]
The name of the callback function to be called when the iteration completes.
UrlParameterIterator.start(startingIndex)
[type: function]
Starts the process of refreshing the browser, iterating through the list of url parameters provided in 'UrlParameterIterator.setup'.
UrlParameterIterator.start parameter: startingIndex
[type: number] [default: 0] [optional]
Optional starting index, enabling iteration to start at a non-zero value.
UrlParameterIterator.next()
[type: function]
Proceeds to the next item in the list of url parameters, refreshing the browser with the coorespoinging url.
----------------------------------------------------------
Section 149: Vector1Swoop
----------------------------------------------------------
Vector1Swoop
[type: class] [NON-INSTANTIABLE]
Object housing the swoopers for this Vector's components
Vector1Swoop.each(endValues, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Swooper]
Swoops (interpolates) each of the Vector components from their current values to the given end values over the duration.
Vector1Swoop.each parameter: endValues
[type: [number]]
The ending values for the numeric properties being swooped.
Vector1Swoop.each parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation.
Vector1Swoop.each parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
Vector1Swoop.each parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
Vector1Swoop.each parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
Vector1Swoop.each parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
Vector1Swoop.each parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
Vector1Swoop.each parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
Vector1Swoop.each parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the swooping process.
Vector1Swoop.each parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the swooping process.
Vector1Swoop.all(endValue, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Swooper]
Swoops (interpolates) all of the Vector components from their current values to the given end value over the duration.
Vector1Swoop.all parameter: endValue
[type: number]
The ending value for the numeric properties being swooped.
Vector1Swoop.all parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation.
Vector1Swoop.all parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
Vector1Swoop.all parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
Vector1Swoop.all parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
Vector1Swoop.all parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
Vector1Swoop.all parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
Vector1Swoop.all parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
Vector1Swoop.all parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the swooping process.
Vector1Swoop.all parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the swooping process.
Vector1Swoop.x(endValue, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Swooper]
Swoops (interpolates) given component from its current value to the given end value over the duration.
Vector1Swoop.x parameter: endValue
[type: number]
The ending value for the numeric property being swooped.
Vector1Swoop.x parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation.
Vector1Swoop.x parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
Vector1Swoop.x parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
Vector1Swoop.x parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
Vector1Swoop.x parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
Vector1Swoop.x parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
Vector1Swoop.x parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
Vector1Swoop.x parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the swooping process.
Vector1Swoop.x parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the swooping process.
----------------------------------------------------------
Section 150: Vector2Swoop
----------------------------------------------------------
Vector2Swoop
[type: class] [extends: Vector1Swoop] [NON-INSTANTIABLE]
Object housing the swoopers for this Vector's components
Vector2Swoop.y(endValue, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Swooper]
Swoops (interpolates) given component from its current value to the given end value over the duration.
Vector2Swoop.y parameter: endValue
[type: number]
The ending value for the numeric property being swooped.
Vector2Swoop.y parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation.
Vector2Swoop.y parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
Vector2Swoop.y parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
Vector2Swoop.y parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
Vector2Swoop.y parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
Vector2Swoop.y parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
Vector2Swoop.y parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
Vector2Swoop.y parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the swooping process.
Vector2Swoop.y parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the swooping process.
----------------------------------------------------------
Section 151: Vector3Swoop
----------------------------------------------------------
Vector3Swoop
[type: class] [extends: Vector2Swoop] [NON-INSTANTIABLE]
Object housing the swoopers for this Vector's components
Vector3Swoop.z(endValue, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Swooper]
Swoops (interpolates) given component from its current value to the given end value over the duration.
Vector3Swoop.z parameter: endValue
[type: number]
The ending value for the numeric property being swooped.
Vector3Swoop.z parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation.
Vector3Swoop.z parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
Vector3Swoop.z parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
Vector3Swoop.z parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
Vector3Swoop.z parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
Vector3Swoop.z parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
Vector3Swoop.z parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
Vector3Swoop.z parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the swooping process.
Vector3Swoop.z parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the swooping process.
----------------------------------------------------------
Section 152: Vector4Swoop
----------------------------------------------------------
Vector4Swoop
[type: class] [extends: Vector3Swoop] [NON-INSTANTIABLE]
Object housing the swoopers for this Vector's components
Vector4Swoop.w(endValue, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Swooper]
Swoops (interpolates) given component from its current value to the given end value over the duration.
Vector4Swoop.w parameter: endValue
[type: number]
The ending value for the numeric property being swooped.
Vector4Swoop.w parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation.
Vector4Swoop.w parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
Vector4Swoop.w parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
Vector4Swoop.w parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
Vector4Swoop.w parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
Vector4Swoop.w parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
Vector4Swoop.w parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
Vector4Swoop.w parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the swooping process.
Vector4Swoop.w parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the swooping process.
----------------------------------------------------------
Section 153: ColorSwoop
----------------------------------------------------------
ColorSwoop
[type: class] [extends: Vector4Swoop] [NON-INSTANTIABLE]
Object housing the swoopers for this Vector's components
ColorSwoop.red(endValue, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Swooper]
Swoops (interpolates) given component from its current value to the given end value over the duration.
ColorSwoop.red parameter: endValue
[type: number]
The ending value for the numeric property being swooped.
ColorSwoop.red parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation.
ColorSwoop.red parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
ColorSwoop.red parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
ColorSwoop.red parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
ColorSwoop.red parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
ColorSwoop.red parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
ColorSwoop.red parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
ColorSwoop.red parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the swooping process.
ColorSwoop.red parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the swooping process.
example:
// Objective: Swoop the red Color of a GraphicObject.
// Expected Result: You will see a red box fade to black over a period of 10 seconds, then fade back to red over a period of 5 seconds.
// Create a Color using the Color constructor. Initially, make it red.
let color = new Color( 1, 0, 0, 1 );
// Create a GraphicObject using the GraphicObject constructor. Use the white box GraphicAsset and add it to the main Scene.
let myGraphicObject = new GraphicObject( nc.graphicAssets.whiteBox, nc.mainScene, "RedBox" );
// Set the GraphicObject's fillColor property to the new Color (initially red).
myGraphicObject.fillColor = color;
// Swoop the red color down to zero over 10 seconds then swoop it back to 1 over 5 seconds.
color.swoop.red( 0, 10, undefined, color.swoop, "red", [1,5] );
ColorSwoop.green(endValue, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Swooper]
Swoops (interpolates) given component from its current value to the given end value over the duration.
ColorSwoop.green parameter: endValue
[type: number]
The ending value for the numeric property being swooped.
ColorSwoop.green parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation.
ColorSwoop.green parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
ColorSwoop.green parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
ColorSwoop.green parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
ColorSwoop.green parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
ColorSwoop.green parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
ColorSwoop.green parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
ColorSwoop.green parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the swooping process.
ColorSwoop.green parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the swooping process.
example:
// Objective: Swoop the green Color of a GraphicObject.
// Expected Result: You will see a green box fade to black over a period of 10 seconds, then fade back to green over a period of 5 seconds.
// Create a Color using the Color constructor. Initially, make it green.
let color = new Color( 0, 1, 0, 1 );
// Create a GraphicObject using the GraphicObject constructor. Use the white box GraphicAsset and add it to the main Scene.
let myGraphicObject = new GraphicObject( nc.graphicAssets.whiteBox, nc.mainScene, "GreenBox" );
// Set the GraphicObject's fillColor property to the new Color (initially green).
myGraphicObject.fillColor = color;
// Swoop the green color down to zero over 10 seconds then swoop it back to 1 over 5 seconds.
color.swoop.green( 0, 10, undefined, color.swoop, "green", [1,5] );
ColorSwoop.blue(endValue, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Swooper]
Swoops (interpolates) given component from its current value to the given end value over the duration.
ColorSwoop.blue parameter: endValue
[type: number]
The ending value for the numeric property being swooped.
ColorSwoop.blue parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation.
ColorSwoop.blue parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
ColorSwoop.blue parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
ColorSwoop.blue parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
ColorSwoop.blue parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
ColorSwoop.blue parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
ColorSwoop.blue parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
ColorSwoop.blue parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the swooping process.
ColorSwoop.blue parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the swooping process.
example:
// Objective: Swoop the blue Color of a GraphicObject.
// Expected Result: You will see a blue box fade to black over a period of 10 seconds, then fade back to blue over a period of 5 seconds.
// Create a Color using the Color constructor. Initially, make it blue.
let color = new Color( 0, 0, 1, 1 );
// Create a GraphicObject using the GraphicObject constructor. Use the white box GraphicAsset and add it to the main Scene.
let myGraphicObject = new GraphicObject( nc.graphicAssets.whiteBox, nc.mainScene, "BlueBox" );
// Set the GraphicObject's fillColor property to the new Color (initially blue).
myGraphicObject.fillColor = color;
// Swoop the blue color down to zero over 10 seconds then swoop it back to 1 over 5 seconds.
color.swoop.blue( 0, 10, undefined, color.swoop, "blue", [1,5] );
ColorSwoop.alpha(endValue, duration, tweenType, completionCallbackOwner, completionCallbackName, completionCallbackArgs, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Swooper]
Swoops (interpolates) given component from its current value to the given end value over the duration.
ColorSwoop.alpha parameter: endValue
[type: number]
The ending value for the numeric property being swooped.
ColorSwoop.alpha parameter: duration
[type: number] [default: 0] [optional]
The duration for the interpolation.
ColorSwoop.alpha parameter: tweenType
[type: TweenType] [default: nc.tweenTypes.Linear] [optional]
The TweenType, determining the method of interpolation.
ColorSwoop.alpha parameter: completionCallbackOwner
[type: object] [optional]
The object owning the callback function that is called when the Swooper completes.
ColorSwoop.alpha parameter: completionCallbackName
[type: string] [optional]
The name of the function that is called when the Swooper completes.
ColorSwoop.alpha parameter: completionCallbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the Swooper completes.
ColorSwoop.alpha parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Swooper will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
ColorSwoop.alpha parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Swooper is affected by.
ColorSwoop.alpha parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the swooping process.
ColorSwoop.alpha parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the swooping process.
example:
// Objective: Swoop the alpha (transparency) of a GraphicObject.
// Expected Result: You will see a white box gradually disappear over a period of 10 seconds, then reappear back to white over a period of 5 seconds.
// Create a Color using the Color constructor. By default, it will be white.
let color = new Color();
// Create a GraphicObject using the GraphicObject constructor. Use the white box GraphicAsset and add it to the main Scene.
let myGraphicObject = new GraphicObject(nc.graphicAssets.whiteBox, nc.mainScene, "WhiteBox");
// Set the GraphicObject's fillColor property to the new Color (initially white).
myGraphicObject.fillColor = color;
// Swoop the alpha value down to zero over 10 seconds then swoop it back to 1 over 5 seconds.
color.swoop.alpha(0, 10, undefined, color.swoop, "alpha", [1, 5]);
----------------------------------------------------------
Section 154: Vector1AddMotion
----------------------------------------------------------
Vector1AddMotion
[type: class] [NON-INSTANTIABLE]
Object housing the 'addMotion' functions for this Vector's components
Vector1AddMotion.each(lowerBounds, upperBounds, motionSpeed, motionType, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Motion]
Adds a motion to each of the components of this Vector (bounds to be supplied individually), and returns a Motion object, which can be used to control the motion dynamically.
Vector1AddMotion.each parameter: lowerBounds
[type: [number]]
The lower bound(s) for the motion being added.
Vector1AddMotion.each parameter: upperBounds
[type: [number]]
The upper bound(s) for the motion being added.
Vector1AddMotion.each parameter: motionSpeed
[type: number] [default: 1] [optional]
The speed factor for the added motion.
Vector1AddMotion.each parameter: motionType
[type: MotionType] [default: nc.motionTypes.Pendulum] [optional]
The MotionType, determining the nature of the motion being added.
Vector1AddMotion.each parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Motion will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
Vector1AddMotion.each parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Motion is affected by.
Vector1AddMotion.each parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the motion.
Vector1AddMotion.each parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the motion.
example:
// Objective: Use the each() function to add motion to the color of the box.
// Expected Result: You will see a box continuously fading in and out from bright white to a dark, semi-transparent blue.
// create a GraphicObject using the WhiteBox asset
let box = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "Box" );
// set the lower and upper color bounds as arrays and slow the motion speed to .2
box.colorMultiply.addMotion.each( [0, .1, .6, .4], [.7, 1, .8, 2], .2 );
Vector1AddMotion.all(lowerBound, upperBound, motionSpeed, motionType, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Motion]
Adds the a motion to all of the components of this Vector (using the same set of bounds), and returns a Motion object, which can be used to control the motion dynamically.
Vector1AddMotion.all parameter: lowerBound
[type: number]
The lower bound for the motion being added.
Vector1AddMotion.all parameter: upperBound
[type: number]
The upper bound for the motion being added.
Vector1AddMotion.all parameter: motionSpeed
[type: number] [default: 1] [optional]
The speed factor for the added motion.
Vector1AddMotion.all parameter: motionType
[type: MotionType] [default: nc.motionTypes.Pendulum] [optional]
The MotionType, determining the nature of the motion being added.
Vector1AddMotion.all parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Motion will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
Vector1AddMotion.all parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Motion is affected by.
Vector1AddMotion.all parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the motion.
Vector1AddMotion.all parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the motion.
example:
// Objective: Use the all() function to add motion to the scale of a box.
// Expected Result: You will see a white box continuously expanding and contracting.
// create a GraphicObject using the WhiteBox asset
let box = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "Box" );
// set the upper and lower bounds of the scale of the box and slow the motion speed to .2
box.scale.addMotion.all( 0, 3, .2 );
Vector1AddMotion.x(lowerBound, upperBound, motionSpeed, motionType, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Motion]
Adds a motion to the given component and returns a Motion object, which can be used to control the motion dynamically.
Vector1AddMotion.x parameter: lowerBound
[type: number]
The lower bound for the motion being added.
Vector1AddMotion.x parameter: upperBound
[type: number]
The upper bound for the motion being added.
Vector1AddMotion.x parameter: motionSpeed
[type: number] [default: 1] [optional]
The speed factor for the added motion.
Vector1AddMotion.x parameter: motionType
[type: MotionType] [default: nc.motionTypes.Pendulum] [optional]
The MotionType, determining the nature of the motion being added.
Vector1AddMotion.x parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Motion will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
Vector1AddMotion.x parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Motion is affected by.
Vector1AddMotion.x parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the motion.
Vector1AddMotion.x parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the motion.
example:
// Objective: Use the x() function to add motion along the x axis.
// Expected Result: You will see a white box continuously moving back and forth along the x axis.
// create a GraphicObject using the WhiteBox asset
let box = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "Box" );
// set the upper and lower bounds of the x position of the box and slow the motion speed to .2
box.position.addMotion.x( -500, 500, .2 );
----------------------------------------------------------
Section 155: Vector2AddMotion
----------------------------------------------------------
Vector2AddMotion
[type: class] [extends: Vector1AddMotion] [NON-INSTANTIABLE]
Object housing the 'addMotion' functions for this Vector's components
Vector2AddMotion.y(lowerBound, upperBound, motionSpeed, motionType, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Motion]
Adds a motion to the given component and returns a Motion object, which can be used to control the motion dynamically.
Vector2AddMotion.y parameter: lowerBound
[type: number]
The lower bound for the motion being added.
Vector2AddMotion.y parameter: upperBound
[type: number]
The upper bound for the motion being added.
Vector2AddMotion.y parameter: motionSpeed
[type: number] [default: 1] [optional]
The speed factor for the added motion.
Vector2AddMotion.y parameter: motionType
[type: MotionType] [default: nc.motionTypes.Pendulum] [optional]
The MotionType, determining the nature of the motion being added.
Vector2AddMotion.y parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Motion will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
Vector2AddMotion.y parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Motion is affected by.
Vector2AddMotion.y parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the motion.
Vector2AddMotion.y parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the motion.
example:
// Objective: Use the y() function to add motion along the y axis.
// Expected Result: You will see a white box continuously moving back and forth along the y axis.
// create a GraphicObject using the WhiteBox asset
let box = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "Box" );
// set the upper and lower bounds of the y position of the box and slow the motion speed to .2
box.position.addMotion.y( -500, 500, .2 );
----------------------------------------------------------
Section 156: Vector3AddMotion
----------------------------------------------------------
Vector3AddMotion
[type: class] [extends: Vector2AddMotion] [NON-INSTANTIABLE]
Object housing the 'addMotion' functions for this Vector's components
Vector3AddMotion.z(lowerBound, upperBound, motionSpeed, motionType, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Motion]
Adds a motion to the given component and returns a Motion object, which can be used to control the motion dynamically.
Vector3AddMotion.z parameter: lowerBound
[type: number]
The lower bound for the motion being added.
Vector3AddMotion.z parameter: upperBound
[type: number]
The upper bound for the motion being added.
Vector3AddMotion.z parameter: motionSpeed
[type: number] [default: 1] [optional]
The speed factor for the added motion.
Vector3AddMotion.z parameter: motionType
[type: MotionType] [default: nc.motionTypes.Pendulum] [optional]
The MotionType, determining the nature of the motion being added.
Vector3AddMotion.z parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Motion will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
Vector3AddMotion.z parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Motion is affected by.
Vector3AddMotion.z parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the motion.
Vector3AddMotion.z parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the motion.
----------------------------------------------------------
Section 157: Vector4AddMotion
----------------------------------------------------------
Vector4AddMotion
[type: class] [extends: Vector3AddMotion] [NON-INSTANTIABLE]
Object housing the 'addMotion' functions for this Vector's components
Vector4AddMotion.w(lowerBound, upperBound, motionSpeed, motionType, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Motion]
Adds a motion to the given component and returns a Motion object, which can be used to control the motion dynamically.
Vector4AddMotion.w parameter: lowerBound
[type: number]
The lower bound for the motion being added.
Vector4AddMotion.w parameter: upperBound
[type: number]
The upper bound for the motion being added.
Vector4AddMotion.w parameter: motionSpeed
[type: number] [default: 1] [optional]
The speed factor for the added motion.
Vector4AddMotion.w parameter: motionType
[type: MotionType] [default: nc.motionTypes.Pendulum] [optional]
The MotionType, determining the nature of the motion being added.
Vector4AddMotion.w parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Motion will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
Vector4AddMotion.w parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Motion is affected by.
Vector4AddMotion.w parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the motion.
Vector4AddMotion.w parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the motion.
----------------------------------------------------------
Section 158: ColorAddMotion
----------------------------------------------------------
ColorAddMotion
[type: class] [extends: Vector4AddMotion] [NON-INSTANTIABLE]
Object housing the 'addMotion' functions for this Vector's components
ColorAddMotion.red(lowerBound, upperBound, motionSpeed, motionType, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Motion]
Adds a motion to the given component and returns a Motion object, which can be used to control the motion dynamically.
ColorAddMotion.red parameter: lowerBound
[type: number]
The lower bound for the motion being added.
ColorAddMotion.red parameter: upperBound
[type: number]
The upper bound for the motion being added.
ColorAddMotion.red parameter: motionSpeed
[type: number] [default: 1] [optional]
The speed factor for the added motion.
ColorAddMotion.red parameter: motionType
[type: MotionType] [default: nc.motionTypes.Pendulum] [optional]
The MotionType, determining the nature of the motion being added.
ColorAddMotion.red parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Motion will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
ColorAddMotion.red parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Motion is affected by.
ColorAddMotion.red parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the motion.
ColorAddMotion.red parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the motion.
example:
// Objective: Create a blinking red box.
// Expected Result: You will see a box continuously blinking between red and black.
// Create a Color using the Color constructor. Initially, make it red.
let color = new Color( 1, 0, 0, 1 );
// Create a GraphicObject using the GraphicObject constructor. Use the white box GraphicAsset and add it to the main Scene.
let myGraphicObject = new GraphicObject( nc.graphicAssets.whiteBox, nc.mainScene, "RedBox" );
// Set the GraphicObject's fillColor property to the new Color.
myGraphicObject.fillColor = color;
// Add a blinking motion by setting the lower bound to black and the upper bound to red at a speed of 2.
color.addMotion.red( 0, 1, 2 );
ColorAddMotion.green(lowerBound, upperBound, motionSpeed, motionType, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Motion]
Adds a motion to the given component and returns a Motion object, which can be used to control the motion dynamically.
ColorAddMotion.green parameter: lowerBound
[type: number]
The lower bound for the motion being added.
ColorAddMotion.green parameter: upperBound
[type: number]
The upper bound for the motion being added.
ColorAddMotion.green parameter: motionSpeed
[type: number] [default: 1] [optional]
The speed factor for the added motion.
ColorAddMotion.green parameter: motionType
[type: MotionType] [default: nc.motionTypes.Pendulum] [optional]
The MotionType, determining the nature of the motion being added.
ColorAddMotion.green parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Motion will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
ColorAddMotion.green parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Motion is affected by.
ColorAddMotion.green parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the motion.
ColorAddMotion.green parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the motion.
example:
// Objective: Create a blinking green box.
// Expected Result: You will see a box continuously blinking between green and black.
// Create a Color using the Color constructor. Initially, make it green.
let color = new Color( 0, 1, 0, 1 );
// Create a GraphicObject using the GraphicObject constructor. Use the white box GraphicAsset and add it to the main Scene.
let myGraphicObject = new GraphicObject( nc.graphicAssets.whiteBox, nc.mainScene, "GreenBox" );
// Set the GraphicObject's fillColor property to the new Color.
myGraphicObject.fillColor = color;
// Add a blinking motion by setting the lower bound to black and the upper bound to green at a speed of 2.
color.addMotion.green( 0, 1, 2 );
ColorAddMotion.blue(lowerBound, upperBound, motionSpeed, motionType, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Motion]
Adds a motion to the given component and returns a Motion object, which can be used to control the motion dynamically.
ColorAddMotion.blue parameter: lowerBound
[type: number]
The lower bound for the motion being added.
ColorAddMotion.blue parameter: upperBound
[type: number]
The upper bound for the motion being added.
ColorAddMotion.blue parameter: motionSpeed
[type: number] [default: 1] [optional]
The speed factor for the added motion.
ColorAddMotion.blue parameter: motionType
[type: MotionType] [default: nc.motionTypes.Pendulum] [optional]
The MotionType, determining the nature of the motion being added.
ColorAddMotion.blue parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Motion will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
ColorAddMotion.blue parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Motion is affected by.
ColorAddMotion.blue parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the motion.
ColorAddMotion.blue parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the motion.
example:
// Objective: Create a blinking blue box.
// Expected Result: You will see a box continuously blinking between blue and black.
// Create a Color using the Color constructor. Initially, make it blue.
let color = new Color( 0, 0, 1, 1 );
// Create a GraphicObject using the GraphicObject constructor. Use the white box GraphicAsset and add it to the main Scene.
let myGraphicObject = new GraphicObject( nc.graphicAssets.whiteBox, nc.mainScene, "BlueBox" );
// Set the GraphicObject's fillColor property to the new Color.
myGraphicObject.fillColor = color;
// Add a blinking motion by setting the lower bound to black and the upper bound to blue at a speed of 2.
color.addMotion.blue( 0, 1, 2 );
ColorAddMotion.alpha(lowerBound, upperBound, motionSpeed, motionType, pauseImmunity, speedControl, eventCallbackOwner, eventCallbackName)
[type: function] [returns: Motion]
Adds a motion to the given component and returns a Motion object, which can be used to control the motion dynamically.
ColorAddMotion.alpha parameter: lowerBound
[type: number]
The lower bound for the motion being added.
ColorAddMotion.alpha parameter: upperBound
[type: number]
The upper bound for the motion being added.
ColorAddMotion.alpha parameter: motionSpeed
[type: number] [default: 1] [optional]
The speed factor for the added motion.
ColorAddMotion.alpha parameter: motionType
[type: MotionType] [default: nc.motionTypes.Pendulum] [optional]
The MotionType, determining the nature of the motion being added.
ColorAddMotion.alpha parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this Motion will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
ColorAddMotion.alpha parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this Motion is affected by.
ColorAddMotion.alpha parameter: eventCallbackOwner
[type: object] [optional]
The object owning the callback function that is called with each fixedUpdate during the motion.
ColorAddMotion.alpha parameter: eventCallbackName
[type: string] [optional]
The name of the function that is called with each fixedUpdate during the motion.
example:
// Objective: Create a blinking box.
// Expected Result: You will see a box continuously blinking. It will gradually disappear and reappear back to white.
// Create a Color using the Color constructor. Initially, it will be white.
let color = new Color();
// Create a GraphicObject using the GraphicObject constructor. Use the white box GraphicAsset and add it to the main Scene.
let myGraphicObject = new GraphicObject( nc.graphicAssets.whiteBox, nc.mainScene, "WhiteBox" );
// Set the GraphicObject's fillColor property to the new Color.
myGraphicObject.fillColor = color;
// Add a blinking motion by setting the lower bound to transparent(0) and the upper bound to opaque(1) at a speed of 2.
color.addMotion.alpha( 0, 1, 2 );
----------------------------------------------------------
Section 159: Vector4Base
----------------------------------------------------------
Vector4Base
[type: class] [NON-INSTANTIABLE]
The 'base' object for the Vector4 type. This is not for general use - use Vector4 instead.
Vector4Base.type
[type: string]
Type identifier.
Vector4Base.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
Vector4Base.x
[type: number]
The first component of this Vector.
Vector4Base.y
[type: number]
The second component of this Vector.
Vector4Base.z
[type: number]
The third component of this Vector.
Vector4Base.w
[type: number]
The fourth component of this Vector.
Vector4Base.scaleByFactor(factor)
[type: function]
Multiplies all Vector components by the given factor.
Vector4Base.scaleByFactor parameter: factor
[type: number]
The value to multiply the Vector components by.
example:
// Objective: Use the scaleByFactor to change the color of the white box.
// Expected Result: You will see a half transparent gray box.
// create a GraphicObject using the WhiteBox asset
let box = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "Box" );
// multiplying with the box's default color (1,1,1,1) results in a final color of (.5, .5, .5, .5)
box.fillColor.scaleByFactor( .5 );
Vector4Base.multiply(vector)
[type: function]
Multiplies all components of this Vector by the given Vector.
Vector4Base.multiply parameter: vector
[type: Vector4]
The Vector to multiply this Vector by.
example:
// Objective: Use the multiply function to change the color of the white box.
// Expected Result: You will see a denim blue box.
// create a GraphicObject using the WhiteBox asset
let box = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "Box" );
// create a color to multiply with the box's default color (1,1,1,1)
let colorMultiplier = new Color( 0, .5, 1, .8 );
// multiplying results in a final color of (0, .5, 1, .8)
box.fillColor.multiply( colorMultiplier );
Vector4Base.multiplyByValues(x, y, z, w)
[type: function]
Multiplies the components of this Vector by the values provided.
Vector4Base.multiplyByValues parameter: x
[type: number] [default: 1] [optional]
The value to multiply the first component by.
Vector4Base.multiplyByValues parameter: y
[type: number] [default: 1] [optional]
The value to multiply the second component by.
Vector4Base.multiplyByValues parameter: z
[type: number] [default: 1] [optional]
The value to multiply the third component by.
Vector4Base.multiplyByValues parameter: w
[type: number] [default: 1] [optional]
The value to multiply the fourth component by.
example:
// Objective: Use the multiplyByValues function to change the color of the white box.
// Expected Result: You will see a denim blue box.
// create a GraphicObject using the WhiteBox asset
let box = new GraphicObject( nc.graphicAssets.WhiteBox, nc.mainScene, "Box" );
// multiplying with the box's default color (1,1,1,1) results in a final color of (0, .5, 1, .8)
box.fillColor.multiplyByValues( 0, .5, 1, .8 );
Vector4Base.copy(vector)
[type: function]
Sets all of this Vector's component values to the component values of the given Vector.
Vector4Base.copy parameter: vector
[type: Vector4]
The Vector to copy component values from.
Vector4Base.isEqual(vector)
[type: function] [returns: boolean]
Determines if all of the components of this Vector are equal to their counterparts in the given Vector.
Vector4Base.isEqual parameter: vector
[type: Vector4]
The Vector to compare against.
Vector4Base.clone()
[type: function] [returns: Vector4]
Returns a new Vector4 with the same component values as this Vector.
----------------------------------------------------------
Section 160: Vector4
----------------------------------------------------------
Vector4
[type: class] [extends: Vector4Base]
An object with 4 numeric properties (x, y, z, w).
Vector4.swoop
[type: Vector4Swoop]
Object housing the built-in swoopers for this Vector's components.
Vector4.addMotion
[type: Vector4AddMotion]
Object housing the built-in 'addMotion' functions for this Vector's components.
----------------------------------------------------------
Section 161: Color
----------------------------------------------------------
Color
[type: class] [extends: Vector4Base]
An object with 4 numeric properties (red, green, blue, alpha) representing a color with transparency.
Color.swoop
[type: ColorSwoop]
Object housing the built-in swoopers for this Vector's components.
example:
// Objective: Swoop the Color of a GraphicObject.
// Expected Result: You will see a red box fade to black over a period of 10 seconds, then fade back to red over a period of 5 seconds.
// Create a Color using the Color constructor. Initially, make it red.
let color = new Color( 1, 0, 0, 1 );
// Create a GraphicObject using the GraphicObject constructor. Use the white box GraphicAsset and add it to the main Scene.
let myGraphicObject = new GraphicObject( nc.graphicAssets.whiteBox, nc.mainScene, "RedBox" );
// Set the GraphicObject's fillColor property to the new Color (initially red).
myGraphicObject.fillColor = color;
// Swoop the red color down to zero over 10 seconds then swoop it back to 1 over 5 seconds.
color.swoop.red( 0, 10, undefined, color.swoop, "red", [1,5] );
Color.addMotion
[type: ColorAddMotion]
Object housing the built-in 'addMotion' functions for this Vector's components.
example:
// Objective: Add motion to the changing Colors of a box.
// Expected Result: You will see a box continuously changing colors as the red, green and blue values adjust up and down over different time intervals.
// Create a Color using the Color constructor. Initially, it will default to white.
let color = new Color();
// Create a GraphicObject using the GraphicObject constructor. Use the white box GraphicAsset and add it to the main Scene.
let myGraphicObject = new GraphicObject( nc.graphicAssets.whiteBox, nc.mainScene, "RedBox" );
// Set the GraphicObject's fillColor property to the new Color.
myGraphicObject.fillColor = color;
// Add motion to the red, green and blue values over different time intervals.
color.addMotion.red( 0, 1, .04 );
color.addMotion.green( 0, 1, .09 );
color.addMotion.blue( 0, 1, 1.5 );
Color.red
[type: number]
The red value of this Color.
example:
// Objective: Get the red value of a Color.
// Expected Result: The console should read "The red value is 0.5".
// Create a color using the Color constructor. Set the red value to 0.5.
let color = new Color( 0.5, 0, 0, 1 );
console.log("The red value is", color.red);
Color.green
[type: number]
The green value of this Color.
example:
// Objective: Get the green value of a Color.
// Expected Result: The console should read "The green value is 0.5".
// Create a color using the Color constructor. Set the green value to 0.5.
let color = new Color( 0, 0.5, 0, 1 );
console.log("The green value is", color.green);
Color.blue
[type: number]
The blue value of this Color.
example:
// Objective: Get the blue value of a Color.
// Expected Result: The console should read "The blue value is 0.5".
// Create a color using the Color constructor. Set the blue value to 0.5.
let color = new Color( 0, 0, 0.5, 1 );
console.log("The blue value is", color.blue);
Color.alpha
[type: number]
The alpha value of this Color.
example:
// Objective: Get the alpha value of a Color.
// Expected Result: The console should read "The alpha value is 0.5".
// Create a color using the Color constructor. Set the alpha value to 0.5.
let color = new Color( 0, 0, 0, 0.5 );
console.log("The alpha value is", color.alpha);
----------------------------------------------------------
Section 162: Vector3Base
----------------------------------------------------------
Vector3Base
[type: class] [NON-INSTANTIABLE]
The 'base' object for the Vector3 type. This is not for general use - use Vector3 instead.
Vector3Base.type
[type: string]
Type identifier.
Vector3Base.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
Vector3Base.x
[type: number]
The first component of this Vector.
Vector3Base.y
[type: number]
The second component of this Vector.
Vector3Base.z
[type: number]
The third component of this Vector.
Vector3Base.scaleByFactor(factor)
[type: function]
Multiplies all Vector components by the given factor.
Vector3Base.scaleByFactor parameter: factor
[type: number]
The value to multiply the Vector components by.
Vector3Base.multiply(vector)
[type: function]
Multiplies all components of this Vector by the given Vector.
Vector3Base.multiply parameter: vector
[type: Vector3]
The Vector to multiply this Vector by.
Vector3Base.multiplyByValues(x, y, z)
[type: function]
Multiplies the components of this Vector by the values provided.
Vector3Base.multiplyByValues parameter: x
[type: number] [default: 1] [optional]
The value to multiply the first component by.
Vector3Base.multiplyByValues parameter: y
[type: number] [default: 1] [optional]
The value to multiply the second component by.
Vector3Base.multiplyByValues parameter: z
[type: number] [default: 1] [optional]
The value to multiply the third component by.
Vector3Base.copy(vector)
[type: function]
Sets all of this Vector's component values to the component values of the given Vector.
Vector3Base.copy parameter: vector
[type: Vector3]
The Vector to copy component values from.
Vector3Base.isEqual(vector)
[type: function] [returns: boolean]
Determines if all of the components of this Vector are equal to their counterparts in the given Vector.
Vector3Base.isEqual parameter: vector
[type: Vector3]
The Vector to compare against.
Vector3Base.clone()
[type: function] [returns: Vector3]
Returns a new Vector3 with the same component values as this Vector.
----------------------------------------------------------
Section 163: Vector3
----------------------------------------------------------
Vector3
[type: class] [extends: Vector3Base]
An object with 3 numeric properties (x, y, z).
Vector3.swoop
[type: Vector3Swoop]
Object housing the built-in swoopers for this Vector's components.
Vector3.addMotion
[type: Vector3AddMotion]
Object housing the built-in 'addMotion' functions for this Vector's components.
----------------------------------------------------------
Section 164: Vector2Base
----------------------------------------------------------
Vector2Base
[type: class] [NON-INSTANTIABLE]
The 'base' object for the Vector2 type. This is not for general use - use Vector2 instead.
Vector2Base.type
[type: string]
Type identifier.
Vector2Base.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
Vector2Base.x
[type: number]
The first component of this Vector.
Vector2Base.y
[type: number]
The second component of this Vector.
Vector2Base.scaleByFactor(factor)
[type: function]
Multiplies all Vector components by the given factor.
Vector2Base.scaleByFactor parameter: factor
[type: number]
The value to multiply the Vector components by.
Vector2Base.multiply(vector)
[type: function]
Multiplies all components of this Vector by the given Vector.
Vector2Base.multiply parameter: vector
[type: Vector2]
The Vector to multiply this Vector by.
Vector2Base.multiplyByValues(x, y)
[type: function]
Multiplies the components of this Vector by the values provided.
Vector2Base.multiplyByValues parameter: x
[type: number] [default: 1] [optional]
The value to multiply the first component by.
Vector2Base.multiplyByValues parameter: y
[type: number] [default: 1] [optional]
The value to multiply the second component by.
Vector2Base.copy(vector)
[type: function]
Sets all of this Vector's component values to the component values of the given Vector.
Vector2Base.copy parameter: vector
[type: Vector2]
The Vector to copy component values from.
Vector2Base.isEqual(vector)
[type: function] [returns: boolean]
Determines if all of the components of this Vector are equal to their counterparts in the given Vector.
Vector2Base.isEqual parameter: vector
[type: Vector2]
The Vector to compare against.
Vector2Base.clone()
[type: function] [returns: Vector2]
Returns a new Vector2 with the same component values as this Vector.
----------------------------------------------------------
Section 165: Vector2
----------------------------------------------------------
Vector2
[type: class] [extends: Vector2Base]
An object with 2 numeric properties (x, y).
Vector2.swoop
[type: Vector2Swoop]
Object housing the built-in swoopers for this Vector's components.
Vector2.addMotion
[type: Vector2AddMotion]
Object housing the built-in 'addMotion' functions for this Vector's components.
----------------------------------------------------------
Section 166: VectorBase
----------------------------------------------------------
VectorBase
[type: class] [NON-INSTANTIABLE]
The 'base' object for the Vector1 type. This is not for general use - use Vector1 instead.
VectorBase.type
[type: string]
Type identifier.
VectorBase.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
VectorBase.dimension
[type: number]
The number of components this Vector has
VectorBase.x
[type: number]
The first component of this Vector.
VectorBase.scaleByFactor(factor)
[type: function]
Multiplies all Vector components by the given factor.
VectorBase.scaleByFactor parameter: factor
[type: number]
The value to multiply the Vector components by.
VectorBase.multiply(vector)
[type: function]
Multiplies all components of this Vector by the given Vector.
VectorBase.multiply parameter: vector
[type: Vector1]
The Vector to multiply this Vector by.
VectorBase.multiplyByValues(x)
[type: function]
Multiplies the components of this Vector by the values provided.
VectorBase.multiplyByValues parameter: x
[type: number] [default: 1] [optional]
The value to multiply the first component by.
VectorBase.copy(vector)
[type: function]
Sets all of this Vector's component values to the component values of the given Vector.
VectorBase.copy parameter: vector
[type: Vector1]
The Vector to copy component values from.
VectorBase.isEqual(vector)
[type: function] [returns: boolean]
Determines if all of the components of this Vector are equal to their counterparts in the given Vector.
VectorBase.isEqual parameter: vector
[type: Vector1]
The Vector to compare against.
VectorBase.clone()
[type: function] [returns: Vector1]
Returns a new Vector1 with the same component values as this Vector.
----------------------------------------------------------
Section 167: Vector1
----------------------------------------------------------
Vector1
[type: class] [extends: VectorBase]
An object with 1 numeric property (x).
Vector1.swoop
[type: Vector1Swoop]
Object housing the built-in swoopers for this Vector's components.
Vector1.addMotion
[type: Vector1AddMotion]
Object housing the built-in 'addMotion' functions for this Vector's components.
----------------------------------------------------------
Section 168: WaitThen
----------------------------------------------------------
WaitThen
[type: class] [requires: module - waitThens]
A WaitThen is an object that provides a means to schedule a delayed callback. This differs from standard javascript 'setTimeout' in that it is compatable with Incisor®'s pausing system, as well its SpeedControls, and 'nc.softwareSpeed'. WaitThen instances can be constructed normally using 'new', or you can just call 'nc.waitThen' which makes use of an internally pooled group of WaitThens. It is recommended that 'nc.waitThen' be used where possible to avoid needlessly instantiating new objects, and also avoid the potential for memory leaks.
WaitThen.type
[type: string]
Type identifier.
WaitThen.inheritedTypes
[type: object]
Dictionary object listing all of the types this object is compatible with.
WaitThen.name
[type: string] [default: "WaitThen"]
The name of the WaitThen.
WaitThen.progress
[type: number] [default: 0]
The progress of the WaitThen on the scale from [0,1].
WaitThen.isActive
[type: boolean] [default: false]
Boolean reporting if this WaitThen is currently 'counting down'. Pausing is not factored into this property; a WaitThen that is activated and then subjected to a PauseEvent would still report 'true'.
WaitThen.callbackOwner
[type: object]
The object owning the callback function invoked when this WaitThen completes.
WaitThen.callbackName
[type: string]
The name of the callback function invoked when this WaitThen completes.
WaitThen.callbackArgs
[type: any]
Arguments for the callback function invoked when this WaitThen completes.
WaitThen.pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity]
The PauseEvent or Array of PauseEvents that this WaitThen will be immune to. Set this parameter to [] for this WaitThen to have no pause immunity.
WaitThen.speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl]
The SpeedControl or Array of SpeedControls that this WaitThen is affected by.
WaitThen.duration
[type: number]
Read-only property indicating the current duration of the WaitThen.
WaitThen.activate(duration, callbackOwner, callbackName, callbackArgs, pauseImmunity, speedControl)
[type: function]
Activates this WaitThen, starting the 'count-down' to this WaitThen's callback.
WaitThen.activate parameter: duration
[type: number]
Seconds before the callback will occur.
WaitThen.activate parameter: callbackOwner
[type: object]
The object owning the callback function that is called when the WaitThen completes.
WaitThen.activate parameter: callbackName
[type: string]
The name of the function that is called when the WaitThen completes.
WaitThen.activate parameter: callbackArgs
[type: Array, any] [optional]
Arguments for the function that is called when the WaitThen completes.
WaitThen.activate parameter: pauseImmunity
[type: PauseEvent, [PauseEvent]] [default: nc.defaultPauseImmunity] [optional]
The PauseEvent or Array of PauseEvents that this WaitThen will be immune to. Set this parameter to [] to create callbacks with no immunity. If this parameter is left undefined, the current value of 'nc.defaultPauseImmunity' will be used. The value for 'nc.defaultPauseImmunity' defaults to [], but can be changed at any time.
WaitThen.activate parameter: speedControl
[type: SpeedControl, [SpeedControl]] [default: nc.defaultSpeedControl] [optional]
The SpeedControl or Array of SpeedControls that this WaitThen is affected by.
WaitThen.stop(performCallback)
[type: function]
Stops this WaitThen.
WaitThen.stop parameter: performCallback
[type: boolean] [default: false] [optional]
Boolean determining if the callback function will be called immediately, or if it will be skipped entirely.
----------------------------------------------------------
Section 169: Deprecation Schedule
----------------------------------------------------------
Deprecation Schedule
[type: information]
Information about past, present, and future deprecations within the Incisor API...
Deprecation Schedule.2024.10.23.00
[type: deprecation information]
Title: 'convertToShape' is becoming 'shapify' within ncData
Description: The system will automatically convert the 'convertToShape' bool within the ncData for assets to 'shapify' until phase2 deprecation. Just save the project to adopt the update.
State: Phase2: Fully Deprecated
Deprecation Schedule.2024.10.23.01
[type: deprecation information]
Title: 'optimizationLevel' is becoming 'shapifyOptimizationLevel' within ncData
Description: The system will automatically convert the 'optimizationLevel' bool within the ncData for assets to 'shapifyOptimizationLevel' until phase2 deprecation.Just save the project to adopt the update.
State: Phase2: Fully Deprecated
Deprecation Schedule.2024.10.23.02
[type: deprecation information]
Title: 'edgeRange' is becoming 'shapifyEdgeRange' within ncData
Description: The system will automatically convert the 'edgeRange' bool within the ncData for assets to 'shapifyEdgeRange' until phase2 deprecation. Just save the project to adopt the update.
State: Phase2: Fully Deprecated
Deprecation Schedule.2024.10.23.03
[type: deprecation information]
Title: 'Shape' and 'shape' are becoming 'Shapify' and 'shapify'
Description: The 'Shape' EffectNode and 'shape' EffectController are becoming 'Shapify' and 'shapify' respectively.
State: Phase2: Fully Deprecated
Deprecation Schedule.2024.10.29.00
[type: deprecation information]
Title: 'Updater' and 'nc.updaters' are becoming 'AppEvent' and 'nc.appEvents'
Description: The 'Updater' type and 'nc.updaters' property are becoming 'AppEvent' and 'nc.appEvents' respectively. It should be noted that the deprecated 'nc.updaters' will not work with minification.
State: Phase2: Fully Deprecated
Deprecation Schedule.2024.10.29.01
[type: deprecation information]
Title: 'nc.getAllUpdaterRecipients' is becoming 'nc.getAllEventRecipients'
Description: As part of the change from 'Updater' to 'Event', 'nc.getAllUpdaterRecipients' is deprecated. It should be noted that the deprecated 'nc.getAllUpdaterRecipients' will not work with minification.
State: Phase2: Fully Deprecated
Deprecation Schedule.2024.10.31.00
[type: deprecation information]
Title: The 'coreCanvasResolution' array in ProjectSettings is becoming two separate values 'coreCanvasResolutionX' and 'coreCanvasResolutionY'
Description: By breaking these finite-length arrays into explicit components, auto-validation will become more robust and user clarity will be improved.
State: Phase2: Fully Deprecated
Deprecation Schedule.2024.10.31.01
[type: deprecation information]
Title: The 'pivotAdjustment_position' array in ncData is becoming separate values 'pivotPointOffsetX', 'pivotPointOffsetY', and 'pivotPointOffsetZ'
Description: By breaking these finite-length arrays into explicit components, auto-validation will become more robust and user clarity will be improved. Just save the project to adopt the update.
State: Phase2: Fully Deprecated
Deprecation Schedule.2024.10.31.02
[type: deprecation information]
Title: The 'resolutionScaling' array in ncData is becoming separate values 'resolutionScaleX' and 'resolutionScaleY'
Description: By breaking these finite-length arrays into explicit components, auto-validation will become more robust and user clarity will be improved. Just save the project to adopt the update.
State: Phase2: Fully Deprecated
Deprecation Schedule.2024.10.31.03
[type: deprecation information]
Title: The 'unitsPerPixel' array in ncData is becoming separate values 'unitsPerPixelX', 'unitsPerPixelY' and 'unitsPerPixeZ'
Description: By breaking these finite-length arrays into explicit components, auto-validation will become more robust and user clarity will be improved. Just save the project to adopt the update.
State: Phase2: Fully Deprecated
Deprecation Schedule.2024.11.13.00
[type: deprecation information]
Title: The 'Inspector' suffix is being removed from the panel names.
Description: The Object Inspector, Hierarchy Inspector, and Particle System Inspector, are all losing thier suffix.
State: Phase2: Fully Deprecated
Deprecation Schedule.2025.02.19.00
[type: deprecation information]
Title: A temporary check has been added to detect duplicate UIDs listed in construct files.
Description: In certain situations in the Jan-Feb 2025 time range, using the 'duplicate' option in the Incisor GUI or even just using copy and paste within a construct hiearchy was resulting in duplicate UIDs within a construct. This check has been added to detect those duplicates and correct them.
State: Phase1: Detection and Correction Functionality in Effect
Phase2Target: 2025.06.01
Phase3Target: 2026.01.01
Deprecation Schedule.2025.02.20.00
[type: deprecation information]
Title: Graphic Expander Change: innerWidth and innerHeight are deprecated, and so are the expandableWidth and expandableHeight paremeters of the setup.
Description: Originally expandableWidth, expandableHeight, innerWidth, and innerHeight were each allowed to be either numbers or arrays - this was too easily confusable. Now a 'symmetric' flag determines which mode the GraphicExpander is in, and there is an entirely different set of properties for each mode. In symmetric mode, there is expandableWidth, expandableHeight, expandedWidth, & expandedHeight. In non-symmetric mode, there is expandableAreaLeft, expandableAreaRight, expandableAreaTop, expandableAreaBottom, expandedAreaLeft, expandedAreaRight, expandedAreaTop, & expandedAreaBottom
State: Phase1: Previous Behavior Still Works With Warning
Phase2Target: 2025.06.01
Phase3Target: 2026.01.01
Deprecation Schedule.2025.02.25.00
[type: deprecation information]
Title: Timeline.autoplay and Timeline.initialTime have been explicitly added, and the Construct blueprint format has been updated appropriately
Description: Constructs with timelines must be opened and saved before the phase 2 date for the implicit form of the functionality to be transfered into the Construct blueprint.
State: Phase1: Previous Behavior Still Works, and is Automatically Converted
Phase2Target: 2026.01.01
Phase3Target: 2026.01.01
Deprecation Schedule.2025.03.05.00
[type: deprecation information]
Title: CodeAsset file format change.
Description: Previously, code asset files ended in '.codeAsset' and the content of the files was placed entirely within the code asset init scope. Now files end in '.codeAsset.js' and their contents is placed by default in the code asset class space, except for 'CODE.runBeforeInit' blocks, which are put into the init scope.
State: Phase1: '.codeAsset' files are detected and automatically converted to '.codeAsset.js' files, with the contents wrapped in 'CODE.runBeforeInit' blocks.
Phase2Target: 2025.06.01
Phase3Target: 2026.01.01
Deprecation Schedule.2025.03.05.01
[type: deprecation information]
Title: jsconfig.json update
Description: Previously generated projects contain a jsconfig.json file that lists the 'Assets' directory as a directory to ignore. But this makes the autocomplete in '*.codeAsset.js' files not work. So a bit of code has been added to detect and fix this whenever a project is opened.
State: Phase1: jsconfig.json files will be automatically edited
Phase2Target: 2025.06.01
Deprecation Schedule.2025.04.02.00
[type: deprecation information]
Title: Timeline.playOnceAsEvent and Timeline.playOnceWithInfluence are being replaced with Timeline.playOnce_swoopInfluence
Description: For clearer naming and better usability.
State: Phase1: Previous behavior still works, and is automatically converted in constructs
Phase2Target: 2025.09.01
Deprecation Schedule.2025.04.02.01
[type: deprecation information]
Title: Timeline.playWithInfluence is being replaced with Timeline.play_swoopInfluence
Description: For clearer naming and better usability.
State: Phase1: Previous behavior still works, and is automatically converted in constructs
Phase2Target: 2025.09.01
Deprecation Schedule.2025.04.25.00
[type: deprecation information]
Title: Constructs without UID references are being deprecated.
Description: For a time, Constructs used an 'objectAddress' array as a means of identification - this is being entirely replaced with the 'UID' system.
State: Phase: Fully Deprecated.
Deprecation Schedule.2025.04.27.00
[type: deprecation information]
Title: New API for masking Graphic Objects - 'GraphicObject.masking'
Description: For GraphicObject, '.makeMasker', '.makeMasked', '.disableMasking', '.maskStatus', and '.maskList' are all being replaced by GraphicObject.masking
State: Phase1: Previous behavior still works with deprecation warnings, and the masking API will be automatically converted in Constructs, which must each be opened and saved in the inspector to commit the update.
Phase2Target: 2025.09.01
Deprecation Schedule.2025.05.06.00
[type: deprecation information]
Title: Particle System Random Distribution Type Support
Description: ParticleSystem.radnomnessDistribution no longer supports anything but a numeric value.
State: Phase2: Fully Deprecated
Deprecation Schedule.2025.05.21.00
[type: deprecation information]
Title: PlaybackController.autoplay -> PlaybackController.autoplayWhenInConstruct
Description: PlaybackController.autoplay is changing to PlaybackController.autoplayWhenInConstruct for clarity.
State: Phase1: Previous behavior still works with deprecation warnings - the flag in the construct file will remain 'autoplay'.
Phase2Target: 2025.09.01
Deprecation Schedule.2025.05.27.00
[type: deprecation information]
Title: nc.particleSystemDefinitions -> nc.particleSystemDefs
Description: For consistency; definition dictionaries directly nc use the abbreviated 'Defs' to shorten the commonly used reference.
State: Phase1: Previous behavior still works with deprecation warnings.
Phase2Target: 2025.09.01
Deprecation Schedule.2025.05.28.00
[type: deprecation information]
Title: Updated Incisor Version Check moved to Standard 'SoftStatus' Update
Description: There used to be a check built in to Incisor to see if there were newer versions of Incisor available. The check has been moved to the server; when a newer version is found, the server sends a message through the standard messaging apparatus. But the 'newnewestVersionOfCurrentSet' is still being sent in the SoftStatusUpdate for backwards compatibility. In the next phase, the newnewestVersionOfCurrentSet will be taken out of the SoftStatusUpdate.
State: Phase1: Both new and old functionality work.
Phase2Target: 2025.09.01
Deprecation Schedule.2025.05.28.01
[type: deprecation information]
Title: Internal Remote Extensions Cloud Location Has Changed
Description: The original cloud location for Internal Remote Extensions has changed to include the VersionSet in its path. For now the old location is still being populated with remote extensions files. In the next phase, the old location will be removed.
State: Phase1: Both the old and new internal remote extensions locations work.
Phase2Target: 2025.09.01
Deprecation Schedule.2025.06.13.00
[type: deprecation information]
Title: AppEvent.addCallback has a 'callbackArgs' parameter between 'callbackName' and 'pauseImmunity'.
Description: This change helps to entirely unify the internal callbacks system and will future-proof AppEvents.
State: Phase: Fully Deprecated
Deprecation Schedule.2025.10.15.00
[type: deprecation information]
Title: SlotReel.symbolCustomAddOnDefinition will be deprecated. Please use SlotReel.symbolDefinition instead.
Description: This change is being made to accomodate SlotReel being able to accept either a CustomAddOn OR a CustomObject for the symbol functionality.
State: Phase1: Old functionality works with warning.
Phase2Target: 2026.06.01
----------------------------------------------------------
Section 170: Release Notes
----------------------------------------------------------
Release Notes
[type: information]
Incisor Release Notes...
Release Notes.2025.11.12.00.00.00
[type: release notes information]
TITLE:
Added TextBox.addStartEditCallback
DESCRIPTION:
A new callback that can be created whenever a TextBox's editingMode changes to 'editing'.
TITLE:
Added TextBox.htmlBacking
DESCRIPTION:
A means to allow keyboard input from mobile devices by creating a hidden text element that accepts mobile keyboard entry.
Release Notes.2025.10.28.00.00.00
[type: release notes information]
TITLE:
Added 'ProcessConfiguration' for runProcess, runCmd, and runBash
DESCRIPTION:
A new class with properties pertaining to the running of processes.
TITLE:
Cleared many unnecessary documentation classes.
DESCRIPTION:
Several classes were converted to object expressions in the documentation to reduce clutter.
Release Notes.2025.10.25.00.00.00
[type: release notes information]
TITLE:
Template Library Generated Extensions Bug Fix
DESCRIPTION:
Some of the names within the exported extensions from the template library weren't being substituted correctly.
Release Notes.2025.10.24.00.00.00
[type: release notes information]
TITLE:
Fixed Bug with Gradient2Color, Gradient3Color, Gradient4Color
DESCRIPTION:
Those EffectNodes had effect controllers that attempted to use a disallowed component name. They have been fixed and validation has been added to clarify what is happening when this issue is encountered in the future.
Release Notes.2025.10.23.00.00.00
[type: release notes information]
TITLE:
Fix to the PingPong Motion Type
DESCRIPTION:
Prior to this fix, if the upper bounds weren't larger than the lower bounds, there were issues.
TITLE:
Spine Import Fixes
DESCRIPTION:
Too numerous to itemize, many are related how multiple constraint-style spine features work together.
Release Notes.2025.10.18.00.00.00
[type: release notes information]
TITLE:
Template Library Effect Nodes Made Safer
DESCRIPTION:
All of the variables declared in the open fragment and vertex shader scopes are now prepended with the user-specified effect node name. Also, associated EffectControllers are now made to be lowercase if they are not already.
TITLE:
Added the ShapifyStroke EffectNode to the TemplateLibrary
DESCRIPTION:
Add a built-in stroke to a shapified GraphicObject.
TITLE:
Added nc.definePrecomp
DESCRIPTION:
Allowing the for the creation of a Precomp in the target software from within extensions via 'nce.projectNC.definePrecomp'.
TITLE:
Fixed EffectNode Default Values Bug
DESCRIPTION:
In certain scenarios the default values were not being applied to the material when a new EffectNode was being added.
Release Notes.2025.10.15.00.00.00
[type: release notes information]
TITLE:
Added SlotReel.numSymbols
DESCRIPTION:
... for quick reference
TITLE:
SlotReels can now accept a CustomObjectDefinition for the 'symbolDefinition' parameter.
DESCRIPTION:
To make the interface between the SlotReel and its symbols more intuitive and less verbose.
TITLE:
Added SlotReels.symbolPathOverrideMode.
DESCRIPTION:
Now the positioning of the symbols along the reel path can be completely overriden.
Release Notes.2025.10.03.00.00.00
[type: release notes information]
TITLE:
Added nce.runBash and nce.runCmd
DESCRIPTION:
For the ability to run terminal commands easily through extensions without having to specify the process location.
TITLE:
Introducing Electron Integration
DESCRIPTION:
Look for options to publish native apps in the 'Publish Project' popup window.
TITLE:
Fixed SlotReel.getSymbols Bug
DESCRIPTION:
It previously wasn't returning correctly.
Release Notes.2025.10.01.00.00.00
[type: release notes information]
TITLE:
Added the nc.addScene
DESCRIPTION:
Exposing the factory function which can be used in addition to the standard constructor.
Release Notes.2025.09.29.00.00.00
[type: release notes information]
TITLE:
Added the 'StretchBetween2D' CustomAddOn to the TemplateLibrary.
DESCRIPTION:
Stretch any GraphicObject in the middle such that it reaches between the two points you provide.
Release Notes.2025.09.27.00.00.00
[type: release notes information]
TITLE:
Added 'numHorizontalGridSegments' and 'numVerticalGridSegments' to the Object panel, and also made those items Construct-savable.
DESCRIPTION:
To be able to manipulate the number of grid segments from within the GUI.
Release Notes.2025.09.25.00.00.00
[type: release notes information]
TITLE:
Fixed Post Publish Bugs
DESCRIPTION:
There was a race condition that caused the inspector to need to be refreshed after publishing projects.
TITLE:
Fixed ParticleSystem.stopEmitting Documentation Issue
DESCRIPTION:
Fixed the parameter type.
Release Notes.2025.09.24.00.00.00
[type: release notes information]
TITLE:
Introducing SlotReel
DESCRIPTION:
To create spinning reels for a casino slot game with ease.
TITLE:
Introducing Matrix4, SceneObject.worldMatrixOverrideMode, SceneObject.localMatrixOverrideMode, SceneObject.worldMatrix, and SceneObject.localMatrix
DESCRIPTION:
Unlocking the ability for the user to work around the built-in 'arrangement' properties and manipulate the rendering matrices directly for custom effects.
TITLE:
Introducing Spine Import (Experimental)
DESCRIPTION:
Users can now import Spine animations.
TITLE:
Added GraphicObject.frustumCulling
DESCRIPTION:
Boolean determining if the GraphicObject is automatically omitted from rendering when it is entirely outside of the Camera's viewing area (its frustum).
TITLE:
Added WaitThen.duration
DESCRIPTION:
Read-only property indicating the current duration of the WaitThen.
Release Notes.2025.09.26.00.00.00
[type: release notes information]
TITLE:
Added nc.defineFlowController, FlowController, FlowState, FlowStateElement, and the 'Flows' panel.
DESCRIPTION:
For implementing and visualizing state flows within the project...
TITLE:
Hierachy Panel: Hold 'Alt' to Reparent while Maintaining Global Position
DESCRIPTION:
This feature was accidentally removed in an earlier version.
Release Notes.2025.09.20.00.00.00
[type: release notes information]
TITLE:
Added New Color Themes, Including a new Default Color Theme
DESCRIPTION:
If you have already been using Incisor, you may need to wipe out your ApplicationSettings.json to see the new colors.
TITLE:
Fixed copy/paste TextBox Bug in ConstructEditor
DESCRIPTION:
Now a freshly pasted TextBox will display properly immediately in the ConstructEditor.
TITLE:
Fixed Error in nc.defineEffectNode and nc.definedEffectController Documentation
DESCRIPTION:
These documentation errors were resulting in misleading TypeScript compilation errors.
TITLE:
Fixed Bug Related to Layers Changing In Construct
DESCRIPTION:
Now if a construct item's layer disappears, nothing bad happens (except the requisite warnings).
Release Notes.2025.09.19.00.00.00
[type: release notes information]
TITLE:
Runtime Memory Usage Reduction
DESCRIPTION:
Several changes have been made to reduce runtime memory including removing the 'asset data stash', freeing asset list 'bulk' data, and making internal EffectNode support objects be generated on an 'as-needed' basis.
TITLE:
Removed 'SampleGlobalExtensions' and 'SampleProjectExtensions'
DESCRIPTION:
All of these examples have been moved to the 'TemplateLibrary' menu.
Release Notes.2025.09.15.00.00.00
[type: release notes information]
TITLE:
Live View Cursor Input Bug Fixed
DESCRIPTION:
Now cursor input is only sent through the Live View panel if it is in focus.
TITLE:
Missing Sub-Construct Bug Fixed
DESCRIPTION:
Incisor was failing in an unrecoverable way when attempting to place a non-existent Construct within a Construct, no you just get the standard warning.
Release Notes.2025.09.10.00.00.00
[type: release notes information]
TITLE:
Added 'nc.canvasElement'
DESCRIPTION:
For direct access to the project canvas element.
TITLE:
Added FontReduction Window
DESCRIPTION:
Accessible via a new button in the Transcript Panel. In this you window can see which characters will be included with each font when the project is published. You can also export an informational JSON file for external use if needed.
Release Notes.2025.09.08.00.00.00
[type: release notes information]
TITLE:
Added builtInHeaderMenus to Custom Color Themes
DESCRIPTION:
For increased flexability.
TITLE:
Fixed Publishing Bug: Font Character Assets split out by Language
DESCRIPTION:
There was an issue font characters were not being split into language-specific asset data files.
TITLE:
Added Header to Live View Panel
DESCRIPTION:
Now all of the control buttons are in the header.
TITLE:
Live View Panel: Added Full Scren Toggle
DESCRIPTION:
Now you can toggle fullscreen for Live View.
TITLE:
Live View Panel: Added View Modes
DESCRIPTION:
Modes allow you to specify the aspect ratio of the live view. You can include additional view modes in ProjectSettings.
TITLE:
Live View Paused Bug Fixes
DESCRIPTION:
Pausing the Live View was causing some bugs, including issues with the Construct Editor, and issues with stepping a single frame.
Release Notes.2025.09.04.00.00.00
[type: release notes information]
TITLE:
Added nce.reloadProject
DESCRIPTION:
Functionality for reloading the project (same as pressing the refresh button in the live view) from within extensions.
Release Notes.2025.09.02.00.00.00
[type: release notes information]
TITLE:
Added ApplicationSettings.colorTheme, and ApplicationSettings.customColorThemes
DESCRIPTION:
Now you can create custom color themes for Incisor.
TITLE:
Timeline Keyframe Scaling Bug Fixed
DESCRIPTION:
Fixed bugs with keyframe handle scaling related to uiZoom
TITLE:
Upgraded Incisor/Browser Protocol
DESCRIPTION:
Optimized communications protocol between Incisor and the client browser, elminating multiple Cson/Json interpretations per communication and reducing the overall size of communications.
Release Notes.2025.08.28.00.00.00
[type: release notes information]
TITLE:
Added FileBrowser.refresh
DESCRIPTION:
Method to refresh the FileBrowser so it can reflect file system changes.
TITLE:
Added Color Supervisor Button and Color Window
DESCRIPTION:
Now you can see a swatch of a given color next to its EffectController. Clicking the swatch opens a window that allows you to visually choose a color.
TITLE:
Added UiPopupWindow.isMovable
DESCRIPTION:
Windows can now now be moved by dragging the header.
TITLE:
Added nc.visualFocusDimmerAmount
DESCRIPTION:
The strength of the dimmer can now be changed dynamically.
TITLE:
Rebuilt 'Layers' Manager
DESCRIPTION:
The LayersManager has been visually reconstructed and is now accessable from the layers menu in the Object panel, in its own panel, and from within the 'Manage' menu. Keystroke shortcuts have also been added.
TITLE:
Rebuilt 'Masks' Manager
DESCRIPTION:
The MasksManager has been visually reconstructed and is now accessable from the masking menu in the Object panel, and also from within the 'Manage' menu. Keystroke shortcuts have also been added.
Release Notes.2025.08.27.00.00.00
[type: release notes information]
TITLE:
Upgraded Project File System
DESCRIPTION:
Changes made to project files while a project is open are now reflected in the Incisor project and are part of the 'undo/redo' stack.
Release Notes.2025.08.24.00.00.00
[type: release notes information]
TITLE:
Added nce.runProcess
DESCRIPTION:
A means to run external executable processes from within extensions code.
TITLE:
Fixed Asset Package Scale Bug with SpriteSheets
DESCRIPTION:
When publishing with multiple asset package scales, images in sprite sheets were reusing geometry from other asset packages erroneously.
TITLE:
Rebuilt the Hierarchy Inspector
DESCRIPTION:
The hierarchy inspector has been rebuilt visually, and now uses the 'ItemRepStack' method that the file browser uses.
TITLE:
Asset Browser and Asset Settings have been combined
DESCRIPTION:
Now the inspector has a single 'Assets' panel, which makes for easier access.
Release Notes.2025.08.16.00.00.00
[type: release notes information]
TITLE:
Added 'nce.addFileBrowser'
DESCRIPTION:
A new tool for file system viewing within extensions.
TITLE:
Added 'nce.showPathQueryPopup'
DESCRIPTION:
Another standardized popup for acquiring a path from the user via visual interface.
TITLE:
Added a root selector to the Open Project and New Project popup windows.
DESCRIPTION:
Now you can change the root to different locations and drives from within the popup window.
TITLE:
AssetBrowser panel and AssetSettings panel have been combined into the 'Assets' panel.
DESCRIPTION:
Easier access in one, split panel. A searchbar has also been added.
TITLE:
Added nc.incisorApp.pauseProjectDirectoryWatcher and nc.incisorApp.resumeProjectDirectoryWatcher
DESCRIPTION:
A way to pause and resume the auto-reload-on-file-change functionality.
TITLE:
Fixed Issue with TextBox.BoxHeight and TextAssembly.BoxHeight
DESCRIPTION:
In some situations, with wrapToFit=false, the box size properties were not having the desired effect on the text layout.
TITLE:
Added More Detection for Project Minification Reservations
DESCRIPTION:
Added auto-detection of asset names and other keywords referenced in Constructs, Layers, ParticleSystems, Masks, and Transcripts.
Release Notes.2025.08.10.00.00.00
[type: release notes information]
TITLE:
SoftwareSpeed Sound PlaybackRate Bug Fixed
DESCRIPTION:
Incisor was failing to adjust the PlaybackRate of sounds when SoftwareSpeed was adjusted in some scenarios.
TITLE:
Inspector Live View Aspect Ratio Slippage Fixed
DESCRIPTION:
Within the inspector, the LiveView was sending the previous aspect ratio to the target software instead of the current aspect ratio.
Release Notes.2025.07.09.00.00.00
[type: release notes information]
TITLE:
Added Info-Object Parameters to Publish Actions
DESCRIPTION:
nce.addPrePublishCallback, and nce.addPostPublishCallback now sends info objects (PrePublishInfoObject and PostPublishInfoObject) to the callbacks.
Release Notes.2025.07.08.00.00.00
[type: release notes information]
TITLE:
Added nc.appEvents.visibilityChange
DESCRIPTION:
Event associated with a change in the visibility of the browser/app running Incisor.
TITLE:
Added SceneObject.addUiZoomCallback and SceneObject.removeUiZoomCallback
DESCRIPTION:
Provides a new way to get a callback from a uiZoomChange event, such that callbacks associated with SceneObjects with higher 'hierarchy depth' values occur earlier.
TITLE:
Inspector Optimizations
DESCRIPTION:
Many of the UI objects have been optimized to not populate certain components unless needed. Also recursion has been removed from several internal processes.
TITLE:
HierarhcyPanel Rework
DESCRIPTION:
SceneObject representatives are now populated asynchronously to avoid performance issues with large Scenes. A search bar has also been added, as well as an 'expand/collapse all' button.
TITLE:
Added nc.maxReconciliationTime, and nc.maxHiddenReconciliationTime
DESCRIPTION:
Values to limit 'computational pile-ups' for projects with heavy computational tasks.
Release Notes.2025.06.29.00.00.00
[type: release notes information]
TITLE:
Added SceneObject.excludeChildrenFromBlueprint
DESCRIPTION:
A way to ensure that automatically populated children are accidentally duplicated in Constructs.
Release Notes.2025.06.28.00.00.00
[type: release notes information]
TITLE:
Introducing Transcript Panel
DESCRIPTION:
Now you can add, edit, and remove transcript phrases from within the new 'Transcript' panel.
Release Notes.2025.06.13.00.00.00
[type: release notes information]
TITLE:
AppEvent Rework
DESCRIPTION:
AppEvents have been reworked and unified internally in Incisor. New features include ordered AppEvents, as well as 'consumable callback' AppEvents. It should be noted that the parameters for AppEvent.addCallback have been changed in a way that may not be backwards compatible.
Release Notes.2025.06.11.00.00.00
[type: release notes information]
TITLE:
TypeScript Generation: Remove Previously Generated TypeScript Bug Fixed
DESCRIPTION:
There was an issue with the package.json file that was causing the removal of old files to fail.
TITLE:
HUD Scroll Selection Stability
DESCRIPTION:
New scroll-select algorithm produces a more stable and usable interface.
TITLE:
Auto_Select Timeline on Open
DESCRIPTION:
Now when you open a new Timeline panel it opens the Timeline that is currently open in any other Construct panels, if applicable.
TITLE:
Alphabetized Construct Menu, Construct-Timeline Menu
DESCRIPTION:
For increased usability...
Release Notes.2025.06.10.00.00.00
[type: release notes information]
TITLE:
Fixed Issue with New-Member Signup
DESCRIPTION:
Issue related to email confirmation resolved.
Release Notes.2025.06.07.00.00.00
[type: release notes information]
TITLE:
Added nc.appEvents.start and nc.addLateStartCallback
DESCRIPTION:
These AppEvents/callbacks are useful within CustomAddOns that are used in Constructs to be able to ensure that everything is 'set up' before the code in question runs.
Release Notes.2025.06.06.00.00.00
[type: release notes information]
TITLE:
Template Library Rework
DESCRIPTION:
Library items are now built as templates, with the user determining the name when they add them to the project. Also, templates for extensions, CustomAddOns, and CustomObjects.
TITLE:
CodeAssets Now Available in TypeScript
DESCRIPTION:
You can now have a '.codeAsset.ts' file in your Assets directory, and the resulting code asset will be converted into an associated JavaScript when the TypeScript is compiled.
TITLE:
Construct 'Sub-Name' Bug Fix
DESCRIPTION:
There was a bug that caused one Construct to overwrite another Construct upon saving changes if their names ended in the same characters. This bug has been fixed.
Release Notes.2025.05.30.00.00.00
[type: release notes information]
TITLE:
Button.addReleaseCallback bug fix
DESCRIPTION:
When published and run on touch devices, Button.addReleaseCallback was experiencing issues.
Release Notes.2025.05.29.00.00.00
[type: release notes information]
TITLE:
Added Sound.swoopVolume
DESCRIPTION:
...Interpolates the volume over the designated period of time.
Release Notes.2025.05.27.00.00.00
[type: release notes information]
TITLE:
Introducing CustomObjects
DESCRIPTION:
CustomObjects have been added... Define a new class that inherits from any of the standard hierarchy-bound objects (such as SceneObject, GraphicObject, etc...) and then register that object with Incisor to enable your custom object to be added to Constructs within the GUI.
Release Notes.2025.05.20.00.00.00
[type: release notes information]
TITLE:
Bug Fix: Post-Enabled EffectController Reset
DESCRIPTION:
In certain situations, enabling objects would cause effect controllers to have 'stuck' values. Effect controller values are now 'dirtied' upon an object being enabled
TITLE:
Bug Fix: 'Number' Effect Controllers Getter Wrong at Instantiation
DESCRIPTION:
Efforts made to sync the primary and passdown controller values for 'number' typed controllers were previously broken, causing issues in some situations.
TITLE:
Bug Fix: Minification Combined with 'RunBeforeInit' Sections
DESCRIPTION:
Such sections weren't being pulled through into the compiled file when minification was turned on.
TITLE:
Default TypeScript Compilation Target Changed to ES2017
DESCRIPTION:
This cleans up the typescript generated code for asynchronous functions a lot without raising serious compatibility concerns.
TITLE:
PlaybackController.autoplay is becoming PlaybackController.autoplayWhenInConstruct
DESCRIPTION:
For clarity.
Release Notes.2025.05.13.00.00.00
[type: release notes information]
TITLE:
ProjectSettings: UiTextField Focus Fallback Bugs Fixed
DESCRIPTION:
Certain UiTextFields in the ProjectSettings popup were causing focus issues when they were edited.
TITLE:
Introducing CustomAddOns
DESCRIPTION:
CustomAddOns can now be defined in code assets and added to various SceneObjects using the inspector.
TITLE:
Restored Undo/Redo Functionality for TextBoxes
DESCRIPTION:
While typing in a TextBox, you can undo and redo. This functionality was accidentally disabled in January and has been restored.
TITLE:
TextBoxes: 'Hold Shift for New Line'
DESCRIPTION:
Now, if a TextBox's 'returnEndsEditing' property is true, you can still hold 'shift' to get a new line.
TITLE:
Added TextAssembly.getCharacters
DESCRIPTION:
Returns an array of GraphicObjects...
Release Notes.2025.05.05.00.00.00
[type: release notes information]
TITLE:
Added: nc.useNearestPixelRenderingForAllUiItems
DESCRIPTION:
A way to set the default value of 'useNearestPixelRendering' for all of the 'UI' objects at once.
TITLE:
Project Settings Popup: Loading Tier Removal Bug Fix
DESCRIPTION:
A bug related to removing loadingTiers in the ProjectSettings is fixed.
TITLE:
SpriteSetter: Key GraphicAsset Selection Updated
DESCRIPTION:
Now uses the improved GraphicAsset selection popup...
TITLE:
Constructs: Buttons can now be added Directly to Constructs
DESCRIPTION:
The option to add Buttons is now in the GUI, and Constructs will reproduce the Buttons correctly.
Release Notes.2025.04.30.00.00.00
[type: release notes information]
TITLE:
LiveViewPanel: Single Step 'screenUpdate'
DESCRIPTION:
To ensure that all of the callbacks associated with a given live-view-single-step (when the user presses the single step button) Incisor now forces a screen update in the target project with each step.
TITLE:
MaskGroup Predefinition Files
DESCRIPTION:
MaskGroup definitions can now be stored in the 'main.maskGroups' file within the Assets directory.
TITLE:
MaskGroups Management in GUI
DESCRIPTION:
MaskGroups can now be managed from within the GUI via ObjectPanel->masking->maskGroups.
TITLE:
JavaScript Strict Mode No Longer Enforced
DESCRIPTION:
In previous versions, Incisor enforced JavaScript 'strict mode'. Now the user can add that restriction if they want.
Release Notes.2025.04.29.00.00.00
[type: release notes information]
TITLE:
GraphicObject: Masking API Change
DESCRIPTION:
Masking-related items are now accessible through GraphicObject.masking. See updated documentation for more information.
TITLE:
Timelines Panel: Stray Keyframe Dropping Bug Fix
DESCRIPTION:
In some scenarios, scrubbing the playhead could cause a random keyframe to drop. This has been fixed.
TITLE:
AssetSettings Panel: Erroneous Red Error Removed
DESCRIPTION:
Projects with more assets would produce a red error on load if the AssetSettings panel was open. This has been fixed.
Release Notes.2025.04.25.00.00.00
[type: release notes information]
TITLE:
Pdfs: Added PdfSection.setMargins
DESCRIPTION:
For ease of use.
TITLE:
Pdfs: Added the ability to add Tables to TextFrames.
DESCRIPTION:
New functionality...
TITLE:
ParticleSytems: Added the '.particleSysDef' asset format.
DESCRIPTION:
ParticleSystemDefinitions are no longer meant to be solely stored as '.codeAsset' files (but they still can be). Now you can use the 'create new' button in the GUI to create a new ParticleSystemDefinition (based on any existing ParticleSystemDefinition or one of several templates), which is stored in an associated 'particleSysDef' file in the project's 'Assets' directory. Any ParticleSystemDefinition backed by a '.particleSysDef' file has full undo/redo functionality in the GUI.
TITLE:
Object Panel: Timeline Editor Scene Objects Blocked from Editing
DESCRIPTION:
Most of the functionality in the Object panel has no permanent affect on objects inside of a Timeline Editor Scene, so to help users avoid what has been a super common mistake, we've blocked the Object panel entirely when such an object is selected, and added a 'go to NeutralState' button, which is where the associated changes can be made correctly.
TITLE:
Deprecation Schedule Actions Taken
DESCRIPTION:
Deprecations made current through to today, with the next round scheduled for 2025.06.01. See the 'DeprecationSchedule' for more information.
Release Notes.2025.04.23.00.00.00
[type: release notes information]
TITLE:
nc.loadingTiers auto-complete bug fixed
DESCRIPTION:
Auto-complete for 'nc.loadingTiers' was connected to the index values of the loading tiers instead of being connected to the numeric tier designations themselves. This has been fixed.
Release Notes.2025.04.22.00.00.00
[type: release notes information]
TITLE:
ProjectSettings Popup Window: Font Definitions
DESCRIPTION:
Fonts definitions can now be edited from within the project settings popup window.
TITLE:
ProjectSettings Popup Window: Loading Tier Definitions
DESCRIPTION:
Loading Tier definitions can now be edited from within the project settings popup window.
TITLE:
ProjectSettings Popup Window: Font Reduction Settings
DESCRIPTION:
Font reduction settings can now be edited from within the project settings popup window.
Release Notes.2025.04.21.01.00.00
[type: release notes information]
TITLE:
Re-open Control Center Feature Removed
DESCRIPTION:
Now, as soon as all Incisor tabs are closed, the app closes...
Release Notes.2025.04.21.00.00.00
[type: release notes information]
TITLE:
TimelinePanel: Graph Editor Alignment Bug Fix
DESCRIPTION:
Bug fixed: the graph editor was mis-aligned with the keyframe graphic objects.
Release Notes.2025.04.17.00.00.00
[type: release notes information]
TITLE:
Timeline: Double Tap Timescale
DESCRIPTION:
Now you can double tap the time scale bar to zoom the timeline into full visibility within the timeline editor.
Release Notes.2025.04.16.00.00.00
[type: release notes information]
TITLE:
Application Settings GUI Rework
DESCRIPTION:
Completely new panel - streamlined look and improved usability.
TITLE:
Project Settings GUI Rework
DESCRIPTION:
Completely new panel - streamlined look and improved usability.
TITLE:
Switching Timelines in Construct Panel Changes Selected SceneObject
DESCRIPTION:
Now if you choose a different Timeline in the Construct panel or choose to add a new Timeline the Construct instance in the associated editor is automatically selected.
TITLE:
Timeline Panel: Default Filtering Off
DESCRIPTION:
An issue where the filtering button may be left on when creating a new Timeline was thought to have been fixed but persisted in some scenarios. This has been fixed now.
TITLE:
ApplicationSettings: maxUndoStates bug fixed
DESCRIPTION:
It is now functioning correctly.
TITLE:
LayoutStack.border Documentation Fix
DESCRIPTION:
It was listed twice, which was affecting the TypeScript API.
TITLE:
nc.phrases and nc.phraseIDs Restored in TypeScript
DESCRIPTION:
These members were missing from autocomplete in TypeScript and are no longer missing.
TITLE:
ProjectSettings: 'usingTypeScript' indicator set correctly
DESCRIPTION:
The indicator erroneously always displayed as true. This has been fixed.
TITLE:
ProjectSettings: New Configuration Name Bug
DESCRIPTION:
If the auto-generated name already existed, no new configuration was created. This has been fixed.
TITLE:
ProjectSettings: 'limitPublishedBuildsKept' is now a Project-Wide Setting
DESCRIPTION:
Previously it was a per-configuration setting. Now you can set the value and it just manages the total number of published builds
Release Notes.2025.04.09.00.00.00
[type: release notes information]
TITLE:
Timeline Management Popup Added to Construct Panel
DESCRIPTION:
Now you can add timelines, remove timelines, duplicate timelines, and set the default timeline for a given Construct by clicking 'Manage Timelines'
TITLE:
TextBox Drag, Double Click, and Triple Click Bug
DESCRIPTION:
There were several associated bugs with TextBoxes caused by a low level malfunction in button drag functionality related to removing the requirement for drag threshold. This has been fixed.
TITLE:
TextBox Copy Paste Bug Fixed
DESCRIPTION:
In Windows, there were issues with copying and pasting with TextBoxes. This has been fixed.
TITLE:
Timeline Panel Playhead and Column Divider Bug Fix
DESCRIPTION:
Some of the organizational graphics were getting cut off and no longer are.
TITLE:
Timeline Panel Persistence Bugs Fixed
DESCRIPTION:
Open Close SceneObject, Graph Editor Open, and the zoom and location of the timescale weren't always properly persisting and now they are.
Release Notes.2025.04.04.00.00.00
[type: release notes information]
TITLE:
Keyframes and Curve Handles Have Larger Button Areas and Rollover Animations
DESCRIPTION:
...for ease of use...
TITLE:
Editing Project Extensions Refreshes Browser
DESCRIPTION:
Every time a file change is detected within the project extensions directory, the browser will reload.
TITLE:
Timeline Panel State Persistence Improved
DESCRIPTION:
The open/close states of SceneObjects listed in the timeline panel are working now, along with the open/close state of graph editors.
Release Notes.2025.04.02.00.00.00
[type: release notes information]
TITLE:
GUI Blank Tab Bug Fixed
DESCRIPTION:
There was a bug that resulted in the browser opening blank tabs while attempting to show the Incisor GUI. This has been fixed.
TITLE:
'Run as Administrator' no longer required for Windows
DESCRIPTION:
Port acquisition has been reworked so administration mode is no longer required.
Release Notes.2025.03.31.00.00.00
[type: release notes information]
TITLE:
GraphicAsset Selection PopupWindow Added
DESCRIPTION:
For ease of use when selecting from a larger number of GraphicAssets.
TITLE:
Timeline Filter Button No Longer Defaults On
DESCRIPTION:
The default view is unfiltered.
TITLE:
Delete Items From Anywhere Bug Fixed
DESCRIPTION:
The keyboard input for deleting an object from the Hierarchy panel was lacking a singular focus requirement, and so keyboard commands were affecting selected items from anywhere. This has been fixed.
Release Notes.2025.03.27.00.00.00
[type: release notes information]
TITLE:
Timeline Display Functionality Updates
DESCRIPTION:
In the Timeline panel: Added expand/collapse all button, 'show' button, and 'sort' button. Also made the state of those buttons, as well as the expanded/collapsed state of SceneObjects persistent.
Release Notes.2025.03.26.00.00.00
[type: release notes information]
TITLE:
ProjectTranscript and PhraseID Functionality Added
DESCRIPTION:
Added nc.phraseIDs, nc.phrases, and nc.getPhrase, as well as TextBox.phraseID and TextAssembly.phraseID. In addition, phraseID is now 'capturable' via Constructs.
Release Notes.2025.03.25.00.00.00
[type: release notes information]
TITLE:
Incisor Extensions Fleshed out and Documented
DESCRIPTION:
Added IncisorExtensions object and functionality. Also, Incisor now includes the 'SampleProjectExtensions.js' file in new projects, and the 'SampleGlobalExtensions.js' in the Incisor application support directory.
Release Notes.2025.03.21.00.00.00
[type: release notes information]
TITLE:
Item Drag Extends Outside of Inspector Panels
DESCRIPTION:
Now if you are dragging a supervisor in the GUI to affect its value, you can continue to drag outside of the panel that contains it without the drag being interrupted.
TITLE:
Added 'CursorInputOverrideButton.allowExtendedDrag'
DESCRIPTION:
Flag determining if items within the inner scene associated with a CursorInputOverrideButton can be dragged outside of the bounds of the viewing camera.
TITLE:
Inspector KeyboardEvent Bug Fix
DESCRIPTION:
The 'Incisor Panel Refactor' fix introduced a bug that didn't allow keyboard input through the inspector to the project. This has been fixed.
Release Notes.2025.03.20.00.00.00
[type: release notes information]
TITLE:
Windows Installation Bug Fixed
DESCRIPTION:
In some situations, installation was failing on Windows causing Incisor to not be able to find the WMPL executable.
TITLE:
Incisor Panel Refactor
DESCRIPTION:
Inspector panels have been reworked in the Incisor GUI to better prepare for making them available for customization in Incisor Extensions.
Release Notes.2025.03.14.00.00.00
[type: release notes information]
TITLE:
TypeScript Critical Error Fixed
DESCRIPTION:
TypeScript projects entirely failed to open. Now fixed!
TITLE:
Construct Component Minification
DESCRIPTION:
Minification has been reworked to provide more robust detection and matching of tokens between Construct files and project code.
Release Notes.2025.03.12.00.00.00
[type: release notes information]
TITLE:
fileIO.copyTo bug fixed
DESCRIPTION:
This was failing to default the 'rename' option internally... now fixed.
TITLE:
UiPoppWindow.setDecisionButtons layering issue fix.
DESCRIPTION:
There was an issue when calling 'setDecisionButtons' after changing the layers of a UiPopupWindow. Layers for decision buttons are now defaulted to the background of the given UiPopupWindow.
Release Notes.2025.03.08.00.00.00
[type: release notes information]
TITLE:
Incisor Extensions Added!
DESCRIPTION:
Include javascript files in the 'Utilities/ProjectExtensions' in the project or '(ApplicationSupportDirectory)/Global Extensions' to extend the Incisor inspector with custom functionality.
TITLE:
nc.recreateObjectFromBlueprint returns root object
DESCRIPTION:
Previously, this function was returning an array with a single object in error. Now, the appropriate SceneObject is returned.
TITLE:
'includeDescendants' parameter included in nc.gatherObjectBlueprint
DESCRIPTION:
Now you can decide if you want to recurse into the descendants or not.
TITLE:
added 'nc.duplicateViaBlueprint'
DESCRIPTION:
The user can use the same system that is used by Constructs to duplicate SceneObjects or collections of SceneObjects by calling 'nc.duplicateViaBlueprint'
Release Notes.2025.03.05.00.00.00
[type: release notes information]
TITLE:
Layers Bug Fix
DESCRIPTION:
The 'subLayers' calculation for GraphicObjects had a bug that allowed for subLayers to push GraphicObjects outside of the bounds of their layers. This bug has been fixed.
TITLE:
CodeAsset Format Update
DESCRIPTION:
The code asset file format has changed. The file extension has changed from '.codeAsset' to '.codeAsset.js'. In addition code that is meant to be run 'on init' must now be marked with the 'CODE.runBeforeInit___begin' and 'CODE.runBeforeInit___end' tags, otherwise, code in code asset files will be placed in the 'class' scope, so that classes can be accessible in ProjectCode classes. Code assets using the older format will be updated and tags will be automatically added.
TITLE:
CODE.preserveStart -> CODE.preserve___begin, CODE.preserveEnd -> CODE.preserve___end
DESCRIPTION:
Change made for consistency and clarity.
Release Notes.2025.03.04.00.00.00
[type: release notes information]
TITLE:
GraphicExpander: ExpandableWidth duplicate reference in documentation fix
DESCRIPTION:
GraphicExpander.expandableHeight was mis-labeled as GraphicExpander.expandableWidth
TITLE:
TypeScript Code Iteration Bug Fixed
DESCRIPTION:
There was an issue in typescript projects where 'npm run build' was sporadically causing multiple refresh messages to go to the Incisor client, which was causing issues.
Release Notes.2025.02.27.12.29.02
[type: release notes information]
TITLE:
Timelines: New numeric-type AnimatedProperties available
DESCRIPTION:
The following numeric properties can now be animated in Construct Timelines: all GraphicExpander components; GraphicObject.subLayer; PlaybackController.time, PlaybackController.value, PlaybackController.playbackRate, for Timelines, SpriteSetters, and ParticleSystems; Timeline.influence
TITLE:
Timelines: New boolean-type AnimatedProperties available
DESCRIPTION:
The following booleans can now be animated in Construct Timelines: the 'enabled' flag on all SceneObjects; the 'visible' flag on GraphicObjects; 'useAdditiveBlendingMode' on GraphicObjects.
TITLE:
Timelines: New function-invocation-type AnimatedProperties available
DESCRIPTION:
The following functions are now Timeline-Keyframe-invocable: play, pause, stop, and playOnce can be called on Timelines, SpriteSetters, and ParticleSystems; playOnceWithInfluence and playOnceAsEvent can also be called on Timelines
TITLE:
Timelines: SwoopInfluence, PlayOnceAsEvent, PlayOnceWithInfluence, PlayWithInfluence methods added
DESCRIPTION:
New helper functions to play and manipulate influence on Construct Timelines.
TITLE:
PlaybackControllers: autoplay and initialTime added
DESCRIPTION:
All PlaybackControllers including Timelines, SpriteSetters, and Particle systems now have 'autoplay' and 'initialTime' properties. These new properties make it easier to explicitly determine the initial time of Timelines in newly instantiated Constructs, as well as their playback state.
TITLE:
Inspector Hierarchy Panel: Inappropriate changes blocked
DESCRIPTION:
In the GUI, certain changes to SceneObjects in the TimelineEditorScene have been blocked. Blocked changes include reparenting, renaming, removing objects, and adding objects. These changes should only happen in the NeutralState of a Construct.
TITLE:
Publishing Analytics Panel Updated
DESCRIPTION:
Reworked for stability... Also, a 'Current Configuration' mode has been introduced so that users can see what it will look like if they publish in the current configuration.
TITLE:
Incisor failing to open in Windows bug mitigated
DESCRIPTION:
Some Windows defender configurations (in Windows 11) were preventing Incisor from hosting the HttpListeners and WebSockets it depends on. As a result, we've had to make running Incisor as 'an administrator' a requirement. Our intent is to investigate ways to remove this requirement in the future.
TITLE:
Intermitant graphic locking up bug fixed
DESCRIPTION:
On some systems, the Incisor inspector would cause Chrome and Safari garbage collection to become overwhelmed over time. In some cases this was causing significant freezing/locking of the browser. This has been fixed by implementing low-level systemic memory reuse.
TITLE:
GraphicExpander: API Reworked
DESCRIPTION:
GraphicExpanders have been reworked to have a more intuitive interface, they are now either in 'symmetric' mode, or not. When in symmetric mode you deal with width and height, otherwise you determine all of the bounds. Everything should be entirely backward compatible with clear deprecation messaging.
TITLE:
Construct: SceneObject-descendant duplication bug fixed
DESCRIPTION:
In certain circumstances, duplicating SceneObjects (or copying and pasting them) would result in multiple SceneObjects having the same UID, which led to all kinds of issues with Timeline keyframes disappearing etc... This bug has been fixed.
TITLE:
Buttons: Default PauseImmunity bug fixed
DESCRIPTION:
The default pauseImmunity of Buttons was not being set to nc.defaultPauseImmunity, and now it is.
TITLE:
Layers: Move to Scene without layers bug fixed
DESCRIPTION:
There was a bug where reparenting a GraphicObject into a Scene without its Layer was causing it to disappear. Now, the given GraphicObject's layer is remapped to DefaultLayer in this case.
Release Notes.0000.00.00.00
[type: release notes information]
TITLE:
Template Change Item
DESCRIPTION:
This is where the description of the change goes...
Incisor® Questions and Answers
Incisor® Questions and Answers
This document is part of the compiled knowledge base for the Incisor® Software Development Platform.
Any use of this content is subject to the INCISOR® end user license and terms of use agreement.
https://www.incisordev.com/eultua
2025.11.25.13.26.58
----------------------------------------------------------
TABLE OF CONTENTS:
----------------------------------------------------------
Section 1: Containing Directory
Section 2: Pausing Everything when game has 'TILT'
Section 3: Reel Timing and Sequencing in the Slot Template
Section 4: Font Characters Disappearing in Published Project
Section 5: Dragging Buttons
Section 6: Particles Disappearing when the Object is out of the Camera View
Section 7: Remote Hosting On Windows
Section 8: Inline TextBox Graphics and Rich Text
Section 9: Time ramping gameplay
Section 10: Tagging Code that only Runs when in Editor Mode
Section 11: Adding Constructs
Section 12: Changing the Order that FlowStateElements Happen In
Section 13: 9 Slice
Section 14: Generating Sprite Sheets
Section 15: SpriteAnimation
Section 16: Button Clickable Area
----------------------------------------------------------
Section 1: Containing Directory
----------------------------------------------------------
PERSON1--------------------
I'm working in a pre-publish callback in an extension that I'm writing and I'm wondering if there's a way for me to get the current project working directory before I hit publish.
I know the publish result returns me the publish directory, but I'd like to know the base directory prior to that so that I can check something with that.
PERSON2--------------------
Check out nce.paths.projectPath or nce.paths.splitPath().
----------------------------------------------------------
Section 2: Pausing Everything when game has 'TILT'
----------------------------------------------------------
PERSON1--------------------
On an EGM, the game must pause everything if a door is opened or any tilt condition and resume after the tilt has cleared.
I know all our playable items have the ability to pause but is there a way to do that for the whole game without having to write pause code for each object?
I see the DefinePauseEvent example but it looks like each item will need custom code.
PERSON2--------------------
Yes there is a way, and you don’t need custom code for each object.
As a default all sequenced items in Incisor are susceptible to all PauseEvents, so you could define a new 'Tilt' PauseEvent, and that would automatically affect everything in code that doesn't call out specific pause immunity.\
You can set nc.defaultPauseImmunity at any point in the code and everything declared after that will automatically get the new PauseImmunity as a default.
----------------------------------------------------------
Section 3: Reel Timing and Sequencing in the Slot Template
----------------------------------------------------------
PERSON1--------------------
Can you help us customize our reel spins in [our game]?
I looked at the api for SlotReel, but didn't see a simple way to accomplish what we're trying to do:
1. How can we change the amount of time between each individual reel stop?
Right now the reels all stop with a very short delay between each one, about 0.1s.
Would we do this via the windupMotionFunctionName and make a windup function that sets different values for each reel?
If so, could you provide an example of this?
2. How do we modify the behavior of the wheel bounce?
I saw there's a "bounceMotionFunctionName" so it looks like we can make our own bounce function, but without knowing anything about the internals of the current bounce function,
I'm not really sure what variables we do or don't have access to to control this. Could you provide an example?
PERSON2--------------------
The timing of the reel starts and stops in the Incisor Slot Template is mostly managed in the SpinReels FlowState...
you’ll see in the constructor that there are two loops that set up the timing for all of the starts and stops,
and there is an increasing stagger set up within the loops. You can change all of the timing there.
As for the reel bounce, if you build your own bounce function using bounceMotionFunctionOwner and bounceMotionFunctionName, that takes 2 parameters: progress, and magnitude.
Progress will just be an input number from 0 to 1 over the bounce duration property attached to the reel, and the magnitude is just the bounce magnitude property of the SlotReel itself, you can use it or not… the function takes those properties and should return a number that determines the bounce position at any point during the bounce duration (as represented by the progress parameter).
The bounce position that function returns should be on a scale where 1 means 1 whole symbol position, so if you want it to bounce up a half a symbol’s height that function should return .5 at its peak.
The windup motion can be replaced similarly.
----------------------------------------------------------
Section 4: Font Characters Disappearing in Published Project
----------------------------------------------------------
PERSON1--------------------
Quick follow up on this, we're also seeing a very strange issue in the published version of the poker game.
It looks like there are a bunch of font issues.
If we just use the default "sample font", every character appears as vertical bars.
We tried a different font, which only worked for numbers and capital letters, all lowercase letters are shown as bars.
Any ideas on that one?
PERSON2--------------------
There are “font reduction” settings in the project settings that are likely removing all of the characters during publishing if you’re not using the project transcript for your phrases.
You can turn it all off in the project settings.
----------------------------------------------------------
Section 5: Dragging Buttons
----------------------------------------------------------
PERSON1--------------------
Any ideas on how to get a continuous particle system to stop gracefully?
PERSON2--------------------
There’s a “stopEmitting” function on the ParticleSystem object that would do that.
----------------------------------------------------------
Section 6: Particles Disappearing when the Object is out of the Camera View
----------------------------------------------------------
PERSON1--------------------
We have a coin fountain in our game but it won't appear because its point of origin is outside the view of the camera, so the particles never start rendering.
Is there a way to make a particle system work even if it's outside the camera view?
PERSON2--------------------
Yes, you can set the 'frustumCulling' property to false, either in code or in the GUI. If you select the ParticleSystem you'll see the frustumCulling property in the Object panel
You can turn it off there and if the ParticleSystem is in a Construct, the change will be saved.
----------------------------------------------------------
Section 7: Remote Hosting On Windows
----------------------------------------------------------
PERSON1--------------------
Does anyone know if remote hosting works on Windows with the latest release?
I want to publish and test on my phone without having to post the project online.
PERSON2--------------------
Testing on your mobile devices is very simple with Incisor.
Go to Application Setting which can be found by clicking on the Incisor logo on the top right corner.
Check "allowRemoteHosting."
When you publish the project, check "enable remote hosting."
This will create a QR code which will work with your mobile devices.
Just make sure that you are on the same network.
I just tested this with the latest version of Incisor with the poker project and it worked.
Also on Windows you may have to disable your firewall in order for it to work.
----------------------------------------------------------
Section 8: Inline TextBox Graphics and Rich Text
----------------------------------------------------------
PERSON1--------------------
Is there any way to show inline sprites with a text box? In [another tool we use] we could have rich text mode and indicate a sprite graphic like or something like that. And with rich text mode we could also do dynamic character sizing, bold, italic, etc.
PERSON2--------------------
Yeah to include GraphicAssets within a TextBox or TextAssembly you can look at TextBox.setSubstitutionCharacter and TextAssembly.setSubstitutionCharacter.
Also, for rich text, look at TextFormat and TextBox.setTextFormat and TextAssembly.setTextFormat. These enable you to change the font, character size, kerning, and even the material properties (including changing EffectNodes and EffectControllers) for specific portions of the text within a given TextBox or TextAssembly.
Check out these examples for inline images in TextBoxes:
// This is the main entry point for this Incisor® project.
// Throughout the project, this object can be referenced as 'pr'.
class ProjectMain
{
text:TextAssembly;
init()
{
// SUBSTITUTION CHARACTER APPROACH
let alternateTextFormat = new TextFormat();
alternateTextFormat.fontName = nc.fontNames["NotoSansMono_Condensed-Black"];
alternateTextFormat.characterMaterial.colorMultiply.red = 0;
let placedImageFormat = new TextFormat();
placedImageFormat.characterMaterial.setEffectNodes([nc.effectNodes.SampleMainTexture,nc.effectNodes.ColorMultiply]);
placedImageFormat.verticalShift = .25;
let text = new TextBox();
text.string = "Left*Right";
text.setSubstitutionCharacter("*",nc.graphicAssets.SampleParticle,placedImageFormat);
// LAYOUT STACK APPROACH
let textBox0 = new TextBox();
textBox0.string = "Left";
let graphic = new GraphicObject(nc.graphicAssets.SampleParticle);
let textBox1 = new TextBox();
textBox1.string = "Right";
let layoutStack = new LayoutStack();
layoutStack.isVertical = false;
layoutStack.addElements(textBox0);
layoutStack.addElements(graphic);
layoutStack.addElements(textBox1);
layoutStack.position.y = -200;
layoutStack.pivotPoint = new Vector2(0,0);
textBox0.layoutObject.justification = "center";
graphic.layoutObject.justification = "center";
textBox1.layoutObject.justification = "center";
}
}
----------------------------------------------------------
Section 9: Time ramping gameplay
----------------------------------------------------------
PERSON1--------------------
[Another popular engine] has Time.timescale which defaults to 1. Set it to 100 and the game runs 100 times faster.
Set to .01 and, you get the idea. I see Incisor has TimePlaybackController.time() but does Incisor have a way to control the global time scale?
PERSON2--------------------
Speed controls should be able to accomplish that.
PERSON3--------------------
Looks like nc.softwareSpeed might do the trick.
PERSON4--------------------
Both are good options for certain circumstances but they work a little differently.
TimePlaybackController is not what you want - it's an API for things that play pause etc.
It does have playbackRate, but that would just be for that thing.
----------------------------------------------------------
Section 10: Tagging Code that only Runs when in Editor Mode
----------------------------------------------------------
PERSON1--------------------
I have a question, I just thought of today.
In [another popular engine] code it's possible do do something like #if EDITOR and have code only run if in the editor or #if !EDITOR for code that only runs when not in the editor.
Is there something like this in Incisor?
PERSON2--------------------
Yeah, Incisor has this:
CODE.includeIf___published;
// this only runs in the published version
CODE.includeEnd___published;
CODE.includeIf___unpublished;
// this only runs in the un-published version (in the editor)
CODE.includeEnd___unpublished;
The “CODE” has all of the ‘pre-processor-style’ code manipulation tags on it .
----------------------------------------------------------
Section 11: Adding Constructs
----------------------------------------------------------
PERSON1--------------------
Would you mind giving me a piece of example code to make a scene containing an instance of a Construct?
PERSON2--------------------
This adds a construct to the main scene:
nc.constructDefs.[your construct name].add(nc.mainScene);
----------------------------------------------------------
Section 12: Changing the Order that FlowStateElements Happen In
----------------------------------------------------------
PERSON1--------------------
How can I change the order that my FlowStateElements happen dynamically after they have already been instantiated?
PERSON2--------------------
FlowStateElements are not reordered by manipulating an internal list, and there is no API such as FlowState.getElements() that lets you retrieve and sort them after creation.
The sequence in which FlowStateElements run is determined solely by each element’s netTime value, which is calculated from its time value plus any variable offset values.
To change the happening order dynamically, you modify the time values or the offset values that contribute to netTime.
Method 1: Modify the element time values directly.
To do this, you must save references to each FlowStateElement when you call addElement. Later, you can change their time property, which will automatically change their order of execution.
Example:
class MyFlowState extends FlowState {
constructor(controller) {
super(controller);
this.elemA = this.addElement(0.0, "stepA");
this.elemB = this.addElement(1.0, "stepB");
this.elemC = this.addElement(2.0, "stepC");
}
stepA() {}
stepB() {}
stepC() {}
}
//After instantiation elsewhere:
let state = nc.flows.GameFlowController.MyFlowState;
state.elemA.time = 3.0;
state.elemB.time = 0.5;
state.elemC.time = 1.5;
This changes the order because netTime recalculates automatically.
Method 2: Use variableOffsets for more organized control.
When calling addElement, you can pass one or more variable offset names.
These become numeric properties on the FlowState and can be changed later without touching the elements directly.
Example in constructor:
this.addElement(0.0, "stepA", [], "aOffset");
this.addElement(1.0, "stepB", [], "bOffset");
this.addElement(2.0, "stepC", [], "cOffset");
//Later:
state.aOffset = 0.5;
state.bOffset = 2.0;
state.cOffset = -1.0;
Since netTime is time plus offsets, operations like these dynamically reorder execution.
Summary:
FlowStateElement order cannot be changed by rearranging a list or calling something like getElements, because no such method exists.
To dynamically reorder events, store references when creating them and modify their time values, or define variableOffsets and adjust them later.
Changing netTime changes the order that FlowStateElements occur.
----------------------------------------------------------
Section 13: 9 Slice
----------------------------------------------------------
PERSON1--------------------
Does Incisor have a system for doing a 9 slice?
PERSON2--------------------
Yes. In Incisor it's called "GraphicExpander" and it's an add-on that can be activated on GraphicObjects (or anything that inherits from GraphicObject).
Other names people use for this type of feature are:
"9 Slice"
"9-Slice"
"9 Slice Patch"
"Nine Slice"
"Nine Patch"
----------------------------------------------------------
Section 14: Generating Sprite Sheets
----------------------------------------------------------
PERSON1--------------------
Does Incisor have the ability to make sprite sheets from png sequences?
PERSON2--------------------
Yes.
First, put all of the pngs in your sequence into a directory within the project's "Assets" directory.
Then, in the Incisor GUI, open an 'Assets' panel, find that folder, uncheck the 'inherit' button (otherwise the directories settings will just inherit the values of the containing directory), and enter a name in the 'spriteSheet' field.
This will automatically ensure that all of the pngs in the directory are automatically included into a single sprite sheet, without any changes to any of the code that uses those image assets.
You can see the configuration of image assets within the project from within the PublishingAnalysis panel; just select 'Current Configuration', and click on the 'Graphic Summary' button to see all of the Graphics in your project - their inclusion in sprite sheets will be evident from within this menu.
----------------------------------------------------------
Section 15: SpriteAnimation
----------------------------------------------------------
PERSON1--------------------
Can I play a png sequence in Incisor?
PERSON2--------------------
Yes, just ensure that the png sequence is included somewhere in the project's Assets directory, and that the image names end in a numeric sequence that makes the ordering clear.
Next, within your project, add a GraphicObject and configure it with a SpriteSetter (either in the GUI within a Construct, or by calling 'configureSpriteSetter' on the GraphicObject).
To configure the SpriteSetter, you'll need to provide a 'keyGraphicAsset' which can be any GraphicAsset within your enumerated png sequence - Incisor will automatically find the whole png sequence.
Once the SpriteSetter is configured, the "spriteSetter" member of the GraphicObject will no longer be undefined, and instead it will be a PlaybackController object that has all of the animation playback controls needed to play the sequence as an animation.
----------------------------------------------------------
Section 16: Button Clickable Area
----------------------------------------------------------
PERSON1--------------------
When I make a button from a graphic in my project, the clickable area is restricted to the opaque portions of the image - can I change that?
PERSON2--------------------
Yes. By default, images that are included in an Incisor project have a 'trimMode' setting of 'hugged'.
This is a really cool feature that automatically decreases the download size of your project and improves the runtime performance by reducing the amount of 'overdraw' of images.
The 'hugged' setting is telling Incisor to automatically change the geometry associated with images in their associated GraphicAssets to 'hug' the outline of the non-transparent areas of the image.
This hugging is what is causing your button to be only clickable within the opaque area.
To change this, open the 'Assets' panel and find the image file in question (the one that you used for your Button), then change the 'trimMode' setting to be 'none' or 'rectangular'.
... Save the project and reload to see the results.
Now the associated GraphicAsset will have rectangular geometry and the clickable area of that Button will be anywhere within that rectangle.
Incisor® Tutorial Scripts
Incisor® Tutorial Scripts
This document is part of the compiled knowledge base for the Incisor® Software Development Platform.
Any use of this content is subject to the INCISOR® end user license and terms of use agreement.
https://www.incisordev.com/eultua
2025.11.25.13.26.58
----------------------------------------------------------
TABLE OF CONTENTS:
----------------------------------------------------------
Section 1: Animation
Section 2: AppEvents
Section 3: CreatingConstructs
Section 4: CustomAddOnsAndCustomObjects
Section 5: Extensions
Section 6: Getting Started with JavaScript
Section 7: Getting Started with TypeScript
Section 8: GraphicExpander
Section 9: GraphicObjects
Section 10: GUI
Section 11: IntroToButtons
Section 12: IntroToPrecomps
Section 13: LiveView
Section 14: ObjectPanel
Section 15: ParticleSystemOverview
Section 16: ParticleSystems
Section 17: PivotPoints
Section 18: ResolutionScaling
Section 19: Shapify
Section 20: Showcase - ExampleGallery
Section 21: Showcase - ExampleGallery.sb-fae7be28-8wSMBa
Section 22: Showcase - ForkYourFood
Section 23: Showcase - Poker
Section 24: Sounds
Section 25: SpriteSetter
Section 26: Swoopers
Section 27: TextAssemblies
Section 28: Timelines
Section 29: Trimming
Section 30: UnitsPerPixel
Section 31: WaitThens
----------------------------------------------------------
Section 1: Animation
----------------------------------------------------------
Animation
In this tutorial, we’ll be looking at some of the basics of animating with Incisor.
We’ll be working with the Incisorsaurus character, which you can find in the Example Gallery on incisordev.com.
Head over to incisordev.com, go to the Downloads section, and scroll down to the Example Gallery. Download the Incisor Red Example Gallery. Since we won’t be covering any code in this tutorial, either version will work.
Open Incisor, select Open Project, and navigate to the IncisorExampleGallery folder you just downloaded.
For this tutorial, we’ll focus on the Incisorsaurus animations in Example 6: Construct with Timelines.
As you can see, there are four animations: Walk, Run, Growl, and Idle.
We’ll be covering how to set up your art for animation, and how to create some basic animations in the timeline.
When animating, we will be using the Hierarchy, Object, Construct, and Timeline panels. Feel free to arrange your workspace however you prefer.
Go to the Construct panel and select the Incisorsaurus construct.
Constructs are collection of different types of SceneObjects that can be built, arranged, and animated from within the Incisor GUI. For more details, check out our tutorial on Constructs (link below).
When you open the Construct, you’ll see Incisorsaurus in the Neutral State. The Neutral State is where you set up your SceneObjects for animation, such as parenting, adding effect nodes, and changing pivot points, and more. If you ever need to make changes to the basic structure of your Construct, you need to be in the Neutral State.
The Timeline pulldown menu is where you set up new Timelines, navigate between timelines and the Neutral State, and also access the Mange Timelines popup menu.
If you hold the space bar you can drag or scroll in the Contruct panel to move or zoom the view.
When you select an object in the Construct panel, that selection appears in the Hierarchy panel, and more detailed information shows up in the Object panel. For example, here I’ve selected the tip of Incisorsaurus’ tail (Incisorsaurus_0031_Tail3). In the Hierarchy panel, you can see it’s a child of Tail2, which is a child of Tail1, which is a child of Body.
In the Object panel, you can see its position, scale, and rotation values—and notice that the pivot point has been adjusted so the tail rotates from the correct spot.
Let’s build this from scratch so you can see how everything is set up.
In the Construct panel, select New Construct and name it IncisorsaurusNEW. Press Command+S (or Ctrl+S) to save.
If you open the Assets folder in the Incisor project, you’ll see a folder called IncisorsaurusAnim, which contains PNGs for all of the pieces of Incisorsaurus. Incisor automatically generates .ncdata files for each PNG. You’ll also see your new IncisorsaurusNEW construct file. You can move these files around for organizational purposes, but make sure they stay within the Assets folder.
Now let’s go back to Incisor.
In the Hierarchy panel, we’ll bring in the PNGs as a graphic stack. The artwork was created in Photoshop, and the layers were exported as numbered PNGs, so Incisor knows the order in which to stack them.
Right-click on IncisorsaurusNEW in the Hierarchy and select Add Graphic Stack.
Navigate to the folder with your PNG files. You can see there are settings to control the Z range, the sublayer range, and whether to add graphics to a new SceneObject. There’s also a checkbox to flip front and back layers.
The Z range is the distance between your layers on the Z axis. This is useful for creating parallax in your animations.
The SubLayer range is the distribution between -1 and 1 of the layers render order
Adding graphics to a new SceneObject creates a SceneObject parent for your graphic stack. This allows you to animate the entire stack inside of a single SceneObject.
Since the PNGs were numbered in the desired order from Photoshop, we don’t need to flip the front and back. All the other default values here are also fine for this example.
Click Add Graphic Stack, and now you’ll see Incisorsaurus in the Construct panel, with the PNGs listed as GraphicObjects in the Hierarchy. Since we added them to a SceneObject, they’re grouped under Added Graphic Stack. You can rename any of the SceneObjects or GraphicObjects however you like in the Object panel.
Next, we’ll adjust pivot points so each object rotates correctly. For example, right now if we rotate Tail1, it spins from the center instead of where it connects to the body. To fix this, select the object in the Construct panel, hold Option/Alt, and drag the gizmo to the correct pivot location. The gizmo will turn blue, and in the Object panel you’ll see new pivot point parameters you can fine-tune numerically. Note that changing the pivot point in this manner only changes it for this instance in the project. If you want to change the pivot point for all instances of the asset in the project, you can change it in the Assets panel.
Now let’s create parent/child relationships. For example, fingers should be children of forearms, which are children of upper arms, which are children of the body, and so on. To do this, drag one GraphicObject on top of another to make it a child. Since we already adjusted pivot points, it is important that you hold Alt while dragging to create children “in place.” If you don’t do this, you will see objects shift out of place like this. If this happens, just hit undo and try again.
We don’t need the background PNG in our animation, so we can delete it from the Hierarchy. You can always re-import it later.
You’ll also notice there’s only one set of eyelids in our stack. We can duplicate these in the Hierarchy, then position and scale them over the other eye. In the Object panel, move the eyelid sublayers so they appear in front of the pupils. Since we don’t want them always visible, uncheck Visible in the Object panel. (Alternatively, you can hide them by scaling to zero, setting opacity to zero, or unchecking Enabled, which is more performance-friendly.)
Now that our setup is ready, let’s start animating!
In the Construct panel, go to Timeline → New Timeline and name it Walk.
In the Timeline panel (top left), you’ll see playback controls: Play, Stop, and Loop. You can also use the spacebar to play/pause. Stop resets the playhead to the beginning of the timeline, while Pause holds it in place. By default, playback is looped, but you can disable that by clicking the Loop button. The playback rate is set to 1, meaning real-time playback. You can use this to speed up or slow down your playback, but we will leave it at 1. Let’s set the walk animation to 4 seconds. As you can see, the timeline length updates accordingly.
You can move around the timeline by clicking and dragging at in the header bar And just like in the Construct panel, when you hold down the spacebar, you can move and zoom into the timeline.
Let’s start animating the legs. In the list of your objects in the timeline, hold Shift and select the shorts, lower legs, and sneakers. Right-click and choose Animate SceneObjects → Rotation → Z. Set the initial keyframes by clicking the Set Keyframe button. Now, when you move the playhead and change rotation, new keyframes will be created automatically.
I’ve gone ahead and added rotation keyframes for the legs, making sure to copy the first keyframes to the end so the animation loops smoothly.
Continue to add keyframes for all the objects that you want animated until you have a complete looping walk cycle.
As you can see, our character is walking—but it looks a little stiff. This is where the Graph Editor comes in. Right now, all the keyframes are linear, which makes the motion robotic. If you right-click a keyframe, you can apply easing to smooth out the movement. Adjust the handles until the walk feels more natural.
If you’ve applied effect nodes to your SceneObjects, you can also animate those in your timeline. We will dive deeper into effect nodes in a future tutorial.
You can create more timelines and manage them in the Construct panel.
And that’s it!
Be sure to check out incisordev.com for more tutorials, and feel free to leave questions and feedback on Stack Overflow or our subreddit.
Have fun creating with Incisor!
----------------------------------------------------------
Section 2: AppEvents
----------------------------------------------------------
Hello, and welcome to this AppEvents tutorial for Incisor. In this tutorial, we will cover:
- What an AppEvent is, and the main functionality of AppEvents
- How to create an AppEvent
- Some creative applications of AppEvents
- A brief look at Incisor’s built-in AppEvents
An AppEvent is a type of object that can execute a callback function when triggered by a
given type of event. There are two main types of AppEvents in Incisor— AppEvents for
automatically recurring events that essentially act as “listeners”, and AppEvents that are
triggered by specific user-input. In this tutorial we’ll start with the “keyDown” AppEvent,
that responds to user input from the keyboard, and then play with the “fixedUpdate”
AppEvent that recurs every frame the application is running.
To get started, let’s open a blank Incisor project. We can leave the sample text in for
now, just set the string to blank. The first thing I’ll do is define a new appEvent. Let’s set
the variable “myAppEvent” equal to nc.appEvents.keyDown. Keydown will trigger a
callback whenever a key on the keyboard is pressed down. Now that we’ve defined our
AppEvent, we’ll use the addCallback function to specify what we want to execute when
the AppEvent is triggered. Simply pass the callback owner object, and the name of the
callback as a string. Now let’s write our callback function. The Keydown AppEvent takes
the key as an argument, so we’ll need to pass an arguments parameter into the function.
I’ll set the string of the sample text to whatever key is being pressed down at the time,
and save our code. Now we can see the text changing accordingly in real time. Let’s
have our function look at a specific key now. I’ll make it so that if “w” is pressed, the text
box position moves up.
You can see that holding down the “w” key causes the text to move constantly, but the
movement is choppy. This is because the callback is only being triggered whenever it
receives a message that the key is down.
To achieve a smooth movement, we’ll need to use an AppEvent that is triggered much
more frequently. The “fixedUpdate” AppEvent is triggered every frame the application is
running, which in Incisor is a default of 60 frames per second. Let’s create another
AppEvent using fixedUpdate, and add a callback to it. We’ll have our callback function
look at the “keyDownStates” parameter that is built into Incisor. This is a parameter that
is set to “true” whenever the given key is in a “down” state. I’ll put the same position
change as before into this function instead. Now we can see that holding the “w” key
down results in a much smother movement across the canvas. Let’s take this one step
further and have our callback respond to the “a”, “s”, and “d” keys as well. Let’s also
replace our textAssembly with a graphicObject. For more information on graphicObjects,
check out our graphicObjects tutorial. By setting our position changes accordingly, we
now have a character that can move in four directions across the canvas.
Now, click the Incisor Icon in the top left corner and choose “Incisor Documentation.” If
we click on AppEvents, we can see a list of built-in events and their functionality. We
won’t be going over all of these AppEvents in this overview, but feel free to ask any
Questions you have via stackoverflow and our subreddit.
----------------------------------------------------------
Section 3: CreatingConstructs
----------------------------------------------------------
Hello and welcome to this tutorial on creating and using Incisor Constructs.
In this tutorial we will cover the following topics:
What a Construct is, how to create a Construct, and how to use a Construct in your project.
Before diving in, make sure you've watched either the Getting Started with JavaScript or Getting Started with TypeScript tutorials.
All the code examples in this session will be written in JavaScript
At its core, an Incisor Construct is simply a collection of objects that you can instantiate and manipulate in your project.
Think of it as a reusable component made up of various elements.
Constructs can be created either through the GUI or directly in code.
In this tutorial, we will walk through creating a Construct using the GUI.
First, make sure you've set up your project and imported the necessary assets.
Next, we'll begin by adding a Construct panel to the GUI.
This panel will allow us to view and edit our Construct.
We will also be working with the Hierarchy and Object panels to organize everything.
To create a new Construct, click the select dropdown in the Construct panel and choose New Construct.
For this example, let's name our new Construct "Card."
Now you'll see the card Construct is selected across all three panels. The Construct panel, Hierarchy panel and Object panel.
To start building the card, we will need to add objects to it.
There are two ways to do this.
Click the plus icon in the upper left corner of the hierarchy panel, or right click on the object you want to add to.
Let's go with the second option.
Right click on the card in the Hierarchy panel and select Add Graphic Object.
Next, let's rename the object to "Background" and assign the background graphic asset.
Now, we'll add another graphic object to represent the suit of our card.
Right click again, choose Add Graphic Object, rename this one to "Suit", and assign the heart's graphic asset.
Finally, we need a text box to display the card's rank.
Right click once more, choose Add Text box.
We'll rename it to "Rank." Position it properly.
Change its color to match the suit, and set the text to A for ace.
Once you're happy with the layout, go ahead and click save in the project menu.
Now you'll have a card Construct file saved in your asset folder.
This file can easily be moved or added to other projects.
Just remember, if you're importing this Construct into another project, all the assets used in it must also exist in the new project, like graphics and fonts.
To use the card Construct in your code, call nc.constructDefs.Card.add
Don't forget to specify the parent object and the name for your new instance.
Save the code and you'll see your new card appear in the live view.
Let's take things a step further and deal an entire hand of cards.
This is how we'll do it.
First, create three arrays, one for the cards, one for the suits, and one for the ranks.
Use a loop to instantiate and position the cards on screen.
Next, randomly assign a rank and suit to each card.
Change the color of the card based on the suit.
Red for hearts and diamonds. Black for clubs and spades.
Once you've written the code, save the project and watch as your cards are dealt.
You might even get a winning hand.
And that's it for this introduction to Incisor Constructs.
You've learned how to create and use Constructs in your project, and even how to deal a hand of cards programmatically.
Remember, Constructs are a powerful way to organize and reuse objects in your project, making development faster and more efficient.
Check the link in the description for more tutorials, and feel free to leave questions and feedback on StackOverflow and our subreddit.
Have fun creating with Incisor
----------------------------------------------------------
Section 4: CustomAddOnsAndCustomObjects
----------------------------------------------------------
CUSTOM ADDONS CUSTOM OBJECTS TUTORIAL
- Welcome to this Incisor CustomAddOns and CustomObjects tutorial.
- CustomAddOns and CustomObjects are ways to create custom functionality that can be used in the Incisor Graphical User Interface.
- For example, a developer can create a CustomAddOn to define special properties and behaviors that can then be added to objects in the GUI within the Construct panel, and those properties can be manipulated and even animated from with the Timeline panel.
- We'll begin this Tutorial in a blank new project.
- The best way to get started with CustomAddOns and CustomObjects in Incisor is by looking at the examples provided in the Incisor Template Library.
- You'll see there are options for both CustomAddOns, and CustomObjects. These are two different ways to make custom functionality for objects available within the GUI; CustomAddOns are more modular bits of functionality that can be dropped or 'added-on' to existing objects, and CustomObjects serve as a way to define entirely custom objects.
- In this tutorial we'll look closely at CustomAddOns, but as we'll see, working with CustomObjects is very similar.
- Let's start by adding a CustomAddOn from the Template Library.
- CustomAddOns can be created to add custom functionality to specific types of existing objects and you can see all of the associated options from within the TemplateLibrary menu.
- To make a CustomAddOn that can be added to any kind of object, we can choose a CustomAddOn_SceneObject since all hierarchy objects inherit from SceneObject.
- For now we'll create a "Chase Cursor" CustomAddOn.
- By selecting this option, Incisor will automatically generate the new code asset file where the functionality for this CustomAddOn is defined, so we'll need to choose a name for the CustomAddOn and the associated file - let's call it 'CursorChaser'.
- Now we can see that our new codeAsset file as been added and the "Project Updated" button has appeared in the upper right corner of the Incisor GUI.
- It's important to note that if you are using typescript, you'll need to recompile the typescript at this time to ensure that the new code asset is compiled and registered with the GUI.
- Now that our Cursor Chaser CustomAddOn is included in our project, we'll see a CustomAddOns menu in the Object panel whenever a SceneObject is selected - this menu will enable us to add the CursorChaser functionality to any object we want to have chase the cursor.
- Watch as we add the ChaseCursor CustomAddOn to the sample text included in a the new project.
- We have to toggle the inspector mode off within the LiveView panel to ensure that the target project is getting normal cursor input.
- You can see that the CursorChaser functionality makes the object it's added to follow the Cursor.
- Since we've added the CustomAddOn in the LiveView, its effect is only temporary and will be lost when the project is reloaded.
- To add the ChaseCursor functionality permanently we can either add in code, or add it within a Cunstruct in the Incisor GUI.
- To add a customAddOn in code, we can simply declare a new instance, providing the target object as the parameter.
- Next we'll cover how to use CustomAddOns within a Construct.
- To make this example a little more fun we can add some Assets to our project and create a SpaceGame Construct.
- We'll add image assets to our project including a StarryBackground, a PlayerShip and an AlienShip.
- Next we'll create a new SpaceGame Construct and add those images, being sure to set the sublayer values of each GraphicObject so that everything is visible.
- Next we'll change the code in the ProjectMain.js file to remove the sample text assembly from the project and instead we'll have the code add our new Construct to the MainScene using the nc.constructDefs.SpaceGame.add function.
- We'll also add a line to put the main Camera into the 'maximizeSafeZone' mode, which will ensure that our construct will always be visible within the window.
- Upon saving and refreshing the project now we can see our new SpaceGame construct in the LiveView.
- Now we can make the PlayerShip follow the cursor by adding the 'CursorChaser' CustomAddOn.
- Save and reload the project to see our work in action.
- You can see that our ship follows the cursor, but appears to be moving backwards.
- Notice that when we add CursorChaser to this GraphicObject a new section appears in the Object panel and that our CursorChaser add-on comes with a couple of properties we can manipulate.
- One of the ChaseCursor properties allows us to change the rotationOffset for the item chasing the cursor, so we can use that to adjust the ship's angle accordingly.
- If we want to make the PlayerShip keep up closely with the cursor, we can crank up the 'chaseSpeed' property to achieve that goal.
- If we make this adjustment within the SpaceGame Construct, the newly adjusted property values will also be saved in the construct file.
- Now let's give our alien ships the ability to chase the player ship - but to ensure that our new game isn't too difficult we can make the aliens a bit slower.
- To do so, we can add the CursorChaser CustomAddOn to the AlienShip GraphicObjects and adjust the 'chaseSpeed' and 'rotationOffset' property accordningly.
- Now let's save and refresh the project to play our new game!
- To make our game a little more interesting, we might want to make one alien ship slower than the other.
- Now let's look at the code behind the CursorChaser CustomAddOn, and see how we might be able to modify it.
- The code for creating CustomAddOns is basically done in two parts; the definition of the class, and the 'runBeforeInit' section of the code, in which the new CustomAddOn class is registered with the Incisor GUI.
- Since the CursorChaser example is meant to be functionality that can be added to any SceneObject, our class extends the CustomAddOn_SceneObject class.
- By extending the CustomAddOn_SceneObject class this entire class will automatically have access to an 'owner' property, which represents the given SceneObject that owns the instance of this particular CustomAddOn.
- In the class constructor, the chaseSpeed and rotationOffset properties are defined, and a callback for the fixedUpdate appEvent is added that will happen during every frame of gameplay - this is where all of the math is done to point and move the owning object towards the Cursor.
- There is also an 'enableStateChange' callback added, which ensures that the 'fixedUpdate' callback is removed if the owning object is disabled.
- The fixedUpdate function first ensures that a local reference to the pertinent camera is connected, and then does the calculation for the change to the rotation and position of the owning object.
- You can see that after the calculation is made, the fixedUpdate sets the rotation of the owning object, as well as the position, which is done using a 'swoopGlobalPosition' call, since this calculation is done according to global coordinates.
- Once the class for the CustomAddOn is defined, it is registered with the Incisor GUI. This is done within the 'runBeforeInit' section below using the nc.registerCustomAddOn function, which takes the class definition as its parameter.
- Below that the 'registerCustomAddOnProperty' function is used to expose the 'chaseSpeed' and 'rotationOffset' properties within the GUI and to make their values savable within a construct and animatable within Timelines.
- As you can see the 'registerCustomAddOnProperty' function returns a RegisteredProperty object that can be further manipulated to adjust things like value validation and the sensitivity of dragging the associated supervisor within the Incisor GUI.
- Now let's customize this functionality further by creating bounds for our Alien enemies.
- We can start by adding a new "horizontalBound" property in the CursorChaser constructor.
- Now we can use that property in the fixedUpdate function to limit the x position of any cursor-chasing item with a couple of simple if statements.
- We will also register the horizontalBound property the same way the other properties are registered below.
- Now, if we save go back to our SpaceGame Construct, we can adjust the horizontalBound values on the AlienShips to enable our PlayerShip to have safe zones on either side of the game area.
- We can also add a transparent box to help mark these bounds with a visual aid.
- We'll do more with this in a moment.
- Now to demonstrate how we can animate registered properties of CustomAddOns, we'll add a new timeline to our SpaceGame Construct, and call it 'ChangingSafeZones'.
- In this new timeline, we can animate the horizontalBound values for the CustomAddOns on our alien ships.
- When we right click on the AlienShip objects in the Timeline panel, we can see that the additional options for the CursorChaser CustomAddOn are available.
- Adding keyframes to expand and contract the horizontalBound value will effectively allow us to change the size of the safe zones from within a the Timeline.
- While we're at it, we can animate the scale of the transparent box to match our new changing bounds.
- We can ensure that this timeline automatically plays by checking the 'autoplayWhenInConstruct' box, and by changing it to be the default Timeline for the SpaceGame Construct.
- Now let's investigate what we've built.
- Enabling this kind of custom functionality to be editable in from within the Incisor GUI be a powerful tool when it comes to tightening the iterative design loop and creating better ways for designers, artists, and animators to work together with coders.
- This SpaceGame is a great example of how we can use and modify the CustomAddOn examples provided in Incisor's Template Library.
- As you can see there are many examples and even blank templates for building CustomAddOns from scratch.
- Comprehensive templates are also provided with lots of blank functionality if you want to take the approach of starting with everything and then removing unneeded functionality.
- You can access lots of examples of CustomObjects from within the Template Library.
- The primary differences between CustomAddOns and CustomObjects are that with CustomAddOns, you define custom functionality to add on to objects, and with CustomObjects you are defining entirely custom objects.
- So for CustomObjects, this means that instead of extending CustomAddOn classes, you're just extending normal hierarchy objects such as SceneObjects, GraphicObjects.
- Other than those differences CustomObjects are built in a similar fashion to CustomAddOns; by defining classes and registering those classes and their properties with the GUI.
- To quickly show an example use of a CustomObject, let's add the ClockExample CustomObject from the TemplateLibrary - we can call it "Clock".
- Once the new code asset file has been included in the project, we can right-click on objects in the Hierarchy panel or LiveView panel, and we'll see the option for adding our new Clock CustomObject.
- The clock example is straight-forward, defining a customized TextBox that automatically shows the time, with boolean option for whether or not to show seconds.
- Just like with CustomAddOns, CustomObjects and their registered property values are savable when added to within Constructs.
- Let's save and reload to try our final product.
- We now have a game where the player controls their ship with alien ships in pursuit. And now that we've added a clock, we know our players will never lose track of time.
- That's all for this Incisor CustomAddOns and CustomObjects tutorial.
- You can also see a practical example of CustomObjects in use in the Incisor Slot Template, which defines a "Symbol" CustomObject used by reels in the slot game.
- To download the Incisor slot template incisordev.com/downloads.
- You can stay tuned for an upcoming tutorial covering the Incisor Slot Template by subscribing to the Incisor YouTube channel.
- And if you have any questions feel free to ask them on stack overflow or on the Incisor sub-reddit.
- Have fun creating with Incisor.
----------------------------------------------------------
Section 5: Extensions
----------------------------------------------------------
INCISOR EXTENSIONS TUTORIAL
In this tutorial we'll cover What Incisor Extensions are, How to Build Extensions, and Basic examples of Extensions use cases.Along with it's rich library for creating interactive user experiences, Incisor also offers a powerful set of tools for streamlining and optimizing the production process. (incisor intro screen)
Incisor Extensions let you write scripts for the Incisor Inspector and environment, making it easy to integrate custom workflow tools directly into Incisor. Since the Inspector is built using the same core Incisor API, creating custom tools, works seamlessly with the same reliable API you use for standard projects.(video 1)
To get started with Extensions, click on the Template Library Tab and select Project Extensions from the dropdown menu. From here you can see our list of available Extension Examples. They are designed to walk you through various implementations of Incisor Extensions including, CustomMenus, CustomPanels, FileIO, PopUps, ProgressBars, Project Connection Actions, Publishing Actions and Various UiComponents. It's recommended to check these out after the video.(video 2)
Two easy methods of adding custom workflow tools to your project is by adding custom Menus and adding custom Panels. Menus are our purely functional option with all visuals being preset for you by Incisor. The other option is Panels, which can be customized both functionally and visually including the ability to add buttons, search bars, dropdowns, collapsible menus and much more.(video 3)
You can quickly get started with your custom menu by going to the project Extensions in the template library and choosing add custom menu. This will immediately set you up with a working menu with a popup alert. You would then just add your functionality to this.You can also add a custom panel quickly with the template add custom panel. You can then add whatever additional functionality and visuals you may want to this panel.It’s important to note that while Incisor extensions are compatible with both TypeScript and JavaScript projects, extensions are exclusively written with/in/using JavaScript. (video 4)
To take a more in depth look at Incisor extensions, in this tutorial we will be building extensions from scratch. Given this, we're going to select the ‘Add Blank Template’ option. Incisor will then prompt you to name your new Extension in the Popup's TextField. After selecting OK you will notice a new js file appear under ProjectExtensions in your project's Utilities directory.
Opening this file you can see Incisor has already laid out for you, our standard 2 part systems to Extensions. There's the Main Definition section where you will put your class definitions at the top of the file, and at the bottom of the file will be your Run Before Init section. This section is marked by the CODE tags runBeforeInit_begin and runBeforeInit_end. This is where you will put your runtime commands.(video 5)
We'll Start with Menus. Creating a new Menu with Incisor requires a new class to hold our Menu Item's functionality. In this example I want my new Menu Item to take screenshots of my project so I'm going to name it SaveScreenshots. Then moving to our runBeforeInit section, we're going to create an instance of our new class and create our two Menu Items one a standard Menu Item, the other a Sub-Menu Item. This is done with the addInspectorMenuItem function. This function takes the parameters, Location, object owning our callback function, and of course the name of our actual callback we want to call when the Menu Item is selected. You'll notice our location parameter is an array. This allows you to put your Menu Item at whatever depth (in the Incisor menu) you choose. Each string is the Menu and proceeding Sub-Menus you want your Menu Item to be in, with the last string being the one actually calling your callback. If the Menu or Sub-Menu you listed doesn't exist Incisor will automatically add them for you.(video 6)
Going back to our class lets actually implement the 2 function callbacks for our Items. The first is going to be our standard Menu Item that will take a screenshot of our Inspector. We'll set our destination for the screenshot and create the corresponding directory if it doesn't already exist. We'll take our screenshot using saveInspectorScreenshot and then use an alert to inform our user that the action has been completed. Next for our Sub-Menu callback we'll do a similar thing, however for capturing our screenshot I'll actually show you two methods we could use. If you've noticed we've been using nce throughout this script instead of the usual nc. This is because, while nc is our primary accessor for Incisor, Incisors Extensions instead uses the accessor nce. Nce stands for incisor extensions and while it does share a lot of the functionality as NC Keep in mind nce runs in its own context within the inspector so it doesn't behave exactly the same as NC. If there is something you need to access from the Incisor project itself you have to use nce.projectNC. You can see us using nce's method for screenshot capture here with nce.saveProjectScreenShot and just below that the same thing is done but with with what would've been nc.saveScreenshot now as nce.projectNC.saveScreenshot.In this example you can also see that we’ve used the async and await keywords. Because Incisor extensions incorporate functionality that interacts with external processes, using the ‘await’ tag can be necessary to help ensure that the given commands have completed before the subsequent javascript actions. If you use an Incisor extensions function that is itself marked as asynchronous, it is generally a good idea to mark the function you are using it in as ‘async’ and to use the ‘await’ keyword when calling it. (video 7)
Now lets check out our new Menu Items! you can see how Incisor treats Menus and Sub-Menus and when we select one you'll see how alerts appear to the user. Thanks to the alert we know our screenshots are in the screenshots directory.(video 8)
Next we'll create our own custom Incisor Inspector Panel. Our first step will be creating a new class that extends the InspectorPanel class. Be sure to include a constructor that calls the superclass constructor, which in this case takes the name of the new custom Panel. InspectorPanel is a class that extends SceneObject and provides the basic elements for an Inspector Panel. Inspector Panels include all the members needed to define Borders, Menu Bar features, and standard Panel functionality.Panels have 2 main customizable sections, the headerScrollingPanel section and bodyScrollingPanel. These contain LayoutStacks that will define where the content for the custom panel is placed.(Video 9)
In our sample you can see we kept our headerScrollingPanel simple with only a UiText being added to its body Stack. Meanwhile there are several built in GUI items placed within the bodyScrollingPanel. Some of the items placed in the body of the example Inspector Panel include UiText, UiCollapsibleStack, UiDropDown menu, UiButtons, including LinkButtons and GraphicButtons and finally Popups including the preset YesNoQueryPopup and the TextQueryPopup. Each item in the bodyScrollingPanel is connected to functionality defined within the Inspector Panel class.(video 10 most likely to need redone cause of the end)
Before going more in depth with our functionality lets add our custom Panel to the Incisor GUI by going back to our runBeforeInit Section and using registerInspectorPanelDefinition. This makes it available for users to select from the Panel type dropdown.(video 11)
Now let’s take a closer look at how our Panel functions, focusing first on the UiCollapsibleStack and how it uses runtime project analysis to dynamically populate its contents.
We’ve added a triggerCallback to the stack so that whenever a user expands it, our function grabObjects is executed. Inside this function, we begin by clearing the stack to ensure a clean slate before adding new scene objects. Next, we retrieve all scene objects from the main scene by calling nce.projectNC.mainScene.getDescendants(). You'll notice we're using the projectNC reference again. By referencing projectNC, we ensure we’re accessing the project’s descendants rather than those of the Inspector. Once we’ve gathered the scene objects, we iterate through them, creating a new UiText element for each object using its name. Each new UiText is then added to the bodyStack of our UiCollapsibleStack. Now that we’re done coding our collapsible stack’s functionality, let's check it out in real time. You’ll see that I can close and open our collapsible stack, and every time I open it I can see the objects in my hierarchy reflected in the bodystack of the collapsible stack. Next, let’s examine the Dropdown Menu, which also interacts directly with the scene. The dropdown's callback makeNewObject allows users to create new SceneObjects based on their selection, and automatically updates the collapsible stack to reflect these changes.User input is captured through the UiMenuItem parameter, and a switch statement handles each menuItem option, enabling specialized functionality for our menu options. “Show here the menu opening and making the new object” This example allows us to create different kinds of sceneObjects based on user input. “If we test our dropdown menu you can see the new object of our choice pop up both in our hierarchy and the live view.” When creating a new SceneObject, we again use nce.projectNC to access the proper GraphicAsset and the proper parent for the object, the mainScene. After creating the new SceneObject, we generate a corresponding UiText element with the same name and add it to the collapsible stack.(Video 12 also a little off at the end)
Now, let’s look at our first button, objectsToFileButton, and the functionality it provides with FileIO extensions. In this example, we’re exporting all scene objects to a text file.
We begin by defining a destination path for the output file, then use nce.fileIO.createDirectory() to create the directory if it doesn’t already exist.We again retrieve the scene’s descendants, but this time, instead of adding elements to a UI component, we concatenate each object’s name into a single text string with a newline. Once complete, we create the file, if it doesn’t already exist, and write the concatenated text to the file using nce.fileIO.writeTextFile(). Now let's test out our FileIO button. When we click on the button we can see a file generated in the top left corner, and if we open it we’ll see a list of objects that matches what's in our hierarchy. (video 13)
Custom inspector visuals, fileIO, and project access enable you to build many time-saving tools for specific project needs, but extensions provide other avenues for creating productivity tools as well. Commands can be invoked when the Inspector connects to or disconnects from a project. Using nce.addProjectConnectionCallback and nce.addProjectDisconnectionCallback. Functions can also be triggered right before or after a project is published, making publishing procedures fully automatable. Simply use nce.addPrePublishCallback and postPublishCallback. In our example, we implemented a postPublishCallback that compresses the screenshots and text files generated earlier. The functionality for this callback also resides in our Panel class. The function first sets the location of both of our files and checks if the directories to be zipped do indeed exist along with checking if the zip files already exist. If the files exist and we haven't already zipped them, it will compress our files using nce.fileIO.compress(); Incisor extensions can also be used to run external commands via the nce.runBash, and nce.runCmd functions. If we take a look at our zipfiles function again, at the very end we have a runCmd(dir) response being printed to an alert so the user can see that the files have been zipped. Project Extensions create functionality specific to a given project. If you want to apply the same functionality to all Incisor projects, simply place the Extension scripts in the globalExtensionsDirectory inside the Incisor application support folder. This folder can be found either in the user directory, or it can be accessed from within the incisor menu by clicking on the little Incisor Logo in the top left corner and selecting open application support directory.(video 14)
This concludes our tutorial on Extensions within Incisor. If you’d like to explore this example more you can find it in the projectExtensions folder in the incisor example gallery. Check the link in the description to download this example and for more tutorials, and feel free to leave questions and feedback on stack overflow and our subreddit. Enjoy creating with Incisor!(incisor outro)
----------------------------------------------------------
Section 6: Getting Started with JavaScript
----------------------------------------------------------
Incisor is a software development platform that is finely tuned for creating extremely light apps and games that will run on any browser.
In this tutorial, we will cover getting started with Incisor using the Javascript coding language.
If you'd like to use TypeScript, follow the link in the description to the Getting Started with Typescript video tutorial.
Before you get started, you'll need to choose a code editor. In this tutorial, we'll be using Visual Studio Code, which is a great free editor and can be downloaded from the VS code download page.
Next, we'll need to download the latest version of Incisor, which can be found in the Incisor download page.
Once downloaded, open the zip file and click the app to open Incisor.
Next, you'll need to enter some information and an email address to create an Incisor account.
You'll need to confirm your email account before you can get started. Now you'll be prompted to open a project, but we will choose to make a new project instead.
When opening a brand new project, it will take a few seconds for Incisor to process the included sample assets.
Once loaded, you'll see the sample project up and running in the live view in the Incisor GUI. Now let's look at the new project directory that was created. You can see a few items in the directory, including a project code folder, which is where the code for the project lives, and an assets folder, which is where assets for the project can be placed.
Let’s open this project in our code editor.
Within our code editor we want to navigate to project Main.js. That's where we can see the basic sample code running our new project. As you can see, the existing code is very simple. It adds a text assembly object which uses the sample font included in the assets directory. Let's make a change to the text that appears on the main screen.
Notice that when we save the file, the live view is automatically reloaded.
Now let's make the text bounce up and down. As you can see, autocomplete options are built into Incisor. Dotting your way around the API is one of the easiest ways to familiarize yourself with Incisor’s broad functionality.
You can also access documentation for the entire API in the Incisor menu in the left corner.
Now let's add an asset of our own. To include a new image in our project, all we'll need to do is drag the PNG file into the assets folder. Now we can use that new asset in our project. For example, we can add a graphic object to our scene using this new asset.
Notice our graphic is now accessible from within VS code when we start typing.
To view the final product, we'll need to publish it, which can be done through the project menu. New projects come included with a dev mode configuration for publishing, but more configurations can be added in the project settings.
Let's publish. Click the new URL in the pop up window and we can now see the final published product in action.
Looking back in our project directory, we can see that Incisor has added a publishing folder and put the newly published and timestamped website under its own directory.
This concludes our Getting Started with Incisor JavaScript tutorial.
Check the link in the description for more tutorials, and feel free to leave questions and feedback on StackOverflow and our subreddit.
Enjoy creating with Incisor.
----------------------------------------------------------
Section 7: Getting Started with TypeScript
----------------------------------------------------------
Incisor is a software development platform that is finely tuned for creating extremely light apps and games that will run on any browser.
In this tutorial, we will be going over some basics for getting started with Incisor using the Typescript coding language.
If you'd like to use JavaScript, follow the link in the description to the Getting Started with JavaScript video tutorial.
Before you get started, you'll need to choose a code editor. In this tutorial, we'll be using Visual Studio Code, which is a great free editor and can be downloaded from the VS code download page.
Next, we'll need to download the latest version of Incisor, which can be found in the Incisor download page.
Once downloaded, open the zip file and click the app to open Incisor.
Next, you'll need to enter some information and an email address to create an Incisor account.
You'll need to confirm your email account before you can get started. Now you'll be prompted to open a project, but we will choose to make a new project instead.
Since we are developing the TypeScript, be sure to check the use TypeScript checkbox.
When opening a brand new project. It will take a few seconds for Incisor to process the included sample assets.
Once loaded, you'll see the sample project up and running in the live view in the Incisor GUI. Now let's have a look at the new project directory that was created. You can see a few items in the directory, including a TypeScript project code folder, which is where the TypeScript code for the project lives, a project code folder, which is where the generated JavaScript code is distributed to, and an assets folder, which is where the assets for the project can be placed.
Let's open this project in our code editor.
Within our code editor, we want to navigate to the TypeScript project code directory and open the project main.ts file. That's where we can see the basic sample code running in our new project. As you can see, the existing code is very simple. It adds a text assembly object which uses the sample font included in the assets directory.
Let's make a change to the text that appears in the main screen. If you've developed with Incisor using JavaScript, you know that saving your code will automatically update Live View. However, with TypeScript, there are some additional steps required. After you saved your TypeScript code. It must then be compiled into JavaScript and distributed into the project code: TypeScript generated js directory.
We first must make sure TypeScript is available to us within our project. We will use the node package manager or npm to do this. Execute the following npm install command. NPM install TypeScript. Dash dash. Save dev. Next we will execute npm run build. This will execute a prebuilt script to remove all of the previously generated TypeScript from your last build.
It will then compile your TypeScript into JavaScript and distribute it as JavaScript into the project code. TypeScript generated JS directory. Notice that after completing npm run build, the live view is automatically reloaded. To avoid needing multiple steps before a live view update. We can use a simple macro. There are a number of powerful free macro extensions for VS code, but most editors will have the ability to add macros and bind them to a single key.
For this example, I will create a VS code task and bind it to the F5 function key. First in the top menu I will select Code Settings Tasks. Here you can see in the task dot Json file that I've added two tasks: save and compile and save all files. Save all files saves everything. Save and compile depends on save all files, then it runs our npm build command.
Next I will go back to the top menu and select: code > Settings > Keyboard shortcuts. In the top right click the file icon to open Keybindings dot Json. Here you can see that I have bound the F5 key to the Save and Complete run task. Now let's add a few exclamation points. Press the F5 key and watch Live View update automatically.
Now let's make the text bounce up and down. As you can see, autocomplete options are built into Incisor. Dotting your way around the API is one of the easiest ways to familiarize yourself with Incisor's broad functionality.
I'll add some motion along the y axis. Press F5 again. You can also access documentation for the entire API and the Incisor menu in the corner.
Now let's add an asset of our own. To include a new image in our project, all we need to do is drag the PNG file into the assets folder. Now we can use that new asset in our project. For example, we can add a graphic object to our scene using this new asset.
Notice our graphic is now accessible from within VS code when we start typing.
To view the final product, we'll need to publish it, which can be done through the project menu. New projects come included with the dev mode configuration for publishing, but more configurations can be added in the project settings.
Let's publish. Click the new URL in the pop up window and we can now see the final published product in action.
Looking back in our project directory, we can see that Incisor has added a publishing folder and put the newly published and timestamped website under its own directory.
This concludes the Getting Started with Incisor TypeScript tutorial.
Check the link in the description for more tutorials, and feel free to leave questions and feedback on StackOverflow and our subreddit.
Enjoy creating with Incisor.
----------------------------------------------------------
Section 8: GraphicExpander
----------------------------------------------------------
Graphic Expander
If you have a graphic object that you want to resize without distorting the edges, you can use the graphic expander add on in the object panel.
You can increase the expanded area width and height while preserving the original sizes of the corners.
This is great for buttons and panels, enabling multiple sizes in your project without having multiple assets, which will decrease the download size of your project.
----------------------------------------------------------
Section 9: GraphicObjects
----------------------------------------------------------
Graphic Objects
2024.10.03- Hello and welcome to this Graphic Objects tutorial.- In this tutorial we will cover- Importing Graphic Assets into a new project- Creating Graphic Objects with a Graphic Asset- Positioning Graphic Objects within a scene, using the GUI
to design the scene and to obtain our object’s position values- Setting a Graphic Objects parent in the hierarchy to
demonstrate inherited values- Making a Graphic Object visible or not visible- And enabling and disabling a graphic object- This video also assumes that you have watched either the
"Getting started with Javascript" or "Getting started with
Typescript"- All code examples shown in this tutorial will be in
Javascript.- Let’s create and open a new project in Incisor®.- After creating a new project, We need to put our assets into
the project.- To do this, you will navigate to the assets folder in your new
project. You can then drag and drop your assets into the folder. - Incisor will automatically recognize the assets and make them
available for use.- Now that the assets are in the project, we will navigate to
ProjectMain.js in the Project Code folder of your new project.- Go ahead and remove the code inside of the init() function,
which is the entry point to your project, so that we can start
with a blank slate.- To start, in the init() function of ProjectMain.js, we will
create a new graphic object.- This Class accepts three parameters a Graphic Asset, a Parent,
and a Name.- the graphic asset may be any graphic asset in your project, we
will be using the “Farm” graphic. If a graphic asset is not
provided, the built in “White Box” asset will be used. - The parent can be any scene object in your project. If left
undefined, the default parent is the main scene.- The name is a string that will be viewable in the Hierarchy
inspector. If no name is provided, the name will default to
“Graphic Object” in the Hierarchy.
- The name is a string that will be viewable in the Hierarchy
inspector. If no name is provided, the name will default to
“Graphic Object” in the Hierarchy.- Now we will add in two more Graphic Objects, each using one of
the graphic assets that we previously imported.- We have intentionally left the parent as undefined.- You can see in the Hierarchy Inspector that all three are
children of the main scene.- Now we will set the parent of the “chicken graphic” to the
“farm graphic”.- If I grab the “farm graphic” in the live view, you will see
that the “chicken graphic” inherits the movement from its
parent, while the “scarecrow graphic” does not.- Now we will set the parent of the “scarecrow graphic” to the
“farm” as well.- The “chicken” and “scarecrow” graphic objects are now
descendants of the “farm” object.- Currently, all of our graphics are stacked on top of each
other.- Let’s use the “Live View” to arrange the elements where we
want them in the scene.- Clicking the magnifying glass in the upper left corner of the
“live view” will allow you to select individual elements in your
scene.- Now that the elements are where we want them, when we select
an element, we can see the X, Y, and Z position values for that
element in the object inspector.- With these numbers, we can go into our code and set these
position values for each element.- Now, when we save our code, the scene will remain in this
configuration.- Each graphic object contains a property called “Visible”.- Setting this property to false stops it from being rendered
without disabling it in the hierarchy, therefore descendants
will remain visible.- We will set the “farm” graphic visible property to false.- Note that the graphic object remains in the scene but is not
visible, while its children will remain visible.- Now we will set the “farm” visible property back to true.- Each graphic object also contains a property called enabled.- Setting this property to false disables the graphic object in
the hierarchy, along with all of its descendants.- We will set the “farm” objects enabled property to false,- Now we can see that all of our graphic objects are no longer
rendered in the scene.
- This concludes the Graphic Objects tutorial.- Don’t forget to check www.incisordevdocumentation.com for more
tutorial videos, and feel free to leave questions and feedback
on StackOverflow and our SubReddit.- Enjoy creating with Incisor!
----------------------------------------------------------
Section 10: GUI
----------------------------------------------------------
00:00:07:06 - 00:00:30:24
Unknown
In this tutorial we'll be going over the Incisor user interface. We'll cover the top bar, the bottom bar panels, and a brief overview of panel functionality. Here we have the top bar. As you can see, it contains the project name, project directory and a menu bar. If you make changes to the project, an asterisk will appear next to the project name, indicating that the project has been modified and you need to save to make the changes permanent.
00:00:30:27 - 00:00:51:08
Unknown
The Project Updated button will appear below the project directory if changes have been made, and the live view is of date. This button will reload the project to reflect any updates. Lastly, we have the menu bar. Stay tuned for an upcoming tutorial on how to add custom menu items to Incisor. Next we have the bottom bar. It contains a short version of Incisors, logs, and tooltip information.
00:00:51:10 - 00:01:10:12
Unknown
Incisor will occasionally log pertinent information like warnings if your project is configured incorrectly. Errors in your project code, and other useful readouts. These entries are written to a more detailed log that can be found in the Application Support directory. You can access this directory by clicking the Incisor icon in the menu bar and selecting Open Application Support Directory.
00:01:10:15 - 00:01:31:08
Unknown
You can also view the most recent log by clicking the eye icon in the lower right corner. You can copy the log entry by clicking the copy icon, then paste the log into your preferred text editor. Alternatively, you can use the developer tools in your browser to view the logs in the console as well. Incisor also has built in tooltips that display information about what your cursor is hovering over.
00:01:31:10 - 00:01:51:28
Unknown
This info is displayed below the logs in the bottom bar. You can also view tooltip information using the tooltips panel. Now let's talk a little bit about panels. The default view for Incisor consists of four panels. The tooltips panel. The object panel hierarchy panel, and Live you panel. You can change the size of the panels by dragging the divider to the desired size.
00:01:52:00 - 00:02:08:28
Unknown
Panels can be added by clicking the plus icon in the upper right of any panel, and reposition by clicking and dragging the top area of the panel to a new location. You can change an existing panel by clicking the name of the panel in the upper left, and selecting from the list of panels. To close the panel, click the X in the upper right.
00:02:09:00 - 00:02:27:01
Unknown
Let's briefly go over the functionality of some of these panels. Tooltips, as we mentioned earlier, simply displays the tooltip text. It's a good idea to keep this panel open until you are familiar with Incisors UI. The Live View panel displays a current live view of the project that's running. It has several controls at the top, starting from left to right.
00:02:27:03 - 00:02:47:18
Unknown
We see maximize, refresh, pause, and inspect. It can be helpful to pause your project and inspect so that you're able to select objects and view information about them in the Object and Hierarchy panels. If the desired object is obscured by another object, you can use the scroll wheel on your mouse to highlight the objects underneath and left click select the desired object.
00:02:47:21 - 00:03:10:20
Unknown
As we mentioned in the Live View panel when you were in selection mode, the object panel will display information about the selected object. It will also display information about objects selected in the Construct and Hierarchy panels. In general, to select multiple objects, hold the shift button down while clicking on the desired objects. If multiple objects are selected, the object panel will only display attributes that are shared across all the selected objects.
00:03:10:23 - 00:03:34:18
Unknown
The hierarchy panel will display the hierarchy of the selected objects. The controls at the top of the panel allow you to change the selected scene. Search for objects within the hierarchy. Expanding. Collapse all descendants and highlight and scroll to the selected object. You can also show disabled objects by clicking the Show Disabled checkbox. You can rearrange objects in the hierarchy by clicking and dragging the drag handle next to the object.
00:03:34:21 - 00:03:55:11
Unknown
Other panels include the layers panel where you can add, remove, and reorder layers in your project. The construct panel allows you to add and edit constructs, and also allows you to create new timelines that can be edited in the timeline panel. Use the Particle System panel to create and modify existing particle systems. The transcript panel can be used to add, edit, and remove translations in your project.
00:03:55:14 - 00:04:14:02
Unknown
The assets panel will show the folder structure of your assets and allows you to modify attributes associated with those assets. And finally, the Publishing Analysis Panel allows you to view a summary of the results from publishing a specific configuration Incisor also allows you to add your own custom panels. Stay tuned for an upcoming tutorial on that feature.
00:04:14:04 - 00:04:28:17
Unknown
That does it for this video, but if you'd like to learn more about these panels individually, go to our YouTube channel or visit the tutorials page on Incisor Devcon. Also, feel free to ask questions about Incisor via Stack Overflow or on the Incisor subreddit. Have fun creating with Incisor.
----------------------------------------------------------
Section 11: IntroToButtons
----------------------------------------------------------
Buttons Tutorial
Hello and welcome to this Incisor Button tutorial.
Creating and using buttons and incisor is easier than ever.
In this tutorial we're going to cover creating buttons, adding button callbacks, removing button callbacks, and expected behavior when layering multiple buttons.
To create a button, simply call new button.
The constructor does not require any parameters, but to make life easier, the constructor accepts a graphic asset, a parent, and a name.
The graphic asset can be any graphic in your project.
If a graphic asset is not provided, it will default to the built-in white box asset.
The parent can be any scene object in your project.
If a parent is not provided, it will default to the main scene.
The name is simply a string. It will help identify the button object in the hierarchy viewer, and for this reason, we highly recommend providing unique names for all objects you create.
If a name is not provided, it will default to "button."
Once the button is created, we can add a callback function that will be triggered on specific cursor events.
To add a callback for the press event, just call the add press callback method.
It requires a callback owner and a callback name.
The callback owner can be any object in your project.
The callback name is a string specifying the name of the function that you would like to call.
Optional callback arguments can be added and will be passed to the callback function when called.
It's important to note that when creating a button callback function, the first two parameters will always be the browser event and the camera.
If optional callback arguments are provided, they will be added after the camera.
Removing callbacks is just as easy as adding them.
To remove a press callback. Simply call removePressCallback with the same callback owner and function name that were provided when adding the press callback.
Incisor buttons support a variety of cursor event callbacks.
For a full list of callbacks that can be added or removed, please refer to the Incisor documentation.
When interacting with multiple buttons that overlap, it is important to remember the button that is visually in front will execute the callback, while buttons behind will not.
And this concludes the button tutorial.
Don't forget to check out incisordevdocumentation.com for more tutorial videos and feel free to leave questions and feedback on StackOverflow and our subreddit.
Enjoy creating with incisor.
----------------------------------------------------------
Section 12: IntroToPrecomps
----------------------------------------------------------
Hello, and welcome to this introduction to precomps in Incisor. In this tutorial, we’ll cover:
What a precomp is
How to set up a basic precomp
Precomp is short for precomposition, and is an object with its own scene, camera, render target, and resulting graphic asset. We can think of a precomp as a separate composition running independent of our main scene. By making graphic objects using the precomp, we can instantiate multiple “windows” to this independent precomposed scene without duplicating the scene itself. This is very useful for optimization because it allows us to visualize something many times over without actually duplicating all of the elements associated with it. This can greatly reduce the object count of our project.
To demonstrate this, let’s step through the precomp example in the Incisor example gallery project, which you can download for free at incisordev.com. First, we create a new precomp using the precomp class. We simply have to supply a name, and the dimensions of the camera that will be pointing at our precomposed scene. The last parameter is autorender and it tells our precomp to either render every frame, or render only once when instantiated. Since we have some moving elements in our precomp, we’ll set autorender to true. Let’s also change the background color of the precomp camera, so it’s a little easier to see its boundaries. Next, we add a simple graphic object. We’ll use our beach ball graphic, called “Ball”. The important thing here is to set the parent of our graphic object to the scene of the precomp we made. Now we’ll set some basic scale and position values, and add some motion to the ball. You can learn more about that by checking out our Swoopers and Motions tutorial.
When we made our precomp, a graphic asset with the name we gave the precomp was generated. We can use this graphic asset to create any number of new graphic objects. If we just make one, we’ll have a window into our precomposed scene. We can simply duplicate this code, rename the objects, and position them accordingly. As you can see, they’re all displaying identical representations of the precomp we made earlier. If you inspect these objects using the object panel, you can see that despite adding multiple visual elements, each reference to the precomp has only added one new object to our main scene. These are single graphic objects without children of their own, and we can manipulate them accordingly. That concludes this introduction to precomps tutorial. Feel free to check out our other tutorials on incisordev.com, and leave questions and feedback on stack overflow and our subreddit. Have fun creating with Incisor!
----------------------------------------------------------
Section 13: LiveView
----------------------------------------------------------
In this tutorial we'll be discussing the Live View panel. The Live View panel displays the current live view of your project while it is running, and has several controls at the top. First, we have maximize, which will maximize the Live View panel to fill the browser window. Clicking this button again will revert the Live View panel back to its previous size and restore your previous panel configuration.
00:00:28:04 - 00:00:45:29
Unknown
Refresh will reload your project and update the live view. The pause button will pause the live view, and a skip forward button will populate next to the play button. Clicking the Skip forward button will advance the live view by one frame at a time. Clicking the play button will unpause the Live View. And lastly, we have the inspect button.
00:00:46:01 - 00:01:10:15
Unknown
Clicking it will allow you to select objects in the live view. In this mode, you can also select and edit objects in the object panel and hierarchy panel if the desired object is obscured by another object. You can use the scroll wheel on your mouse to highlight the objects underneath, and left click to select that object. It should be noted that live View is a runtime view of your project, and any changes made to selections will not take effect even if you save the project.
00:01:10:17 - 00:01:33:06
Unknown
Also, while in selection mode, any buttons in your project will not be interactive. If an object is selected in your live view, you can press the escape key to clear the selection. To exit selection mode, click the pointer icon. This will re-enable any interactivity built into your project. Next we have view controls. This button allows you to select a fill mode and or pixel ratio, or a pixel dimension of the Live View.
00:01:33:09 - 00:01:51:16
Unknown
Maximize will maximize the view and match the dimensions of the browser window that Incisor is currently running in pixel ratio with underscore. Maximize or constrain the view to the ratio while trying to maximize it in the Live View panel. Choosing a hard dimension will force the view to be those dimensions, regardless of the live view panel size.
00:01:51:18 - 00:02:11:07
Unknown
In this case, you may have to resize or maximize the panel in order to see the entire project in the Live View panel. To add a custom view to the list, click project in the menu bar and select Project Settings. In the project settings, you will see additional Live View modes under the Development Settings section. Add your custom view to this comma separated list.
00:02:11:10 - 00:02:28:23
Unknown
Save and refresh and you'll see the new option in the list of dimensions. If you do not include underscore maximized to a pixel ratio Incisor will consider the entry to be a pixel dimension. That's all for this video, but if you'd like to learn more about Incisor, go to our YouTube channel or visit the tutorials page on incisordev.com.
00:02:28:25 - 00:02:35:01
Unknown
Also, feel free to ask questions about Incisor via Stack Overflow or on the Incisor subreddit. Have fun creating with Incisor.
----------------------------------------------------------
Section 14: ObjectPanel
----------------------------------------------------------
Object Panels
Today we’ll be talking about the Object panel in Incisor. The main use of the object panel is to inspect and manipulate an individual object within a scene, or SceneObject. With our project open, we’ll access the object panel by adding a new panel, clicking the panel drop down menu, and selecting “Object.” At first the panel will be mostly blank because we don’t have any object selected. To populate the panel with an object, we can select something from the live view, or click on something using a hierarchy panel. Look for our separate tutorial on Hierarchy for a deeper dive there. Now that we have an object selected, we can see a lot more information in our object panel.
The first thing we’ll see in the panel header is the type of object we’ve selected, and any inheriting classes in parentheses. Next we’ll see some methods of monitoring and manipulating object properties, which we call supervisors. We’ll see common supervisors like the object’s name, whether or not it’s enabled, and its position, scale and rotation. We can alter these by entering numbers or clicking and dragging the label. Holding shift while dragging will increase the sensitivity, and holding command on Mac or control on Windows will decrease it. Next we can see something called the Scene path. This shows where the object lives in the hierarchy, what it’s currently being parented to, and its children if there are any. We can also use this section to select other objects. You might have noticed that when I clicked this “container” object, a lot of information left the object panel. That’s because our previous object was a GraphicObject, which has more configurable parameters like visibility, the asset being used with the object, the layer it’s on, and other class specific variables.
If I select a different type of object, like a TextAssembly for example, you’ll see some text specific elements appear. Selecting a sprite animation or particle system will populate a playback controller in our object panel. All of these elements correspond to parameters that can be set on the object through code. This is important because unless we’re working within a construct, changes that we make in the panel won’t be permanent unless we enter them in the project’s code. So the object panel is a very useful way to preview specific changes before hard coding them. Another useful thing for engineers is the “print object to console” button which is common to any object being inspected. If we inspect the page and click this button, we’ll see our object appear in the console, and can view all of its associated variables and parameters. If you select multiple objects by holding shift, you’ll see any shared elements they have on the Object panel. But note that even if you have multiple object panels open, they will all reflect the current selection. And that’s all for Object Panel basics. Check out our other tutorials on YouTube or IncisorDev.com, and be sure to leave questions or comments on StackOverflow or the Incisor SubReddit. Have fun creating with Incisor!
----------------------------------------------------------
Section 15: ParticleSystemOverview
----------------------------------------------------------
Particle System Overview
A particle system is a technique for efficiently controlling and rendering a collection of graphics called particles.
These particles are merged into a single graphic object and controlled by the GPU, which can significantly improve performance.
We can specify different graphics for particles, each with their own emission rate and scale.
We can control where the particles are emitted, their velocity when emitted, and how long they live.
We can apply physics concepts to simulate things like gravity, wind, and motion stretching.
We can control the rotation of each particle, wiggle the position randomly, and control their scale and color properties.
These parameters can be specified as constant values or changed over time, with ramps or expressions
Combined with the built in randomization of each parameter, these tools let us create a wide variety of effects.
----------------------------------------------------------
Section 16: ParticleSystems
----------------------------------------------------------
0
Hello, and welcome to this tutorial on creating and using Incisor ParticleSystems. In this tutorial, we will cover the following topics: What a ParticleSystem is, how to create a ParticleSystem, and how to use a ParticleSystem in your project.
A ParticleSystem is a special type of GraphicObject that allows us to control the behavior of many separate graphics called particles. Suppose we want to create a snow effect in our application. One approach would be to create a unique GraphicObject for each snow flake and control the motion of each GraphicObject manually. While this can work, the computation required does not scale well to hundreds or thousands of snow flake particles. To solve this, a ParticleSystem merges all the particles into a single GraphicObject, and uses the GPU to make each particle obey a randomized variation of the same basic particle behavior.
1
To define this particle behavior, we use a ParticleSystemDefinition. To get started, click the "create new" button in the Particle System panel. In the popup, we'll choose Fountain as the template for our new definition, and give it whatever name we like. To see the results of changing this definition, we first need to add a ParticleSystem instance that uses this definition. Right click in the live view, and add ParticleSystem. In the ParticleSystem panel, we'll switch the definition this ParticleSystem uses to the new definition that we created.
2
Now that we've got a ParticleSystem up and running, let's look at the ParticleSystem Panel to see how we can control the particle behavior.
3
In the Particles section, we have a list of Particle types that this system will use. This system currently uses the SampleParticle2 graphic asset for all the particles. Let's add another particle type, and select SampleParticle. Now we see two different particle graphics in our system. We can control the emission rate of each type of particle independently, using the particlesPerSecond value, to control how many of each graphic we want to see, as we see here when we change the particles per second of the second particle.
Because two graphics in the same particle system might have mismatched scales, we can also control the scale of each particle using the scale value. For example, if we decide that the circular particles here are too large relative to the star particle, we can lower the scale of just SampleParticle.
4
Next we have the Emission section. Particle Lifetime controls the amount of time a particle lives after it is emitted. Here we have our first example of randomness. If we set the particle lifetime value to 1 and randomness to 0, each particle will live for exactly 1 second. If we increase the randomness value, we increase the amount each particle's lifetime is allowed to deviate from the base value. Note that this random deviation is plus or minus the randomness amount. In other words, the lowest lifetime allowed with this setup is 1 minus .9, or .1 seconds. The largest possible lifetime would be 1 plus .9, or 1.9 seconds. Each emitted particle will then pick a random number in this range for its unique lifetime.
5
Next we have emission time randomness. To move easily observe the effect of this value, let's lower the particles per second of this system. With an emission time randomness of 0, we can see that the particle system will emit particles at equally spaced intervals. By increasing the emission time randomness, we cause each particle's emission time to be delayed by a random amount of time between zero and this amount. Let's set this back to zero and bring the particles per second back up.
6
The emission duration controls that amount of time over which particles are emitted. Let's look at the ParticleSystem section in the Object Inspector for a clear picture of what's happening here. Here we see the interface for the Particle System's playback controller. An emissionDuration of 0 indicates that the particle system will emit particles endlessly. But if we change the emission duration to 1 second, we see that that after 1 second, no more particles are emitted, and the existing particles are allowed to complete their lifetime. Note that the playback controller automatically adjusts the end time of the particle system to be the last possible time at which a particle might die.
7
Next we have emission velocity. This is our first example of a parameter that can be one of three types. Currently, the type of the emission velocity is set to Constant. This means that the path each particle takes will be calculated using an unchangeable initial velocity that, in this case, shoots it straight up at a velocity of 1000 units per second. If we want to shoot the particles up and to the right, we can simply edit the X component of the velocity to shoot them 1000 units per second to the right as well.
8
Now Suppose we want this emission velsocity to change over time. This brings us to an important concept regarding particle system definitions. While it is technically possible to modify the x component of the definition's emission velocity every frame, this is not recommended for several reasons. First, as we can see here if we slide the x component around in the interface, the path of every particle is recomputed as if that new value had been the emission velocity for the entirety of the particle system's existence, which is typically not the desired effect. More importantly, changing this value causes a costly rebuild of the entire definition, including rebuilding geometry and rebuilding the effect node definition. This is why the changing of the definition in this way is only recommended at initialization.
9
The much better way of modifying the emission velocity's value is to use one of the other two parameter types. If we click the type button, we can see that this can be changed to a an Expression or a Ramp. First, we'll look at the Ramp type. This is a built in type that allows us to specify parameter values that change over time. If we want each particle to evaluate this Ramp using the time at which it was emitted, we can choose an inputType of emissionTime. All ramp inputs are done in a normalized range from 0-1. By specifying an input maximum of 4, we indicate that we want the ramp to be evaluated over 4 seconds of emission time. Note that is common to set this inputMaximum to match the emission duration of the particle system. But with an emission duration of 0, meaning emitting forever, there is no length of time to match, so one must be chosen here.
10
The Ramp initializes with a single keyframe, seen here at time 0. Let's add another keyframe by pressing the plus button on the top right. Now we have another keyframe that has been added at time 1. Because we have selected an inputType of Emission Time, the second keyframe corresponds to the value that will be calculated at our inputMaximum of 4 seconds. Now we can change the emission velocity over 4 seconds by modifying the values at these keyframes. Let's select the first keyframe and set its value in the X graph to negative one thousand, and set its value in the Y graph to one thousand. This will emit particles up and to the left. Then we can select the second keyframe and set its value in the X graph to positive one thousand, and set its Y value to positive 1000. Then we can observe in the particle system that the emission direction has interpolated between these two values over 4 seconds.
11
We can also modify the Ramp's interpolation type to change the shape of the curve between the keyframes. To better demonstrate the different types, let's add a few more keyframes. We'll hit the plus button two time to get a total of 4 keyframes. Then we'll set the second keyframe to time 0.25, and a value of 1000. Let's set the third keyframe to a time of .5, and a value of 1000, and the last keyframe we'll set to a time of 0.75, and a value of negative one thousand. Notice how with linear interpolation selected, the curve is made of straight lines between each keyframe. With smoothstep mode, we get S shaped curves that ease into and out of each keyframe value. With Catmull Rom mode, the curve becomes rounded between the middle two keyframes.
12
The other option to change the emission velocity over time is to use an expression. When we change the type to expression, we see the value is populated with a default expression specifying a vector with no velocity. We can easily restore our original velocity by giving the particles an upward velocity here. We can then modify this expression using some built in functionality. Using the built in rotate2D function, we can change the vector's direction based on the time at which the particle was emitted, similar to the way we did with a Ramp. In this case, we can make the emisison rotate indefinitely with this simple expression.
13
To best observe emission velocity randomness, let's put the emission velocity back to a constant upward emission. Let's also set the particle lifetime randomness to 0. This definition currently has a constant randomness of .3. If we reduce this to 0, we see that the particles all reach around the same height, because their velocities all have the same magnitude. As we increase the randomness, we observe an important property of the randomness system. For parameters that are vectors, meaning they have more than one component, the randomness value causes deviation of the magnitude or length of that vector. Importantly, the direction of that vector is unaffected. We can see this as we increase the emission velocity randomness. Notice how the emission directions did not change, but the magnitude of their emission vector is allowed to deviate. To achieve this, the base vector is multiplied by a number randomly chosen from within a range. The lower end of this range is one minus the randomness value. The upper end of this range is 1 plus the randomness value. In this example, this works out to scaling the vector by a number randomly chosen in the range of 0.75 to 1.25.
14
The emission cone angle controls how much the emission velocity vector is allowed to be randomly rotated away from the base value. Notice how a value of 0 emits particles in a straight line, while raising this all way to 360 emits particles equally in every direction.
15
Emitter position allows us to animate the position from which particles are emitted. Notice how grabbing the particle system in the GUI (gooey) and moving it also moves any previously emitted particles, which is often undesireable. Using the emitterPosition parameter, we can animate this position without affecting the behavior of particles that have already been emitted. Let's reduce the emission velocity to make this more visible. If we then use this expression , we get a moving emitter position that does not affect the previously emitted particles.
16
The emitter shape lets us choose from a few predefined shapes where particles may be emitted. To make this more apparent, let's lower the particle lifetime to something very short, and increase the particles per second to something very high. We can now see that by choosing the Rectangle emitter shape, and giving it some larger dimensions, we get particles emitted from a rectangle. If we switch to circle uniform, we see that we get particle emitted uniformly across a circle. If we choose circle center, we get a similar circle, but with particles more likely to be emitted near the center. Choosing custom lets us populate the custom emitter shape code, where the expression is responsible for choosing a new position for every particle. For example, we can emit particles only along the edge of a circle using this expression.
A few random number variables are already available to use in expressions. These are named rand0 through rand5, and each have an x, y, z, and w component. Here we have used rand1.w. Each of the provided random numbers is in the range -1 to 1, and is unique to each particle.
17
The system automatically recycles old particles after their lifetime is over, so that it can create fewer particles and use less memory and set up time. The particlePoolCount number reflects how many particles were actually needed to support the requested emission parameters. It is often far fewer than number of particles that appear.
18 is a shot of resetting that jason can use if he wants, nothing to say really.
19
In the Physics section, we have the force parameter. This is often used to simulate gravity. Notice how the particle move down more quickly as we increase the strength. Extra velocity x and extra velocity y are an additional factor that is added the motion of each particle, and are often used to simulate things like wind. Notice how all particles are pushed to the right as we increase extra velocity x.
20
Motion stretch will scale each particle along the direction it is moving. combined with the motion stretch alpha influence, this is often used as a quick approximation of motion blur. To see this, let's lower the sizes of the particles and increase both of these values to .2.
21
The age ramp expression lets us modify a particle's age value. For example, we can make a particle move through the beginning of its lifetime more slowly, then speed up, by squaring the age. Let's reset these parameters.
22
In the rotation section, we can control the rotation speed of the particles. This system currently has a rotation speed base value of 0, with a randomness of 180. This gives us a system where some particles will arrive at a rotation number near the middle of the range, resulting in very little rotation. Suppose we instead want each particle to spin quickly in either the positive or negative direction. To achieve this, we can remove the randomization and use an expression for the base value. We'll use the x component of rand2 to get a random number that is unique to each particle. Because these numbers are in the range -1 to 1, we check if the number is negative or positive to choose which direction this particle should rotate. Let's now put this back to 0 rotation speed.
23
The initial rotation sets the rotation of the particle before any rotation speed or any of the additional rotation parameters are applied. If we remove the randomization of the initial rotation, we see that all particles have the same rotation. The rotation sway strength, rotation sway speed, and rotation sway phase all work together to sway the rotation back and forth. If we set the speed to 1, and the strength to 100, we see that each particle rotates back and forth over its lifetime. Because the rotation sway can cause particle rotations to sync up, which may be undesirable0, the rotation sway phase is available to offset the rotation sway of each particle.
24
The Wiggle section lets us control an extra movement factor on each particle. Let's remove the other motion on these particles to make this more obvious, and set the emission shape to a rectangle. Now we see that each particle remains in its initial position. If we modify the wiggle parameters, we can see that the wiggle strength and wiggle speed work together to move each particle in a back and forth motion. If we make the x and y speeds mismatched, we can get a more chaotic feeling wiggle motion.
25
The last wiggle parameter is best demonstrated if we set the emission shape to a point, lower the sizes, and increase the particles per second. By doing this, we can see that the sine wave nature of the movement means the particles will naturally fill out a rectangle, since the x and y are wiggling independently. We can alter this by using the wiggle circular strength. Setting it to 1 forces this movement to fill out a circle instead. Moving this value outside the zero to one range can also create some interesting effects, as we see here. Let's spread these particle out by increasing the wiggle strengths and lowering the speeds. (500 and .1, .08)
26
The particle scale lets us control the scale of each particle. Let's set this to an expression that makes each particle scale up, then scale down over the course of its life. First, lets use the smoothStep function to scale the particle up:
The age ratio variable represents how far through its lifetime this particle is, expressed in the range zero to one. We can then modify this further to scale the particle down again using another smoothStep function:
27 (Matt, I say this as "color alpha section" in my head, but maybe "color slash alpha section" is better? I don't know)
In the color/alpha section, we can control the color and transparency of the particles. First, let's change the color of all of these particles by lowering the blue channel of the color. Then lets hue shift each particle using the particle hue shift parameter. Changing the base value will change all particles together. But note how the randomness parameter can give us a useful variation in the hue of each particle.
28
We can also change the alpha value to change the transparency of each particle. Here, let's use a Ramp and tell it to use the ageRatio as input. This means the lifetime of the particle will be mapped to the Ramp values, with 0 being the moment the particle is emitted, and 1 being the time it dies. Let's add another keyframe to this Ramp, then set the first keyframe's alpha value to 1. We see that the particle's alpha starts at 1 and fades to 0 over the course of its lifetime.
In the randomness section, we can control whether the default behavior for any particle system using this definition will be to change the random seed of the particle system every time playback is started. This can be very useful for making the random variations of each particle be different every time the particle system playback is started, so that it appears less repetitive. The seed can also be specified manually in the randomSeed field. The particle seed draw order can be used to randomly shuffle the interleaving of particles. This is only meaningful when a system contains multiple graphics. because changing this value causes a costly rebuild of the particle system's geometry, it is recommended to only set this value at initialization.
The randomness distribution is an advanced setting that can bias all random numbers toward 0, which can alleviate certain visual artifacts, but it is not typically needed.
29
Now that we've gone through the entire panel, let's see how we use a particle system in code.
30
Earlier, we added a particle system to our scene by right clicking in the Live View. To do this in code, we'll call nc.addaParticleSystem. We'll pass it the definition we created earlier, which can be found in nc.particleSystemDefs, and tell the particles to play using its playback controller. Now that we've got our infinitely emitting particles created, we might decide dynamically in code that it's time for these particles to stop emitting. to gracefully accomplish this, the particle system has a stopEmitting function that stops the creation of new particles after the function call is performed, but allows existing particles to complete their lifetime. To see this, let's add a keystroke callback where we call this function. If we do nothing, these particles will never stop emitting. but once we press a key, we see that the particles have stopped emitting, but the existing particles are unaffected.
31
A noteworthy property of Incisor's Particle Systems is that we can set the playback controller to arbitrary time with no performance cost. Jumping to a different time does not require stepping through the intermediate particle states. Because of this, we can even tell the playback controller to play the system backwards with exactly the same performace.
This concludes this Incisor Particle System tutorial. Check the link in the description for more tutorials, and feel free to leave questions and feedback on our Stack Overflow and subreddit. Enjoy creating with Incisor.
Because the ParticleSystemDefinition is separate from the ParticleSystem, multiple ParticleSystems can use the same definition. This allows much of the work to inialize a particlesystem to be done only once, regardless of how many ParticleSystems use the definition.
merge publishing analytics
merge the geometry editor/asset browser changes
----------------------------------------------------------
Section 17: PivotPoints
----------------------------------------------------------
Pivot Points
When animating objects, we may want to adjust the pivot point of a GraphicObject.
Incisor makes this easy.
Here I have two images: A dinosaur and a leg stacked on top.
When I select the leg, notice the pivot point is centered by default.
We can reposition the pivot point in two ways.
By adjusting it in the Assets panel, it will be updated for all instances of this GraphicAsset.
This is the most performance efficient way.
However, we can also change the pivot for a single instance to reposition the pivot.
Click the pivot icon and hold option on a mac or Alt on Windows and drag.
This automatically configures a "PivotPointAdjuster" object on the given GraphicObject, which changes the pivot point for this instance of the GraphicObject.
PivotPointAdjusters can also be activated from within code by calling GraphicObject.configurePivotPointAdjuster.
----------------------------------------------------------
Section 18: ResolutionScaling
----------------------------------------------------------
Resolution downscaling helps improve image download times and reduce the rendering workload.
Incisor makes resolution scaling easy.
To demonstrate this, I’ll be using Incisorsaurus.
First, I've opened an Asset Browser and an Asset Settings panel and have selected the leg of the dinosaur.
I'll find the Resolution Scale X and Resolution Scale Y properties. By default, these are set to 1, which means the image is downloaded at its original size.
Now, I’ll adjust both values to zero point one. After saving the project and refreshing Live View, you’ll notice that while the image appears the same size, it’s much blurrier.
This is because the image is now significantly smaller than its original size.
----------------------------------------------------------
Section 19: Shapify
----------------------------------------------------------
Incisor's shapify system lets us create graphic objects with sharp edges at a wide range of scales, without needing to download a large image. To demonstrate this, we've added a two graphic objects to our scene.
[select graphic asset and show the unchecked box]
The top graphic object uses a typical graphic asset, without the shapify option enabled.
The bottom use a copy of the same graphic, but with the shapify setting enabled.
[show the effect nodes containing Shapify]
Enabling this setting automatically applies the shapify effect node to the graphic object, which causes it to turn white, with the alpha channel forming the reconstructed edge.
The effect of the shapify setting becomes more obvious if we increase the scale of both of these graphic objects. Notice how the edge of the top graphic becomes blurry, while the bottom graphic's edge remains sharp.
[showing effect controllers edgeOffset]
The position of this edge can be changed dynamically using the edgeOffset effect controller. This allow the shape to be made thicker or thinner than the shape in the original graphic.
[showing the level going up to .94]
In the asset settings, the shapify optimization level controls how much data is used to encode the edge information. Increasing this value reduces the size of the asset, but as you can see here after we save and refresh the live view, it also makes the edge less accurate.
The edge range is used to control how thick or thin the shape can be made using the edgeOffset effect controller. If we increase the edge range, save, and refresh the live view, we see that adjusting the edgeOffset effect controller now has a bigger effect on the edge position.
----------------------------------------------------------
Section 20: Showcase - ExampleGallery
----------------------------------------------------------
The Incisor Example Gallery is a free project that you can use to try out many of Incisor’s exciting and unique features. Each example is separated into its own class and is available as a typescript and javascript file. In the inspector you can use the arrow buttons to cycle through all of the current examples, or use the searchable drop-down menu to find something specific. The example gallery is regularly updated, so be sure to check out incisordev.com for new versions of this project and tu
torials based on it.
----------------------------------------------------------
Section 21: Showcase - ExampleGallery.sb-fae7be28-8wSMBa
----------------------------------------------------------
The Incisor Example Gallery is a free project that you can use to try out many of Incisor’s exciting and unique features. Each example is separated into its own class and is available as a typescript and javascript file. In the inspector you can use the arrow buttons to cycle through all of the current examples, or use the searchable drop-down menu to find something specific. The example gallery is regularly updated, so be sure to check out incisordev.com for new versions of this project and tu torials based on it.
----------------------------------------------------------
Section 22: Showcase - ForkYourFood
----------------------------------------------------------
Fork Your Food
Hi everyone, and welcome to this showcase of making a new game using Incisor. My name’s Veronica, and I had the opportinuty to intern at Incisor this summer. While I was there, I was given an exciting challenge: to create an entirely new game using the Incisor platform. As someone studying art and visual effects, with no prior development experience, I saw this as the perfect chance to dive in, learn something new, and document the journey along the way.
I’ll be making this “falling objects” game, where the player moves a character back and forth to either catch or avoid objects falling from the top of the screen.
When I was working on the game concept, I went through a bunch of different thematic ideas, and ended up choosing the one I was most excited about, “Fork Your Food". You play as an angry chef who’s just been laid off, and you have to build gross recipes by catching bad things like saw blades and poison, while avoiding real food like tomatoes and sauce.
The first step is to start making assets for the game. This is my comfort zone! I use Photoshop as my tool of choice, but feel free to use whatever software you're comfortable with, as long as you can export your images as semi-transparent PNGs. I sketched out the main character and scene to help visualize the concept. These early drawings were rough and just meant to prove the idea. More refined versions will come later. The setting I chose was a kitchen, and our star is the not-so-happy chef.
With some visuals ready, it was time to jump into the fun part: working in Incisor. Incisor’s documentation includes a lot of great tutorials covering various features, so if you're looking for in-depth guidance on setting up a project or using the graphical interface, I highly recommend checking out incisordev.com.
So let’s go ahead and create a new project! The first thing you see when you open up Incisor is called the control center. You can see your files and projects, or create a new one. So just click on “New Project”, choose the project location and give it a name. Now open it up. The first thing I’m going to do is move my panels around to where I want them. I want a timeline panel going across the bottom, and a construct view up top. I’m also leaving tool tips up, which will give me information in Incisor about things I hover my cursor over. The object panel will let me manipulate idems, and the heirarchy window will help me order and parent things.
Now I’m going to go to where the project lives on my computer, and open the Assets folder. I’ll make a new folder for the chef assets, and an ncData file will pop up— that’s normal, don’t worry about it right now. I’ll also make a folder for the kitchen scene assets. Since we’re going to import all the images at once, we should name them with ascending numbers at the end. This will tell Incisor what order to import them. Now that that’s done, let’s go back to Incisor. We’re going to use the assets we just added to create a new construct. Constructs are a major Incisor feature. They're collections of different types of SceneObjects that can be built, arranged, and animated directly within Incisor. I created one construct for the kitchen and another for the chef. Here’s how I approached it. In the construct panel, click “Select”, “New Construct” and name it. You can always change this name later if you need to. Now right click somewhere in the panel and choose “new graphic stack.” Find the folder with your assets and add it in. Now all your numbered graphics will be imported, and we can hold the space bar and scroll to zoom in and out. Immediately we can see that something is in the wrong order. Just select the item you want to move, and in the Object panel we had open before, find the sublayer value and change it closer to -1 to push the item back. Now that they’re in the right order, I’ll rename the items and clean things up a little bit. I’ll also click and drag some things in the heirarchy window to parent different items. I went through a similar process to get all the assets for the kitchen in there. Ok, now that I have a scene and a character, it's time to bring the game to life. If the chef is going to catch falling objects, he needs to move! This was my first dive into Incisor’s timelines and animations. Let me show you how I set it up.
Back in the construct panel, click the Timeline drop-down, which will say NeutralState by default. Then click on “Add Timeline” and give it a name. You’ll see all the objects in your construct appear in the timeline panel. First, I’ll set my animation duration to 5 seconds. To start animating, right click on an object and click “Animate Graphic Object,” then choose the parameter you want to animate. The keyframe button, the curve graph toggle, and the value will appear. I’ll mostly use position and rotate to animate, using x and y for position and z for rotation. Press the keyframe button to add a keyframe, and set the value. Now I’ll click the curve button and then right click on a keyframe. Depending on what you select, you’ll get some handles to change the curves.
Now I’ll jump forward a bit and show you some completed animations. Here’s my running animation for the chef. Let’s look at the torso. You can see how manipulating keyframes changes the value on the left, and you can use the curve handles to mess with the interpolation between keyframes. Since the neck and head are parented to the Torso, they’ll move along with any changes I make. But I’m also animating some of these things independently to make things feel more organic.
Now It’s time to start working with something that was a little scary to me at first: code. But don’t worry— I’ll go through everything step by step! The first thing you’ll need is a code editor. I’ll be using Visual Studio code— that’s not a requirement, any code editor will work. But I do recommend using VS code if you’re following along, because it’s free and widely used. I’ll drop a download link in the video description. We’ll also be using some very basic Javascript that should be easy to follow along with. Alright, with our editor ready, let’s open up the project code. All Incisor projects have the same entry point. You can think of it as “the place where the project starts.” Locate the file called ProjectMain.js. Inside, you’ll find a function named “init.” The most important element of the game is controlling the chef, so that will be our first goal. But before I can do anything, I need to get my kitchen construct into the scene. You can see everything in our construct view, but our live view, where the game is actually running, is completely blank. That’s because we haven’t added anything to the scene yet. We'll have to do that in code. So the first thing I’ll do is set up variables for my two main gameplay elements-- the kitchen and the chef. I’ll set my first variable to the kitchen construct, by using nc.constructDefs. Incisor’s autocomplete will show you all of the constructs available in the project. So we’ll click the one we want, and type "dot add," adding it to the main scene. The chef is a little different-- his construct is inside of the kitchen construct. So instead of using nc.constructDefs, I’ll type the kitchen variable I just made, and use "dot descendantsByName” with another dot afterward to see everything that’s parented to it. Then I’ll select the chef. Now I can use these variables to get to my kitchen and chef from anywhere else in the code. If I save the code, Incisor will refresh and we can see our elements in the live view!
So I want to make the left and right arrow keys move the chef around. To get this going, we’ll use something called an appEvent. An appEvent listens for something else to happen in the environment, and then executes any function that’s been added to it. So we need to use an appEvent that can always be looking for whether a keyboard key is pressed down. For that, we’ll use fixedUpdate— this is a built-in appEvent that’s updating every frame the game is running, so 60 times per second. Now we add a callback to the appEvent. This is the function that will run every time the appEvent is triggered. We can name this whatever we want-- I’ll just call it “fixedUpdateCallback”. And now we just need to make a callback function with the same name. Inside the callback, I’ll start with changing the chef’s position. If I type my chef variable with a dot next to it, I can see a lot of options come up in the autocomplete menu. Remember all of the stuff we were animating back in the timeline panel? Most of those are parameters we can also access through code. I want the chef moving on the x axis, so I’m going to find position and type "dot x.” Negative values will move him left and positive values will move him right. I’m going to start by using “minus equals.” This will subtract a number every time the function it’s inside of is run. If I save, we can see that the chef immediately moves off the screen. So we need to wrap this in something so it only happens if a certain key is pressed. All we need is an “if” statement that looks at the right condition. Incisor has some built in functionality that registers keyboard presses, called “nc.keyDownStates”. This is a variable that will be true if the key is down and false if it’s not. So if we put our position change inside this statement that checks for “ArrowLeft” to be down, and save, we can see the chef is no longer moving automatically, and only moves when we press the key! Now we can copy all of this, change Arrow Left to arrow right, and change minus equals to plus equals. The only difference here is that I’m going to put an else in front of our second if statement. I’ll get back to that a little later. Tada! We can now control how the chef moves. But even though he’s changing direction, it doesn’t look like he’s turning. So I’m just going to simply flip the chef when he changes direction. All we have to do is set the chef’s x scale to either positive or negative depending on the direction.
Ok, we’re controlling the chef, but he’s still just gliding across the floor. So now it’s time to hook up some of the animations we made earlier. I’m going to quickly go back to my “init" function. I’ll type my chef variable again, and I can see all the animations available by using “ dot timelines. Now I'll call play on a few animations. This will kick them off in the background, but they won’t be showing up just yet. In order to actually see the animation playing, we need to turn up its influence. So back in my fixed update callback, I’ll get my run animation, and turn its influence to 1 whenever I’m pressing a key. Now we can see the run, but the chef doesn’t stop running when the key is released! To fix this, I’m going to make an else statement. This basically says, if there’s any situation other than what I put in my if statements, then do something else. So in here I’ll set the influence of the Idle to 1. That will have Incisor automatically turn the Run influence back to 0. Now the chef will stop when we stop moving him. It’s working, but the change is still pretty abrupt. What we really want is a smooth transition between the timelines. Instead of just setting the influence of our run timeline, let’s try incrementing it by a small amount. Then when the chef stops, we can bring the Idle back in.
Something’s still not quite right. It looks like the Idle timeline is being played when we’re not moving, but since we’re constatly adding to it, the influence is going above 1, causing some weird things to happen. And when we run for too long, the influence of the run goes above one, which also gets us some wacky results.
So I’m going to use another if/else statement to make sure the influence of either timeline never goes above 1. If the influence is greater than or equal to 1, I’ll just set it to one. Otherwise I’ll increment it. I’ll also do this for the Run timeline for the key presses. Copy that around real quick and … now we have a smooth transition between the different timelines! But it looks like he’s still runnning for a little too long when we actually release the arrow key. So I’m just going to increase how much we increment the Idle timeline and speed up that transition. I think .05 looks good. Ok, that got a little technical but it wasn’t too bad! We’re controlling the chef and it could use a little polish, but it’s looking pretty good. However we still don’t quite have a game yet. So let’s get some objects in there for him to catch.
I ended up creating around 12 different falling objects. Some are food-related and some, not so much. In addition, I created shadow versions of each object. These will appear as silhouettes when objects pass behind the kitchen cabinets, which helps create a nice sense of depth in the scene. I’ve also added some updates to the chef construct and added an impact animation that will play when objects make contact. With our new assets and timelines created, let’s head back to the code. Let’s start with making the items fall from the shelves. Since our falling objects will look different from each other but share a lot of the same properties, our goal is to make a chunk of code that can be any of the falling objects, instead of having to keep track of 12 seperate ones all the time. So things are gonna get slightly more abstract for a second, but stick with me.
We're going to go back to the projectCode folder of our project in VSCode and create a new file. I’m going to call it FallingObject.js. At the top of this new file, we’re going to declare our FallingObject as a class that extends the GraphicObject class that’s built into Incisor already. This basically means that our FallingObject will automatically have everything that a default GraphicObject in Incisor has. Now there’s a couple things we need to set up in order to get our new class doing stuff. First we’ll make a function called constructor, and we need to give it a few variables to look at so it knows what it’s doing. This is sort of like the “init” function in our main project, but specific to our FallingObject. It will come in handy when we start using our class a bit later. Then inside of our constructor we need to call the “super” function which basically does the same thing for the outer class-- in this case GraphicObject. Ok, now that that's out of the way let’s start doing some more custom stuff. I want to start by setting up a few things that I know every object will share-- a main graphic, shadow, and impact animation. Since our FallingObject is a type of GraphicObject, we’ve got the main graphic covered already through the “graphicAsset” in our constructor. I’ll show you how to mess with that in a little bit. But before we do, I want to at least set up the shadow and the impact animation. For the shadow, I’m going to make a new variable and set it equal to “nc.addGraphicObject” with an open parentheses. Whenever you open a function you’ll see a popup that shows if the function needs to be given any variables. So it wants a graphic asset, which will just be generic for now, a parent, which is this object, and a name. This name is what shows up if we want to look at this object in the inspector, so call it something that makes sense. I’ll just name it “shadow.” I also want to push the shadow sublayer way back so that it’s always behind this main graphic. I’ll set up the impact construct the same way I set up the chef and the kitchen. Now, to get some falling objects into our game, let’s head back to ProjectMain.
Ok, back in our Init function, the first thing we need to do is create some falling objects using our custom class. What I want to end up with is a pool of a bunch of objects that I can pull from as needed. So first I’m going to make an empty array by making a new variable and setting it equal to some empty square brackets. Then I’ll using something called a “for loop” to put a bunch of objects into the array. This is a snippet of code that will do whatever is inside of it a given number of times. I have 12 total objects I want to use, but let’s just start with one for now— we can always add more later. Now inside our loop I’ll make a local variable using “let” and set it equal to a new FallingObject with open parentheses. Again, I'll see a popup that shows me the variables I need to give it. Remember all the parameters we put into the constructor of our class? This will be where those things come from. So, I’ll keep the main graphic generic for now, parent all of these to the kitchen construct, and name them all “fallingObject." Then on a new line, I’ll get the empty array we made earlier and use a function called “dot push” with my local variable in the parentheses. This will put the falling object I just added into the empty array. Since we parented our fallingObject to the kitchen, it should be in the scene now. Going back to the inspector, we see a new white box in the middle of the scene. When we inspect it we see it’s named “fallingObject." Now we just have to tell it what to look like, and what to do.
So back in our FallingObject codeAsset, let’s make a function that does just that. We’ll start off by positioning it and moving it down. I’ll make a function here called “setFallingObject”. And I need to start it off at a certain height. I’ll use the inspector to drag my box to where I want the starting point to be, and check the y position in the Object panel. 930 looks pretty good! So back in my function, I’ll set the y position equal to that, save, and update. Looks like it’s still in the center. That’s because we haven’t called this function yet. So back in projectMain, let’s make a function called “dropObject.” Inside this function we need to get our fallingObject from our array and call setFallingObject on it. To do that, we need its index in the array. So in my init function I’ll make a variable called this.fallingObjectIndex and set it to 0. Then in drop objects I’ll get my array and in closed brackets put in the variable for the index. This tells the code to look at whatever is at that index of the array. I can call my function on this and save again. Now we see the box is where we want it to start. So let’s make it fall.
To move it, we’ll use an Incisor function called a swooper. A swooper is a function that tweens between two values. In my FallingObject code, I’ll make a new function called “fall” where I’ll put my swooper. I want to swoop the y position down. So first I’m going to see where I want the box to end up, which I’ll do the same way I found the starting height. -1030 looks good. Now in my code I’ll type “this.position.swoop.y", and provide my destination value, and how long I want the swoop to last in seconds. Then I’ll call this function inside of setFallingObject, save, and update. Yay, our little square is falling down. Now let’s make it look like something.
I can set what graphic I want my box to be according to the name of any graphic in my project assets. I want to use all the falling object graphics that I made, so I’m going to make an array of names. This will eventually have all the names in it, but let’s just stick with one for now. I’ll start with “Bottle Poison.” I want to pass an index of this array into my setFallingObject function, and then use the name to tell the box what to look like. So down in dropObject I’ll get the name in the same way I got the object itself, just using the array of names instead, and put that in these parentheses. Now let’s go back to setFallingObject. In these parentheses I’ll put in a variable that represents what I passed into the function. I’ll just call it “name." Now all I have to do is type this.graphicAsset and set it equal to nc.graphicAssets with my name variable in brackets. Now when I save and update, my box has transformed into a bottle of poison! But that’s a really big bottle. I could go into my assets and scale everything down manually, but it’s really easy to do with a simple Incisor function. I’ll go back to my constructor and just write “this.scaleByFactor" and put a multiplier in these parentheses. I think it needs to be a little more than half the size so I’ll put in .4. That’s looking a lot better. Ok, now let’s get all of our objects in there. Back in projectMain, I’ll go to the loop where I made the FallingObject, and change 1 to 12. Which will add 12 blank FallingObjects to my array. Then I’ll add the rest of my names to the names array, in quotes separated by commas. Now back in my "dropObjects" function, I need to increment the array so it actually changes the name getting passed to setFallingObject. Remember plus equals? I’ll use that to increment the fallingObjectIndex by 1 every time the function is called. I’ll save and … we still only have one bottle. Well that’s because we’re only calling this function once at the beginning of the game. We want to be calling it over and over again. To do that I’ll use an Incisor function called a waitThen, which waits a certain amount of time and then executes a callback function. I’ll type nc.waitThen, give it the wait time in seconds, the function owner, and the name of the function I want to call. So now our wait then will call dropObject once every second. Let’s save and see what that looks like. Alright, multiple different objects are falling now! But after a while the game stops. Eventually our fallingObjects index number gets bigger than the amount of elements in the array, which causes an error. So we need to cap this index at the max number of objects. We’ll do that the exact same way we capped the influence of our animations earlier.
So until our whitebox becomes something, it’s just sitting on the screen. We probably want to do some enabling and disabling. In the constructor of my FallingObject, I’ll set it to disabled. Then in setFallingObject, I’ll enable it and save. Much better! But we don’t want them just piling up on the floor, so let’s do something with them when they reach the ground. Swoopers can be given a callback function that will be executed whenever the swoop is complete. So I’m going to go to my swooper and set the tweentype to undefined— don’t worry about that for now— then give the function owner and name. Let’s call it splat. Now I’ll make a new function called splat, and put what we want to happen in here. We want the object to go away, so let’s disable it. But having them just disappear is a little rough looking. Thankfully, we already have an animation we can use to spruce it up. Earlier, we added our impact construct to FallingObject. It has a timeline called “splat." So now I’ll enable it, set the splat timeline influence to 1, and use a function called playOnce. This will play the designated function only one time. Save and … nothing happens. Since we're immediately disabling the entire object and the splat is parented to it, that gets disabled too. So instead of calling disable, we’ll set the visibility equal to false. This parameter doesn’t affect children, so our object will disappear, but the splat will still be seen. Now it’s looking like how we wanted. For good housekeeping, we should disable everything once the whole sequence is over. We can do this in the playOnce function, which takes a callback once it’s complete, just like a swooper. And we also need to make sure we set the visibility back to true or else we’ll end up with permanently invisible objects.
Now we’re getting somewhere. But this game won’t be any fun if all the objects fall from the same place in the same order. Let’s start by randomizing thier starting position a bit. I’m going to pause the live view and grab one of our objects. I want to drag it around to see what the boundaries of its x position should be. Looks like somewhere around -350 for left boundary and 920 for the right boundary. So we should try to randomize the x position within that range. To make things simple, I figured out some more or less evenly spaced positions for the objects to fall from, and made an array of them in the constructor. Now I just want to get a random index of that array to use each time an object is brought in. I got a little bit of help figuring out the math— these math functions are some javascript stuff that I won’t get into, but it basically gives me a random whole number between 0 and the max number of items in the array. In this case, that’s 8. So I’m going to set a local variable called “index" equal to that, and set the x position of my object to the value of that index in my array. We can use pretty much this exact same method to randomize the index of the objects that fall. I’ll just copy this line, and back in my projectMain, paste it into the drop objects function. I need to be looking at my names array here, and then replace my old index with my new variable. Alright, now we have random objects falling from random places, and it’s really starting to look like an actual game now. But there’s one more big step to take, and that’s having the chef actually be able to catch the objects.
So there’s a few things we need to know in order for this to work. We need to know the position of the chef’s hand at any given time, the position of the object, and whether or not they intersect. In the chef construct, his hand is seperate, so I'm going to access that using "descendants by name." But instead of doing “dot position” like we have been, we need to something a little different. The normal position paramater is relative to how an object parented, not the overall screen space it’s a part of. So we need to use the “GetGlobalPosition” function instead. This will tell us the object's absolute position wherever it’s moved to, regardless of its parenting. Since the chef could potentially catch any object at any time, we need to always be looking at all of the objects. Thankfully we already have a function that’s constantly updating. In the same way we are “listening” to what key is being pressed, we can have it constantly looking at where any object is. We just need to give it the right things to look at. We'll use another "for loop" which will run constantly. We’ll loop through the array of falling objects. Then we can use the “i” in this loop to get a specific one in the array. So to reference our objects in here, we’ll use “this.fallingObjects" with “i" in square brackets. The first thing we'll do is write an “i"f statement to only do something if the given object is enabled. Then we’ll get the global position of the object. Now we can decide where we want them to collide. Let’s just say if the hand and the falling object’s y position and x position are both equal, disable the falling object.”
Hmm, that’s not working. Since we’re only looking at a single coordinate, we have to be way too accurate in order for that collision to happen. What we need to do instead is look at a range of coordinates. Rather than doing exactly equals, I’ll look at whether the falling object is with in a 100 unit range in either direction. Alright, now the objects disappear if they hit the platter, and if they don’t they drop to the floor like normal. Might as well hook up our splat here too! We just need to add it to the “init" function and play it like before, except this time just be a little more specific with the positioning.
So the last part of this step is to show the items piling up on the platter. I’ve already made side versions of each item and put them in the chef construct. They’re parented to the right hand and disabled by default. I’ve also numbered them 1 - 30, which will help us know which one to turn on. At the same place where we disable the falling object, we can enable the side object. We just need to keep track of how many we’ve caught so the right one gets turned on. So in my init function I’m going to make a "number of items caught” variable and set it to 0. Then when I catch something, I’ll increment that number.
Now we can see them appearing, but they’re just the default ones I put in the construct. We need to make sure they correspond to the actual item that’s being caught. I need a way to get the name of the graphic being used on the caught item, so I’ll go back to "fallingObject" and in my “setFallingObject” function I'll define a new variable and set it equal to the name. Now back where we were in project main, I can reference that. All of my side view graphics have the same name as the falling objects, but with "underscore side” at the end. So I’ll make a local variable here called “sideName” and set it equal to the variable I just referenced from falling object and write “plus underscore side” in quotes. Now right below that I’ll copy the side item object we enabled, and set its graphic equal to nc.graphicAssets with my sideName variable in brackets. Now the side graphic appears according to the item we caught, but the item still has to pass through the whole stack in order to be collected. We want it to collect when it hits the top of the stack. To fix this, all we have to do is get the position of the top item of the stack, instead of the hand which is always at the bottom. Let’s just change our hand position variable to reference that instead.
Ok, we’ve got a chef you can move, and catchable items that randomly fall. We can really see our vision for this game coming together. To bring it home, I want to add a basic level system and a goal for each level, and then we’ll start polishing some of the movement, and add in some music and sound effects. We’ll get into all that in the next part.
I ran some ideas by the Incisor team, and we decided that each level should be a recipe order that the chef is trying to get ingredints for. If you catch all the right items on the receipt, then you move on to the next level. So I made a reciept that can live on the left side of the kitchen, and an “OrderLine” construct, that contains elements like the item number, which ingredient, and whether it’s been collected or not. Since all the order lines are duplicates of each other, the first thing I have to do is use code to change their numbers so they don’t all just say 1. I’ll just loop through the number of OrderLines on my reciept and set the string of each text box equal to that number in the loop. Ok, next I want to populate my list with some random bad food objects. I’m going to make a new array with just the names of the bad objects in it. Now back in my loop I’m going to get a random number using the same math we’ve used before, but give it my bad objects array. Now I’ll just set the graphic asset equal to the index of that random number. With that all set up, we need to create a system that keeps track of whether I’ve caught the right object. So I’ll make an empty array to hold my current list of ingredients, then push all the badObject names into it. I’m also gonna add one more variable called "current order line." This will come in handy in a second.
Back where we set up the code for catching an object, we can also check if we’ve caught the right one. I just need an “if" statement that looks at whether the name of the object we caught matches the name of the object we’re aiming for. I’ll use my current order line variable as the index of the ingredients array I made before. To show the player that they got it right, I’ll enable this “Check" graphic that’s a part of the orderline construct. I also need to increment the current order line so next time we’re looking at the right object. Now I’ll make an else, and play an “Xflash” timeline that’s also a part of the order line construct. Lastly, I have a box around the current item needed that moves down as you complete the order.
After getting some feedback, it seemed like I needed to make things a little more obvious. So I added a new construct with a timeline that would bring up a “good job” or “wrong” message. The timeline is called “toss” and I just enable the right message according to the situation.
I also decided to implement a scoring system, where you get points for catching the correct item, and lose points if you don’t. I used a loop to add scores that increase by 100 points to each line item. Now I just need a variable for the current score, and an array of scores. When I catch the right item, I’ll just add the index of whatever line I’m on to my score tally, and set the string of my score equal to that. If I catch wrong, I’ll subtract half that amount of points from my score.
My next step was to enable a success or failure screen for the end of each level, and I went ahead and made a construct for each of them, making sure to add the restart and continue graphics as buttons. I’ll get into that in a little bit. I decided that if you catch 20 items and you still haven’t completed the order, then you fail the level and you have to try again. I’m already tracking the number of items caught, so I’ll just use an "if" statement to check that number— this will be for if you fail. Otherwise, you made it to the last line item and that’ll be what I check if you succeed. Now I’ll make a function called “roundComplete" that I’ll give “false" if you fail and "true" if you succeed. Inside this function, I’ll reset elements of the game. I’ll start with stuff I know needs to happen no matter what. I’ll remove the fixedUpdate callback we made a while ago so you can’t control the chef until you proceed. I’ll also use a function called “stopAllWaitThensByCallback" to stop new items from falling. I’m going to reset a bunch of indexes back to 0, and reset the position of the highlight box. I’ll loop through all of the items on the chef’s platter and disable them, and do the same for all the check marks on the recipe list and any objects that might have still been falling. I’ll set the chef’s animation back to idle as well. If this function received “true," I’m going to enable the success screen I made, and get a new list of ingredients for the next round. I’ll do that in the exact same way as when you first start the game. If we get “false," I’m going to enable the fail screen, but keep everything else the same so you can try the level again.
Back in our init function where the constructs were added, I’m going to take advantage of the buttons I mentioned earlier. I’ll use an “addReleaseCallback" function on the buttons inside my fail and success constructs. This will execute a function when the left mouse button is clicked and released on this graphic. I’ll call my function “start.” In my start function I’m going to re-add my fixedUpdateCallback so we can control the chef, and use a waitThen to kick off the dropObject function to get objects falling again. Now we’ll be set up for the next round.
This is all looking good, but I think the whole game needs a start screen so the player isn’t launched right into everything right away. I made a title screen construct with a play button, and added it to my init function. Now I’m also going to make sure the kitchen is disabled upon loading, so we have a clean background behind our title screen. I’ll add the “start" function to the play button, and enable the kitchen in there. I’ll also disable all the screens you’re not supposed to see while playing the game.
Okay! I think we’ve finally gotten everything we need into this game. Now there’s a few things I want to do to really polish it up. We have a system set up for changing levels, but right now levels don’t really mean anything— I want the game to get harder the more levels you play. So I’m going to add a level and difficulty variables to my “init" function. In "roundcomplete", I’ll increment the level when we’re successful, and set the level number on the receipt to the level we’re on. I think the best way to make the game harder would be to have the objects start falling faster. I’m going to try out having them get 10 percent faster each level, so I’ll decrement this by .1. Now back in my FallingObject class, I’m going to multiply the duration of my swoop by my difficulty variable, which I can get to with the prefix “pr.” Now every new level we reach, the time it takes for the items to reach the bottom will increase by 10 percent.
I’m also gonna do a couple visual things. I want to make the chef’s movement a little less jerky so that it matches what what we did with the animations better. So I’ll put a speed variable on the chef and multiply his position by it. While he’s running, I’ll increment the speed by .01 and limit it to 1. Now we can see that the chef ramps up into his run. We just need to make sure to set this back to 0 when we’re not pressing a key. I also want to give the falling objects a little more motion, so let’s make them spin as they’re falling. I’ll just go back to FallingObject and swoop the z rotation of the object over the same amount of time it takes to them to fall. I’ll need to set the rotation back to zero in setFallingObject as well. I think this is a good time to hook up the shadow graphics I made back in Part II. My goal is to make the falling objects look like they’re passing behind the cabinets, and show the shadow versions when that’s happening. I can set this up using Incisor’s masking system. Inside my kitchen construct, I added some rectangles that cover the cabinet areas. Using the object panel, I’ll go to the “GraphicObject” section, and open the “masking” menu. Check the “enabled” box, and set the type to “mask.” Under mask groups, make sure “MainMaskGroup” is checked. Then I’ll save the project within the Inspector. Now I can use these graphics to mask the objects and reveal the shadows as they fall behind the cabinets. Back in my FallingObject code, I need to make any falling object obey this mask. I'll type “this.masking.MakeMasked” with open parentheses. I need to give it the mask group I checked earlier, and say whether I want Incisor to invert the masking. I’m going to say true, so that when the object crosses the mask, it disappears. Then I need to do this same thing for my shadow, except set the inverting to false, so it only shows up when it’s inside the mask. Ok, it looks like the masking is working, but my shadows are still just white boxes. So in my “setFallingObject” function, I just need to set thier graphic asset with “underscore Shadow” at the end of the name. I’ll save the code and make sure that it’s all working as intended.
Ok, we’ve got some more polish on the movement, and life to the objects, but this isn’t a silent film! The last thing we need to do is get some sounds in here. I worked with a composer to come up with some music and sounds that fit the theme of the game. Implementing sounds is a lot like playing timelines— we’ll mostly be using play and playOnce functions. We also have a swooper specific to sounds called swoopVolume. After adding all the sounds to the assets of my game files, I’m going to set the volume of the title music and play it— that’ll be the first thing we hear. Now in my “start" function I’ll play this bell sound for when the play button is pressed, stop the TitleMusic, and play the BaseGame music. I’ve got some footstep sounds for the Chef, so inside the chef controls I’ll play those when we’re running, and swoop them down when we stop. For catching the objects we want, I’ll play the bell sound, and for the wrong object I’ll play this buzzer sound. I want to have specific sounds for objects falling to the floor, so I set up a “play sound" function with a bunch of if statements. This gets called in my “splat” function. I’m getting a random number that’s either 0 or 1, and using that to call one of two sounds for each type of object.
With all that done, we now have a complete game! Thanks for going on this journey with me— I learned a lot about using Incisor and game development during this process. Make sure to check out incisordev.com, where you’ll be able to play and download the code for this game! There’s also a bunch of tutorials there, that go even deeper into some of the things we talked about in this video. I had a great time making Fork Your Food, and I hope you enjoyed following along with the showcase too. See you later!
----------------------------------------------------------
Section 23: Showcase - Poker
----------------------------------------------------------
Audio timing: (Play the Clark_Poker_1.wav and the Poker UI video at the same time.)
0 to 1:13 - Intro
1:14 - Playing games
1:36 - turn off game audio and autoplay
1:46 - Guarantee hand
2:16 - Customize interface
2:30 - panels can be opened and type of panel
2:42 - Tool Tips
2:55 - Card0 selected
3:18 - GameLogo Event Animation
3:28 - Particle Pannel
3:50 - Hierarchy Pannel
4:20 - Graphic expander
4:40 - Paytable background box
5:00 - Gamelogo Timeline
5:31 - Idle state - Scrub timeline - Play - Curve mode
5:43 - Paytable - Royal Flush - change position, rotation and scale
Code (Start playing the Poker Code video here.)
6:41 - Init function in Project Main
7:10 - Adaptive Camera
7:24 - Project settings
7:29 - Remove Adaptive Camera
7:35 - NC and PR
7:50 - Game Construct
8:00 - ContructGetter
8:09 - Game Audio
8:20 - Poker Logic and Client
8:40 - Poker. run()
8:46 - Logic Events - defineAppEvent-
9:18 - Client events - Callback - requestDeal
9:45 - gaffHand
9:56 - AddMotion
10:31 - Swoop
The full script can be found here. https://docs.google.com/document/d/1vPgAuV61Xv47FdaI1r6yxxvZXRW_trCSlVNLrx1EMmM/edit?usp=sharing
Greetings and welcome to the Incisor Draw Poker demonstration. This complimentary project is here to help you dive into creating games and experiences using Incisor's powerful development tools and APIs. The game made its debut at the 2025 ICE Conference in Barcelona, where we showed it off running on both slot machines and mobile devices.
In this demo, I’ll play through a few hands of the game so you can get a feel for the rules and features. After that, we'll take a brief look at some of the key concepts behind building the game. And finally, we’ll go over how you can get your hands on it and start experimenting yourself.
Before we get started, if you haven’t already, be sure to visit incisordev.com to download the latest version of Incisor and explore the instructional tutorials. They’ll guide you through the basics, help you get started, and further examine some of the more detailed topics we’ll cover in this video.
Incisor Draw Poker was modelled after the traditional draw poker games many of us are familiar with. The rules involve placing a bet, receiving five cards, and deciding which to hold or discard. You aim to create the highest-ranking poker hand possible and winnings are paid out according to the pay table.
I’ll start by playing a few hands and walk you through some of the key components. To get going, click "Deal", "Play 5 Credits," or just hit the Spacebar. You can adjust your bet size using the Bet Up or Down buttons. There’s an automatic hold feature, but you can always deselect any held cards. When you're ready, press the Draw button to replace any cards you didn’t hold. Winning hands will be highlighted on the Paytable and above the cards. If you want to turn off the game audio, just click the speaker button, and you can enable autoplay by hitting the play button.
If at any point you want to guarantee a winning hand in the next game, just click on the name of the hand you want from the Paytable. The selected hand will be highlighted to confirm your choice, and you’ll win that hand on your next deal.
Now that we've seen the game, let's explore how it was built. We’ll take a brief look at some of the core principles behind it. This tutorial won't go into great detail, but future tutorials will dive deeper into each of these topics.
First up, let’s explore the Incisor User Interface.
As you can see, the Incisor interface is fully customizable. It features a variety of panels, each offering different views, tools, and properties to suit your development needs. You can even design your own custom panels to provide the specific functionality you require throughout the development process. Panels can be selected HERE, and you have the flexibility to place and move them wherever you like. Let’s take a look at a few examples.
The Tooltips panel offers detailed information when you hover over an item. You can see the tooltips in action as we navigate through different elements in the Object panel. For example, we currently have CardLocation0 selected, which is also visible in the Hierarchy panel.
The Live View is an invaluable feature, allowing you to instantly preview changes without the need to publish the game, streamlining your workflow.
In the Construct panel, you’ll find a collection of objects that can be animated within the Timeline panel. To view an animation, simply select a state. By default, it's set to NeutralState, but let's switch it to Event. Now, you'll see the animation in the Timeline.
The Particle panel lets you create dynamic, real-time particle effects. For instance, if I select CoinFountain, you can observe the effect change as I remove and then re-add Particle 1.
These are just a few examples of the many panels available. Feel free to experiment with different panels and layouts to create a personalized Incisor development environment that works best for you.
Now, let’s use the UI to explore the game’s hierarchy. At the root level, we have the MainScene, which contains a single orthographic camera. The Game Construct serves as the master construct, housing other constructs and graphical elements. Notice that each card is treated as a separate Construct, while the paytable is added directly to the Game Construct.
We can also dive deeper into other Incisor components used in the creation of this game to understand how everything fits together.
We’ll start by focusing on the Incisor Graphic Expander. Graphic Expanders are a great tool for creating dynamically sized graphics without stretched edges, and they do so with significantly reduced download size and load times. They also lower the graphics card memory footprint and boost overall performance. This game makes extensive use of Graphic Expanders.
Let’s take a look at one of the background boxes on the paytable. I’ll open the Object Inspector and adjust the properties of the background’s Graphic Expander so you can see the asset change in real-time. If we set all properties back to zero, you’ll see the original image. As you can see, using Graphic Expander results in a pretty significant reduction in size.
Next, let’s check out some of the game logo animations. The animations are created using Incisor’s Timeline editor, along with the Swoop and AddMotion APIs. All the particle effects are generated in real-time, which means there are no sprite animations or pre-recorded videos used in this game.
I’ll open the Construct and Timeline editor, along with the Live View, to give you a closer look.
In the Construct window, I’ll select the game logo. By default, the neutral state won’t automatically load in the Timeline, so we’ll change it to the Idle state. Scrubbing through the Timeline lets you view the full animation, and hitting play will loop the animation so you can see it in action. If you switch to curve mode, you’ll also see a graph of the values controlling the animation.
The paytable is created using Incisor TextBoxes, which makes it data-driven and allows for real-time swapping. This approach also helps reduce both download size and memory footprint. I've selected the Royal Flush TextBox, and its data will appear in the Object window. You can adjust properties like position, scale, and rotation, along with other data. These changes are temporary and can be cleared by refreshing the screen.
There’s still much more to explore within the Incisor UI and Inspector. You can even add your own custom elements using Incisor Extensions, which we'll cover in another video.
Alright, let’s jump into some code. I’ll be using VS Code—it’s my preferred editor, but it’s definitely not a requirement.
We’ll start with a high-level overview of the key elements of the code, beginning with the entry point for every Incisor application: the init() function in ProjectMain.js. Draw Poker is written in JavaScript, but Incisor also supports TypeScript, so if you're interested, check out the tutorial videos for a walkthrough on setting up an Incisor TypeScript project.
Following best practices, the game’s logic is separated from the interface. It’s built using object-oriented principles, with all the code organized into different class files and packaged logically.
Starting with the very first line of code, we set the main camera’s adaptive camera to "maximize safe zone." This ensures the game resizes to fit the browser window and uses the Core Canvas Resolution X and Core Canvas Resolution Y settings. You can adjust these values by going to Project > Project Settings. I’ll go ahead and remove this line to show you what happens when it’s not there.
You’ll also notice the frequent use of "nc dot" throughout the code. "NC" stands for Incisor, and it’s the key to accessing all of Incisor’s internal functions. You’ll also see "PR" used often — this provides a way to access globally scoped variables that were initialized inside the ProjectMain init() function
The next line retrieves an instance of the Game Construct. This is the main construct for the entire game, and it includes other nested constructs within it.
We use constructGetter as a helper to simplify the function call for descendantsByName.
As for the game’s audio, it’s synchronized by starting all of the looping sounds at the same time, and then the volumes are gradually ramped up and down. The sounds index helps with keeping everything in sync.
As previously stated, the game’s logic is kept separate from the user interface, which is crucial for a production game. This separation allows for the use of a mock client or a logic simulation module to test the game, or to let a client engineer work independently from the backend developer.
The two parts communicate by sending custom Incisor AppEvents.
When you call the PokerLogic run functions, it kicks off the entire game cycle.
The game logic handles just two events.
The init game event is used only at startup to provide the client with all the initial values for the meters.
The game outcome event is sent every time the Deal or Draw button is pressed.
It sends all the necessary data for that part of the game, like the evaluation results, the cards to be displayed, and the bank. These events are built into the game logic, and they can be sent out as needed. To define custom events, we use nc.defineAppEvent("InitGame").
The game logic also listens for three client events by using a callback. This is done by calling nc.appEvents, followed by the name of the event you want to register or listen to. The client triggers the "requestDeal" and "requestDraw" events. It’s important to note that the game logic always maintains control, as the client can’t be trusted. So, when the request deal event is triggered, the logic’s process deal function is called.
As we discussed earlier, you can manipulate the cards for upcoming games. By pressing the winning hand, the request gaff event is triggered, and the pay category for the chosen hand is passed.
For more info on AppEvents, check out the Incisor tutorials page.
Now let's look at motion.
AddMotion creates continuous movement, but you can adjust or stop it by modifying its influence. This function returns a motion object. To make it more dynamic, we add a new variable called scaleMotion to the handNameText and assign it the motion object. Now that we have access to the motion instance, we can tweak its influence to create smooth fade-in and fade-out transitions. In this case, the value is set to 1 for full motion, and it’ll be set to 0 when we want to stop the motion.
Lastly, let’s take a look at swooping.
Similar to AddMotion, swooping interpolates a numeric property over time. The key difference is that, unlike AddMotion, swooping is finite—it doesn’t run continuously. In this example, we’re swooping the alpha value of the text box, gradually fading it down to zero. This creates a much smoother, more visually pleasing effect than instantly turning the visibility on and off.
And that’s a wrap! You’ve just seen a complete game built with Incisor, showcasing many of its capabilities. This game can serve as a great starting point to boost your knowledge and help you start building your own Incisor applications.
To download...
Thank you for watching. Enjoy creating with Incisor!
----------------------------------------------------------
Section 24: Sounds
----------------------------------------------------------
Sounds - Javascript - Hello, and welcome to this tutorial for the sounds API in Incisor. - Implementing sounds in Incisor is intuitive and flexible. - This tutorial will cover: - Adding a sound asset to your project - Using playback functions to control individual sounds - Defining a volume control - Creating dynamic volume char nges - And syncing multiple sounds together. - Let’s open the directory of the project we want to add sounds to. - To add sounds to our project, simply drag and drop files into the project’s assets folder. - Sounds must be encoded in the .wav filetype. - For the purposes of this tutorial, I’ve set up a few buttons that will control our sounds. Check out our tutorial on buttons for more information. - To access a sound, type nc.sounds and select the intended asset from the list of auto-complete suggestions. - Now we’ll take a look at basic playback functions. - .play() will play the sound and loop it continuously. I’ve assigned this to our control 1 button. - Now I’ll assign pause() to our control 2 button. Calling .pause() immediately pauses the sound, and allows us to resume playing the sound from the point at which it was paused. Now I’ll change pause to stop. .stop() immediately stops the sound and starts it from its beginning when played again. - Now I’ll change play to playOnce. The sound will play one time through and then stop. PlayOnce also accepts a callback function as an argument, which will be triggered once the sound reaches its end. Here I’ve set it to call a function that changes the color of the button. - The mainVolume parameter sets the volume of an individual sound, with 0 being silent and 1 being the original volume of the sound. - Any sound can be assigned to a volume control. This allows us to change the volume of multiple sounds at once. - To create a volume control, call nc.defineVolumeControl, using a string as the name. This will return the new volume control. It can now be found using nc.volumeControls. To make this volume control modify the sound's volume, push it on to to the sound's soundControl array. - One useful way to manipulate sounds is by using Incisor’s “swoopValue” function on a volume parameter. This way we can create dynamic fades and volume changes with specific timing. I’ll assign the volume control we just made to another sound. Now I’ll use swoopValue on the volume parameter of the volume control, setting the volume control as the object, volume as the parameter, 0 as the end value, and 2 as the duration. Now when I click on control 2, the sounds will fade to 0 over 2 seconds. - we can also set the playback rate of a sound. This will change the speed and the pitch of the sound. The default playback rate is 1. - HTML5 can introduce small delays between the instructions to play sounds, and when the sounds actually play. This can cause looped sounds of different lengths to get out of sync over time. - The “defineSyncedLoopingTrackGroup” function can be used to sync multiple sounds together and eliminate these delays. This is useful for mixing dynamically between different layers of a soundscape that are meant to loop constantly over long periods of time. - To sync our sounds, we simply call nc.defineSyncedLoopingTrackGroup(), name the group using a string, and list the sounds we want to sync in an array. - I’ll put a playback rate change on control 2. When played simultaneously, the sounds will synced with each other, even if the playback rate or other parameters are changed. - This concludes the tutorial for the sounds API in Incisor. - Don’t forget to check www.incisordevdocumentation.com for more tutorial videos, and feel free to leave questions and feedback on StackOverflow and our SubReddit. - Have fun creating with Incisor!
----------------------------------------------------------
Section 25: SpriteSetter
----------------------------------------------------------
Sprite setters
Sprite Setters are Incisor's main way of controlling frame based animations
First, make sure the frames of your animation are named with sequential numbers at the end of each asset.
Then select the graphic object and in the object panel, choose Configure Add-On and select Sprite Setter.
Incisor will automatically associate all the numerically sequential assets with your animation.
Now you can play and adjust your animation in real time.
----------------------------------------------------------
Section 26: Swoopers
----------------------------------------------------------
Hello and welcome to the Swooping in Motions tutorial for Incisor.
In this tutorial, we'll cover:
What swooping and adding motion mean in Incisor.
Basic examples of how to swoop and add motion.
How to use motion types to control the nature of the motion.
How to use tween types to control the Swoopers interpolation method,
and finally, how to add custom tween type code assets to your project.
In Incisor, motion and swooping are both ways to interpolate numeric values over time.
The difference between the two is that motion is unending, while swooping is finite.
This could apply to properties like an object's position, color, scale, or any other numeric property.
Let's go ahead and look at a few examples.
I've opened up a new Incisor JavaScript project.
If you're unsure how to set that up, be sure to check out our Getting Started video.
For our first example, we'll create a simple motion that continuously updates the color of a box.
I will remove the out of the box code that every new project starts with.
Now let's start by creating a simple graphic object and using the white box asset.
Now we'll add motion to the color multiply property of the box.
Specifically, we'll update the red, green, and blue color channels.
Notice that the lower and upper bounds for each of the color channels are set to cover the full range from 0 to 1.
The key difference here is the motion speed parameter.
By varying the speeds of each color, we create a sense of random color changes.
Let's save it and check out Live View.
As we can see, the box continuously changes color; and because motion is unending, this will not stop.
Now let's make the box move.
We'll use the same graphic object, but this time we'll add motion to its position property.
The Each function allows us to define lower and upper bounds for the x, y, and z coordinates as arrays.
Let's save the project and check out Live View again.
Great. Our box is now moving back and forth continuously within the bounds we set.
But what if I want the box to move in a circular motion instead?
This is where motion types come in.
Motion types in Incisor are fully customizable, but we also provide a few built in types that can save you time.
Let's look at the library tab.
Here you'll find a variety of tools you can import directly into your project.
I'll select motion types and then import move in circle.
Now that we've imported the moving circle motion type, we can apply it to our existing motion.
Earlier, when we added motion to the position. we got back a motion instance.
We can now update this instance with our newly imported motion type.
And that's it. Let's save the project and check out Live View to see it in action.
Now we have our box spinning in a continuous circle, but let's take it a step further.
We'll dynamically increase the speed of the box as it moves.
So far we've been using specific motion functions like the each function on the position property of our graphic object, but with Incisor, we can apply swooping to any numeric property on any object using nc.swoopValue.
To make the box speed up as it moves, we'll use nc.swoopValue on the motion speed property of our motion instance.
Now save your changes and watch as the box accelerates to a speed of ten over 10 seconds.
Okay, now that we've covered motion, let's move on to an example of swooping.
We'll create another graphic object.
Next, let's swoop its position by providing an array of its ending values and the duration.
In this example, we'll swoop the box to the position 300,300,0 over a period of five seconds.
Let's save it and check out Live View. We now have a second box that moves from the center up to the right over five seconds, and then stops.
The swoop is complete, but just like with motion, we can change the way the box moves using a tween type.
Let's go back to the library.
Select tween types and choose Import WindupOvershoot.
Now let's go back to the code and make the swoop more interesting by adding the WindupOvershoot tween type to the each function.
Let's save the project and check out Live View again.
Notice how the white box first moves down and to the left, which is the wind up.
Then it overshoots its intended destination before returning, creating the overshoot effect.
Now let's wrap up with one last concept.
The swoop completion callback. In many cases, you'll want to be notified when an event or action has completed.
The completion callback allows you to do just that.
Let's add two more parameters to the each function.
The callback owner, in this case this and the name of the callback function.
Next, we'll implement the callback and display a textbox when the swoop is finished.
Save your changes, then check out Live View to see it in action.
And there you have it.
We've covered how to add motion, swooping, and how to use custom code assets like motion types and tween types to create dynamic animations.
Check the link in the description for more tutorials, and feel free to leave questions and feedback on StackOverflow and our subreddit.
Thanks for watching! Enjoy creating with Incisor.
----------------------------------------------------------
Section 27: TextAssemblies
----------------------------------------------------------
Text Box and Text Assembly
2024.10.01
- Hello and welcome to this Text Box and Text Assembly tutorial.
- In this tutorial we will cover
- Creating a Text Assembly and a Text Box
- Adjusting the size of the Text Assembly and Text Boxes
- Explaining some of the justifications and customizations available
- How to change the displayed string
- And a fundamental difference between a Text Assembly vs a Text Box
- This video also assumes you have watched either the "Getting started with Javascript" or "Getting started with Typescript"
- All code examples shown will be in Javascript.
- Create and open a new project in Incisor®. Once open navigate to ProjectMain.js in the Project Code folder of your project.
- To start a Text Assembly and Text Box have many similarities.
- They both have the ability to have their font, scale, alignment, wrap mode, and many other parameters set.
- They also have a fairly fundamental difference, which we will discuss soon.
- We are going to start with a completely blank project so please delete anything in the init function of the ProjectMain.js file.
- In the init function create a new Text Assembly.
- You can set the string of the Text Assembly directly, in this example we will set the string to "Text Assembly String".
- We are going to set the colorMultiply of the created text assembly to 1,0,0,1. This will change the text to red.
- We will also move the Text Assembly up by 200 units, we will now save to update the live view.
- Similarly we will create a new Text Box, set its string to "Text Box String" and set its color Multiply to 0,1,0,1 making it green and then moving it down 200 units.
- The different colors and strings are for demonstrative purposes only.
- In both a Text Assembly and Text Box we can set the Box Width or Box Height of both types of objects. This can be set in the "Text" section of the object inspector when you select your Text Assembly or Text Box.
- If either box width or box height are set to 0, then the text assembly and text box will be 'unbound' in that direction. This means that the Text Assembly and Text Box will expand in those directions so that the full string is shown.
- You can set the all parameters either through code or through the Object Inspector. Please note, any changes made through the object inspector will be lost upon refresh.
- We will set the Box Width to 500 and the box height to 250.
- By changing either the horizontal or vertical justifications we can ensure that our string is shown exactly how we want it to be.
- By changing the box width to 250 we can begin to explore we get our text to always show up in a given size.
- When setting a box width or box height you can also set if you want the string to wrap or scale to fit into the described areas.
- When we turn off wrap to fit, and leave scale to fit enabled it will shrink the text to be visible within the bounds you set.
- When we turn off scale to fit and turn on wrap to fit you can see the text wrap to the next line.
- Now let's undo these changes.
- Using the Object Inspector in Incisor we can see one inherent difference between a Text Assembly and a Text Box.
- In a Text Assembly, each character is a separate object, in the hierarchy.
- This means, each character in the string can have its position, scale, rotation, effect controllers, and many other aspects edited independently from the other characters. Lets move and scale up the A
- This provides the ability to customize each character individually at the cost of more objects in the hierarchy.
- In a Text Box, all characters in a string are treated as a single hierarchy object.
- In general, the fewer objects in your project the more performant your project will be.
- This allows a lightweight way to show long strings that does not add unnecessary objects to your project.
- However you will not be able to edit the position, scale, rotation, etc of individual characters in a Text Box.
- A further difference is how you edit the strings through the Object Inspector.
- Both a Text Assembly and a Text Box can have their strings edited from the string field in the Text section in the Object Inspector.
- Let's edit the string of the Text Box first.
- Now we can edit the string of the Text Assembly.
- Please note, that when you edit a string in this way, any scale and position changed you have made to individual characters will be reverted.
- With a Text Box, you can also edit the string through a cursor or mouse by changing the Text Box's edit mode.
- Now when selecting the text box you can type directly into the text box to update its string.
- This concludes the Text Assembly and Text Box tutorial.
- Don’t forget to check www.incisordevdocumentation.com/videotutorials for more tutorial videos, and feel free to leave questions and feedback on StackOverflow and our SubReddit.
- Enjoy creating with Incisor!
----------------------------------------------------------
Section 28: Timelines
----------------------------------------------------------
001
Hello, and welcome to this Incisor tutorial about Timelines.
This tutorial is a great follow up to our video covering Constructs.
Incisor’s graphic user interface allows artists and animators to contribute directly to the apps and games developed with Incisor without code.
One of the most useful ways in which Incisor empowers designers is by adding timelines to a construct.
Using the Incisor GUI panels, let’s get set up for this tutorial….
002
Next, we are setting up a Construct - called Sample Construct - with two graphic objects.
In Neutral State of my Sample Construct, we will manipulate the two instances of White Box so that they appear as a red square and a blue rectangle.
We can do this easily by Using X scale and manipulating the Color Multiply Effect Node of each of our objects.
Using the hierarchy panel, we will also place the blue rectangle inside a SceneObject which acts as a container.
Once we have an Incisor construct set up, one or multiple timelines can be added to it, allowing for dynamic, key frame based animation.
003
Now let’s add a timeline to this construct.
By clicking on Manage Timelines, the timeline manager appears and we can see the option to add a timeline….. and now name it. Let’s call this timeline, Idle.
Now when we click on Neutral State in the Construct Panel, we can select our new timeline.
This changes the construct view from Neutral State to the our new Idle Timeline.
By clicking inside the construct panel, the hierarchy panel now changes form reflecting the neutral state to reflecting the timeline view, which is indicated by the header. The hierarchy is no longer editable - as changes to the construct’s setup need to be done in Neutral state - but this list can be used to select scene objects.
With a timeline panel open, notice it is also populated with our new timeline called “Idle”.
004
Everything in our construct appears in the timeline list, ready to be animated with keyframes.
The timeline panel header is where we can setup the parameters of our current timeline - the basics of which are length and playback rate - as well as use playback controls to preview your animation.
Let’s set our timeline to be 2 seconds long and keep the playback rate at 1.
There are also tools to control how our timeline list of scene objects can be viewed. Collapsing, filtering, and sorting all help navigate the timeline list - especially when our constructs have a lot of content and your animations become more robust.
A basic example is the sorting toggle. The list of scene objects can match the hierarchy of the construct, or be listed alphabetically.
There are three main categories of keyframes: numeric, boolean, and invocation keyframes.
We’ll cover invocation keyframes in a later video about advanced timeline techniques.
Numeric keyframes are keyframes that require values, such as scale, position, or even color. Boolean keyframes appear as checkboxes for enabling or disabling scene objects or for toggling visibility on and off.
The timeline panel functions as we would expect, with time markings, an indication of our animation’s beginning and end, and a playhead. Like all other panels within Incisor, spacebar allows us to pan and zoom.
005
Let’s first add some common keyframes and get to know animating with the Timeline panel.
By right-clicking on a scene object in the timeline list, we can see what is available to keyframe. Let’s add a position Y keyframe to our red square scene object.
By adding the position Y parameter, we can now keyframe that parameter by clicking the add keyframe button.
Let’s add some keyframes to animate the scene object on the Y axis.
Once a keyframe is placed, you can right click on the keyframe to add preset easing. Let’s make this scene object’s Y position ease in to the second keyframe.
For more specific motion design, we can toggle the view between keyframe view and curve view. This allows us to tailor the motion between keyframes with familiar handles.
006
Scene objects being used as a container can also be keyframed, as well as effect nodes that have been added in neutral state.
Let’s add some scale keyframes to our container scene object.
And now some X position keyframes to the blue rectangle scene object within the container.
Incisor Effect Nodes and add-ons are also able to be keyframed.
Let’s animate the color multiply effect node on our objects and keyframe them to change the color of our objects during this animation.
As mentioned before, we can preview our animation with the playback controls. Let’s preview it now and also change the playback rate.
We can see the timeline list filtering more effectively now that we have some animated parameters.
007
Incisor constructs and timelines combine to create a powerful dynamic animation tool and allow artists, animators, and engineers to collaborate seamlessly.
Once a construct has one or more timelines, auto-complete will reflect their existence in project code, thanks to Incisor’s dynamic documentation feature.
Enjoy animating with Incisor!
----------------------------------------------------------
Section 29: Trimming
----------------------------------------------------------
Trimming is a technique used to reduce both the download size of a graphic and the number of pixels rendered for the graphic.
With trimming, we eliminate unnecessary portions of an image or geometry that won’t be visible in the final render.
This process helps improve rendering efficiency by cutting out parts of the asset that won’t contribute to the final image.
This, in turn, reduces overdraw. By removing these invisible areas, we eliminate calculations for pixels that won’t ultimately be displayed, saving valuable resources.
In Incisor, there are three distinct trimming modes: None, Rectangular, and Hugged.
To showcase this, I’ll be using a red circle with a white border.
I’ve already opened the Asset Browser and the Asset Settings panel, where I’ve selected the red circle asset.
Now, let’s locate the Trim Mode property in the Asset Settings panel. By default, this is set to Hugged.
You’ll notice that the blue border wraps closely around the visible parts of the circle, trimming away many of the extra transparent pixels from the original rectangular image.
We can also fine-tune how tightly the border hugs the image using the Trim Buffer property. If I increase this value to 50, SAVE and REFRESH LIVE VIEW, you’ll see a larger buffer zone between the image and the border.
Notice how in this example, the increased buffer has NOT gone beyond the bounds of the original image, so it has created a sharp line at the image edge. If this is undesired, we can enable the "allowAdditiveTrimBuffer" setting.
This allows the trim buffer calculations to add extra pixels to the image so that enough buffer pixels will exist. I can also make this a negative value, allowing us to cut into the image if necessary.
The Rectangular option keeps the original image’s rectangle intact, but it still trims away many of the extra transparent pixels. Meanwhile, the None option disables trimming entirely, leaving the original asset unchanged.
----------------------------------------------------------
Section 30: UnitsPerPixel
----------------------------------------------------------
As an enterprise-level development platform, Incisor offers a variety of ways to optimize your application and boost development team efficiency.
One powerful feature is Units per Pixel Geometry Scaling, which allows for easy image scaling without the need for code changes.
While images are often scaled dynamically using the Incisor API, especially with a variety of swooping or motion effects, there are times in large projects where a particular image needs to be scaled without requiring a full code overhaul.
In this case, we’ll use Units per Pixel scaling.
To demonstrate, I’ll be using 2 instances of the Incisorsaurus. Both instances reference the exact same leg asset.
I’ve opened the Asset Browser and Asset Settings panel, and selected the leg asset. Here, I’ll locate the Units per Pixel X and Units per Pixel Y properties, which are set to 1 by default.
Now, I’ll change both values to 2. After saving the project and refreshing Live View, you’ll see that the leg has been scaled on both dinosaurs, all without making any changes to the code.
----------------------------------------------------------
Section 31: WaitThens
----------------------------------------------------------
Hello and welcome to this waitThens tutorial in Incisor.
waitThens are a very simple yet powerful tool included in the Incisor API.
In this tutorial we are going to cover: Creating waitThens, activating created waitThens, stopping created waitThens, non-pooled waitThens, and stopping non-pooled waitThens.
In Incisor, a waitThen is used to schedule a delayed callback, which is similar to JavaScript's Set timeout function.
The only difference between the two is that Incisor waitThens are compatible with Incisor's pausing and speed control systems.
Now that we have the basic idea of waitThens, let's check out some examples.
I've opened up a new JavaScript project.
If you're unsure on how to set that up, be sure to check out our Getting Started video.
Before we start using waitThens, I'm going to first remove the out of the box code that each project starts with, and set up our scene with some boxes to visualize what's going on.
Okay, you can see here I created two boxes, one white and one green, and offset their y coordinate positions to give a better view of each.
Usually when you want to call a waitThen, you use nc.waitThen.
In this function call takes the following parameters: duration, which is in seconds, callback owner, callback name, any callback arguments, name, pause immunity, and speed controls, which I mentioned earlier.
So we don't have any functions yet to call, so we can't use this waitThen function just yet.
Let's make a function to add some motion to the white box.
Okay, now here we have a function called add motion to white box, which takes two arguments: motionSpeed0 and motionSpeed1.
The function itself simply adds two motions, one for the white box's X position and one for the white box's Z rotation.
If you're unfamiliar with motions, please be sure to check out our tutorial on motions and swoopers.
Okay, back to the waitThen.
We are going to call our function we just created using nc.waitThen.
I'm going to pass in 1 for the duration and seconds to wait. This as the callback owner, our function name as the callback name, and then an array with .2 and .05, which are motionSpeed0 and motionSpeed1, respectively.
Now saving and going back to Incisor, we see that after one second, the white box on top will start moving and rotating.
In general, you will usually want to use nc.waitThen to schedule delayed callbacks in your Incisor projects, as this method makes use of an internally pooled group of waitThens.
However, there's also another way to call a waitThen in Incisor, which I will show you now.
First, I'm going to create a new function to add some motion to our green box.
This function is similar to the first one we made, and now we are adding motion to the green box's x and y positions.
Now the other way to use waitThens in Incisor is very similar as you will see here.
First we make a new waitThen object using new.waitThen and then pass the name of our waitThens into the constructor.
Now similar to using nc.waitThen, we can call the activate function on our waitThen object, and it takes the exact same arguments as nc.waitThen.
So let's call activate using a three second delay.
Again, using this as the callback owner, add motion to green box as the function name, and an array with .25 and .5 as the parameters.
After saving and going back to Incisor, we'll see the green box start moving after a three second delay.
And there it is.
Now what is the difference between the first and second way we use the waitThens in this tutorial?
The second way we made a waitThen does not make use of the internally pooled waitThens and instead adds a bit more overhead to the project.
Because of this, it is usually best to make use of the nc.waitThen function we used first.
Now that we've seen the two ways to use waitThens in Incisor, let's see how we can cancel these scheduled callbacks, as sometimes this is necessary.
To stop a pooled waitThen, we can use nc.stopAllWaitThensByCallback back or nc.stopAllWaitThensByName.
If we stop the waitThen using stopAllWaitThensByCallback, we simply need to pass the callback owner and callback name, and then specify if we want the callback function to perform or not.
Now if we call stopAllWaitThensByCallback on the function we created for the white box and choose not to perform the callback, you can see the box never starts moving.
Now, for the stopAllWaitThensByName function.
In order for this call to work, our wait then must have a name.
I notice now that I did not give our first waitThen a name, so I'm going to add that now.
Now for calling stopAllWaitThensByName, I'm going to also have the waitThen callback execute.
Saving and going back to Live View, we can see the white box now starts moving immediately because we called that method immediately.
Both of these methods can also be used on non pooled waitThens.
There's one last way to stop a waitThen, and it is only available in non-pooled waitThens
Going to our waitThen for the green box motion, we can call the stop function on our created waitThen object.
This method simply asks if we want to perform the callback or not.
Saving and going back to Incisor, you can see since we called stop on the waitThen the green box will not start moving.
And this concludes the waitThens tutorial.
Don't forget to check out Incisor dev.com/tutorials for more tutorial videos, and feel free to leave questions and feedback on StackOverflow and our subreddit.
Have fun creating with Incisor.

