SDK methods & functions list

For developers using the Construct 2 Javascript SDK

Post » Thu Sep 08, 2016 10:19 pm

  • this.
    • Members:
      type,runtime,recycled,uid,puid,iid,get_iid,toString,extra,instance_var_names,instance_vars,behavior_insts,properties,is_contained,siblings
    • Functions:
      get_iid,toString,onCreate,tick,tick2,onDestroy,saveToJSON,loadFromJSON,draw,drawGL,getDebuggerValues,onDebugValueEdited
  • this.type.
    • Members:
      plugin,runtime,name,is_family,instvar_sids,vars_count,behs_count,fx_count,sid,members,family_index,families, family_var_map,family_beh_map,family_fx_map,is_contained,container,texture_file,texture_filesize,texture_pixelformat, animations,index,instances,deadCache,solstack,cur_sol,default_instance,default_layerindex,stale_iids,updateIIDs,collision_grid,any_cell_changed,any_instance_parallaxed,extra,toString,behaviors,global,isOnLoaderLayout,effect_types,tile_poly_data
    • Functions:
      updateIIDs,getFirstPicked,getPairedInstance,getCurrentSol,pushCleanSol,pushCopySol,popSol,getBehaviorByName,getBehaviorIndexByName,getEffectIndexByName,applySolToContainer,getInstanceByIID,toString,onCreate
  • this.runtime
    • Members:
      isCrosswalk,isCordova,isPhoneGap,isDirectCanvas,isAppMobi,isCocoonJs,isEjecta,isDomFree,isMicrosoftEdge,isIE,isTizen, isAndroid,isiPhone,isiPad,isiOS,isiPhoneiOS6,isChrome,isAmazonWebApp,isFirefox,isSafari,isWindows,isNWjs,isNodeWebkit, isArcade,isWindows8App,isWindows8Capable,isWindowsPhone8,isWindowsPhone81,isWindows10,isWinJS,isBlackberry10, isAndroidStockBrowser,devicePixelRatio,isMobile,isWKWebView,httpServer,httpServerUrl,isDebug,canvas,canvasdiv, gl,glwrap,glUnmaskedRenderer,enableFrontToBack,earlyz_index,ctx,fullscreenOldMarginCss,firstInFullscreen,oldWidth, oldHeight,width,height,draw_width,draw_height,cssWidth,cssHeight,lastWindowWidth,lastWindowHeight,forceCanvasAlpha, redraw,isSuspended,plugins,types,types_by_index,behaviors,layouts,layouts_by_index,eventsheets,eventsheets_by_index, wait_for_textures,triggers_to_postinit,all_global_vars,all_local_vars,solidBehavior,jumpthruBehavior,shadowcasterBehavior, deathRow,hasPendingInstances,isInClearDeathRow,isInOnDestroy,isRunningEvents,isEndingLayout,createRow,isLoadingState, saveToSlot,loadFromSlot,loadFromJson,lastSaveJson,signalledContinuousPreview,suspendDrawing,fireOnCreateAfterLoad,dt, dt1,minimumFramerate,logictime,cpuutilisation,rendertime,rendercpu,eventstime,eventscpu,timescale,kahanTime,wallTime, last_tick_time,fps,last_fps_time,tickcount,execcount,framecount,objectcount,collisioncheck_count,collisioncheck_sec, polycheck_count,polycheck_sec,movedcell_count,movedcell_sec,movedrendercell_count,movedrendercell_sec,physics_cpu, hit_breakpoint,step_break,resuming_breakpoint,breakpoint_event,breakpoint_action,breakpoint_condition,changelayout, destroycallbacks,event_stack,event_stack_index,localvar_stack,localvar_stack_index,trigger_depth,loop_stack, loop_stack_index,next_uid,next_puid,layout_first_tick,family_count,suspend_events,raf_id,timeout_id,isloading, loadingprogress,isNodeFullscreen,stackLocalCount,audioInstance,had_a_click,isInUserInputEvent,objects_to_pretick, objects_to_tick,objects_to_tick2,registered_collisions,temp_poly,temp_poly2,allGroups,groups_by_name,cndsBySid, actsBySid,varsBySid,blocksBySid,running_layout,layer_canvas,layer_ctx,layer_tex,layout_tex,layout_canvas, layout_ctx,is_WebGL_context_lost,uses_background_blending,fx_tex,fullscreen_scaling,files_subfolder,objectsByUid, loaderlogos,snapshotCanvas,snapshotData,objectRefTable,name,first_layout,fullscreen_mode,fullscreen_mode_set, original_width,original_height,parallax_x_origin,parallax_y_origin,uses_loader_layout,loaderstyle,system, audio_to_preload,pixel_rounding,aspect_scale,enableWebGL,linearSampling,alphaBackground,versionstr,useHighDpi, orientations,autoLockOrientation,pauseOnBlur,wantFullscreenScalingQuality,fullscreenScalingQuality,downscalingQuality, preloadSounds,projectName,start_time,isRetina,overlay_canvas,overlay_ctx,tickFunc,progress,last_progress
    • Functions:
      tickFunc,requestProjectData,initRendererAndLoader,setSize,tryLockOrientation,onContextLost,onContextRestored, positionOverlayCanvas,setSuspended,addSuspendCallback,GetObjectReference,loadProject,waitForImageLoad, findWaitingTexture,getready,areAllTexturesAndSoundsLoaded,go,draw_c2_splash_loader,go_loading_finished, tick,logic,onWindowBlur,doChangeLayout,runLayoutChangeMethods,pretickMe,unpretickMe,tickMe,untickMe,tick2Me, untick2Me,getDt,draw,drawGL,addDestroyCallback,removeDestroyCallback,getObjectByUID,DestroyInstance,ClearDeathRow, IterateDeathRow,ClearDeathRowForType,ClearDeathRowForSingleInstance,createInstance,createInstanceFromInit, getLayerByName,getLayerByNumber,getLayer,clearSol,pushCleanSol,pushCopySol,popSol,updateAllCells, getCollisionCandidates,getTypesCollisionCandidates,getSolidCollisionCandidates,getJumpthruCollisionCandidates, testAndSelectCanvasPointOverlap,testOverlap,testTilemapOverlap,testRectOverlap,testSegmentOverlap,typeHasBehavior, typeHasNoSaveBehavior,typeHasPersistBehavior,getSolidBehavior,getJumpthruBehavior,testOverlapSolid,testRectOverlapSolid, testOverlapJumpThru,pushOutSolid,pushOut,pushInFractional,pushOutSolidNearest,registerCollision,checkRegisteredCollision,c alculateSolidBounceAngle,trigger,triggerOnSheet,triggerOnSheetForTypeName,executeSingleTrigger,getCurrentCondition, getCurrentConditionObjectType,isCurrentConditionFirst,getCurrentAction,pushLocalVarStack,popLocalVarStack, getCurrentLocalVarStack,pushEventStack,popEventStack,getCurrentEventStack,pushLoopStack,popLoopStack,getCurrentLoop, getEventVariableByName,getLayoutBySid,getObjectTypeBySid,getGroupBySid,doCanvasSnapshot,debugBreak,debugResume, signalContinuousPreview,stepIfPausedInDebugger,handleSaveLoad,saveToJSONString,refreshUidMap,loadFromJSONString, saveInstanceToJSON,getInstanceVarIndexBySid,getBehaviorIndexBySid,loadInstanceFromJSON,fetchLocalFileViaCordova, fetchLocalFileViaCordovaAsText,fetchLocalFileViaCordovaAsArrayBuffer,fetchLocalFileViaCordovaAsURL,setImageSrc

Banned User
B
17
S
7
G
23
Posts: 388
Reputation: 13,964

Post » Sat Sep 10, 2016 9:18 am

Thank you for this list.... :D
Image



The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
55
S
17
G
90
Posts: 1,112
Reputation: 59,151

Post » Sat Sep 10, 2016 4:17 pm

What is this useful for? Just curious. The manual mentions the relevant ones, whereas much of the rest are helper functions used by the runtime that isn't useful to a plugin dev.
B
91
S
31
G
103
Posts: 5,241
Reputation: 67,768

Post » Sat Sep 10, 2016 5:02 pm

I think he was just doing this.kitchenSink
Still no word on what C3 will bring for plug in development?
Still no word on what C3 will bring for plug in development.
Image ImageImage
B
168
S
50
G
164
Posts: 8,239
Reputation: 105,597

Post » Sat Sep 10, 2016 5:50 pm

R0J0hound wrote:What is this useful for? Just curious. The manual mentions the relevant ones, whereas much of the rest are helper functions used by the runtime that isn't useful to a plugin dev.

They are useful if you are not using the c2canvas like I'm doing.
newt wrote:I think he was just doing this.kitchenSink.

No I was just doing this.yourMom.
Banned User
B
17
S
7
G
23
Posts: 388
Reputation: 13,964

Post » Sat Sep 10, 2016 6:14 pm

Pretty sure that would be dis.yourMom
Image ImageImage
B
168
S
50
G
164
Posts: 8,239
Reputation: 105,597

Post » Sat Sep 10, 2016 7:33 pm

newt wrote:Pretty sure that would be dis.yourMom

Glad you're good sport, between I've just noticed that you're also a member of the FGL community.
Banned User
B
17
S
7
G
23
Posts: 388
Reputation: 13,964

Post » Sat Sep 10, 2016 8:49 pm

Yeah. It's good for getting input.
Speaking of sdk's. I keep hoping they will make the web ads available.
Image ImageImage
B
168
S
50
G
164
Posts: 8,239
Reputation: 105,597


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests