gdcore-tools 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (601) hide show
  1. package/GDevelop/ExtLibs/7za.exe +0 -0
  2. package/GDevelop/ExtLibs/curl.exe +0 -0
  3. package/GDevelop/scripts/libgettextlib-0-17.dll +0 -0
  4. package/GDevelop/scripts/libgettextsrc-0-17.dll +0 -0
  5. package/LICENSE +1 -1
  6. package/dist/Runtime/AsyncTasksManager.js +5 -0
  7. package/dist/Runtime/AsyncTasksManager.js.map +7 -0
  8. package/dist/Runtime/Cordova/config.xml +44 -0
  9. package/dist/Runtime/Cordova/package.json +22 -0
  10. package/dist/Runtime/Cordova/www/index.html +45 -0
  11. package/dist/Runtime/CustomRuntimeObject.js +2 -0
  12. package/dist/Runtime/CustomRuntimeObject.js.map +7 -0
  13. package/dist/Runtime/CustomRuntimeObjectInstanceContainer.js +2 -0
  14. package/dist/Runtime/CustomRuntimeObjectInstanceContainer.js.map +7 -0
  15. package/dist/Runtime/Electron/main.js +65 -0
  16. package/dist/Runtime/Electron/package.json +26 -0
  17. package/dist/Runtime/Extensions/3D/A_RuntimeObject3D.js +2 -0
  18. package/dist/Runtime/Extensions/3D/A_RuntimeObject3D.js.map +7 -0
  19. package/dist/Runtime/Extensions/3D/A_RuntimeObject3DRenderer.js +2 -0
  20. package/dist/Runtime/Extensions/3D/A_RuntimeObject3DRenderer.js.map +7 -0
  21. package/dist/Runtime/Extensions/3D/AmbientLight.js +2 -0
  22. package/dist/Runtime/Extensions/3D/AmbientLight.js.map +7 -0
  23. package/dist/Runtime/Extensions/3D/Cube3DRuntimeObject.js +2 -0
  24. package/dist/Runtime/Extensions/3D/Cube3DRuntimeObject.js.map +7 -0
  25. package/dist/Runtime/Extensions/3D/Cube3DRuntimeObjectPixiRenderer.js +2 -0
  26. package/dist/Runtime/Extensions/3D/Cube3DRuntimeObjectPixiRenderer.js.map +7 -0
  27. package/dist/Runtime/Extensions/3D/DirectionalLight.js +2 -0
  28. package/dist/Runtime/Extensions/3D/DirectionalLight.js.map +7 -0
  29. package/dist/Runtime/Extensions/3D/ExponentialFog.js +2 -0
  30. package/dist/Runtime/Extensions/3D/ExponentialFog.js.map +7 -0
  31. package/dist/Runtime/Extensions/3D/HemisphereLight.js +2 -0
  32. package/dist/Runtime/Extensions/3D/HemisphereLight.js.map +7 -0
  33. package/dist/Runtime/Extensions/3D/JsExtension.js +2809 -0
  34. package/dist/Runtime/Extensions/3D/LinearFog.js +2 -0
  35. package/dist/Runtime/Extensions/3D/LinearFog.js.map +7 -0
  36. package/dist/Runtime/Extensions/3D/Model3DRuntimeObject.js +2 -0
  37. package/dist/Runtime/Extensions/3D/Model3DRuntimeObject.js.map +7 -0
  38. package/dist/Runtime/Extensions/3D/Model3DRuntimeObject3DRenderer.js +2 -0
  39. package/dist/Runtime/Extensions/3D/Model3DRuntimeObject3DRenderer.js.map +7 -0
  40. package/dist/Runtime/Extensions/3D/Scene3DTools.js +2 -0
  41. package/dist/Runtime/Extensions/3D/Scene3DTools.js.map +7 -0
  42. package/dist/Runtime/Extensions/AdMob/JsExtension.js +798 -0
  43. package/dist/Runtime/Extensions/AdMob/admobtools.js +2 -0
  44. package/dist/Runtime/Extensions/AdMob/admobtools.js.map +7 -0
  45. package/dist/Runtime/Extensions/AdvancedWindow/JsExtension.js +719 -0
  46. package/dist/Runtime/Extensions/AdvancedWindow/electron-advancedwindowtools.js +2 -0
  47. package/dist/Runtime/Extensions/AdvancedWindow/electron-advancedwindowtools.js.map +7 -0
  48. package/dist/Runtime/Extensions/AnchorBehavior/anchorruntimebehavior.js +2 -0
  49. package/dist/Runtime/Extensions/AnchorBehavior/anchorruntimebehavior.js.map +7 -0
  50. package/dist/Runtime/Extensions/BBText/JsExtension.js +639 -0
  51. package/dist/Runtime/Extensions/BBText/bbtextruntimeobject-pixi-renderer.js +2 -0
  52. package/dist/Runtime/Extensions/BBText/bbtextruntimeobject-pixi-renderer.js.map +7 -0
  53. package/dist/Runtime/Extensions/BBText/bbtextruntimeobject.js +2 -0
  54. package/dist/Runtime/Extensions/BBText/bbtextruntimeobject.js.map +7 -0
  55. package/dist/Runtime/Extensions/BBText/pixi-multistyle-text/dist/pixi-multistyle-text.umd.js +1 -0
  56. package/dist/Runtime/Extensions/BitmapText/JsExtension.js +756 -0
  57. package/dist/Runtime/Extensions/BitmapText/bitmaptextruntimeobject-pixi-renderer.js +2 -0
  58. package/dist/Runtime/Extensions/BitmapText/bitmaptextruntimeobject-pixi-renderer.js.map +7 -0
  59. package/dist/Runtime/Extensions/BitmapText/bitmaptextruntimeobject.js +2 -0
  60. package/dist/Runtime/Extensions/BitmapText/bitmaptextruntimeobject.js.map +7 -0
  61. package/dist/Runtime/Extensions/DebuggerTools/JsExtension.js +123 -0
  62. package/dist/Runtime/Extensions/DebuggerTools/debuggertools.js +2 -0
  63. package/dist/Runtime/Extensions/DebuggerTools/debuggertools.js.map +7 -0
  64. package/dist/Runtime/Extensions/DestroyOutsideBehavior/destroyoutsideruntimebehavior.js +2 -0
  65. package/dist/Runtime/Extensions/DestroyOutsideBehavior/destroyoutsideruntimebehavior.js.map +7 -0
  66. package/dist/Runtime/Extensions/DeviceSensors/JsExtension.js +461 -0
  67. package/dist/Runtime/Extensions/DeviceSensors/devicesensortools.js +2 -0
  68. package/dist/Runtime/Extensions/DeviceSensors/devicesensortools.js.map +7 -0
  69. package/dist/Runtime/Extensions/DeviceVibration/JsExtension.js +108 -0
  70. package/dist/Runtime/Extensions/DeviceVibration/devicevibrationtools.js +2 -0
  71. package/dist/Runtime/Extensions/DeviceVibration/devicevibrationtools.js.map +7 -0
  72. package/dist/Runtime/Extensions/DialogueTree/JsExtension.js +730 -0
  73. package/dist/Runtime/Extensions/DialogueTree/bondage.js/dist/bondage.min.js +11 -0
  74. package/dist/Runtime/Extensions/DialogueTree/dialoguetools.js +3 -0
  75. package/dist/Runtime/Extensions/DialogueTree/dialoguetools.js.map +7 -0
  76. package/dist/Runtime/Extensions/DraggableBehavior/draggableruntimebehavior.js +2 -0
  77. package/dist/Runtime/Extensions/DraggableBehavior/draggableruntimebehavior.js.map +7 -0
  78. package/dist/Runtime/Extensions/Effects/JsExtension.js +1197 -0
  79. package/dist/Runtime/Extensions/Effects/adjustment-pixi-filter.js +2 -0
  80. package/dist/Runtime/Extensions/Effects/adjustment-pixi-filter.js.map +7 -0
  81. package/dist/Runtime/Extensions/Effects/advanced-bloom-pixi-filter.js +2 -0
  82. package/dist/Runtime/Extensions/Effects/advanced-bloom-pixi-filter.js.map +7 -0
  83. package/dist/Runtime/Extensions/Effects/ascii-pixi-filter.js +2 -0
  84. package/dist/Runtime/Extensions/Effects/ascii-pixi-filter.js.map +7 -0
  85. package/dist/Runtime/Extensions/Effects/bevel-pixi-filter.js +2 -0
  86. package/dist/Runtime/Extensions/Effects/bevel-pixi-filter.js.map +7 -0
  87. package/dist/Runtime/Extensions/Effects/black-and-white-pixi-filter.js +2 -0
  88. package/dist/Runtime/Extensions/Effects/black-and-white-pixi-filter.js.map +7 -0
  89. package/dist/Runtime/Extensions/Effects/blending-mode-pixi-filter.js +2 -0
  90. package/dist/Runtime/Extensions/Effects/blending-mode-pixi-filter.js.map +7 -0
  91. package/dist/Runtime/Extensions/Effects/blur-pixi-filter.js +2 -0
  92. package/dist/Runtime/Extensions/Effects/blur-pixi-filter.js.map +7 -0
  93. package/dist/Runtime/Extensions/Effects/brightness-pixi-filter.js +2 -0
  94. package/dist/Runtime/Extensions/Effects/brightness-pixi-filter.js.map +7 -0
  95. package/dist/Runtime/Extensions/Effects/bulge-pinch-pixi-filter.js +2 -0
  96. package/dist/Runtime/Extensions/Effects/bulge-pinch-pixi-filter.js.map +7 -0
  97. package/dist/Runtime/Extensions/Effects/color-map-pixi-filter.js +2 -0
  98. package/dist/Runtime/Extensions/Effects/color-map-pixi-filter.js.map +7 -0
  99. package/dist/Runtime/Extensions/Effects/color-replace-pixi-filter.js +2 -0
  100. package/dist/Runtime/Extensions/Effects/color-replace-pixi-filter.js.map +7 -0
  101. package/dist/Runtime/Extensions/Effects/crt-pixi-filter.js +2 -0
  102. package/dist/Runtime/Extensions/Effects/crt-pixi-filter.js.map +7 -0
  103. package/dist/Runtime/Extensions/Effects/displacement-pixi-filter.js +2 -0
  104. package/dist/Runtime/Extensions/Effects/displacement-pixi-filter.js.map +7 -0
  105. package/dist/Runtime/Extensions/Effects/dot-pixi-filter.js +2 -0
  106. package/dist/Runtime/Extensions/Effects/dot-pixi-filter.js.map +7 -0
  107. package/dist/Runtime/Extensions/Effects/drop-shadow-pixi-filter.js +2 -0
  108. package/dist/Runtime/Extensions/Effects/drop-shadow-pixi-filter.js.map +7 -0
  109. package/dist/Runtime/Extensions/Effects/glitch-pixi-filter.js +2 -0
  110. package/dist/Runtime/Extensions/Effects/glitch-pixi-filter.js.map +7 -0
  111. package/dist/Runtime/Extensions/Effects/glow-pixi-filter.js +2 -0
  112. package/dist/Runtime/Extensions/Effects/glow-pixi-filter.js.map +7 -0
  113. package/dist/Runtime/Extensions/Effects/godray-pixi-filter.js +2 -0
  114. package/dist/Runtime/Extensions/Effects/godray-pixi-filter.js.map +7 -0
  115. package/dist/Runtime/Extensions/Effects/kawase-blur-pixi-filter.js +2 -0
  116. package/dist/Runtime/Extensions/Effects/kawase-blur-pixi-filter.js.map +7 -0
  117. package/dist/Runtime/Extensions/Effects/light-night-pixi-filter.js +3 -0
  118. package/dist/Runtime/Extensions/Effects/light-night-pixi-filter.js.map +7 -0
  119. package/dist/Runtime/Extensions/Effects/night-pixi-filter.js +3 -0
  120. package/dist/Runtime/Extensions/Effects/night-pixi-filter.js.map +7 -0
  121. package/dist/Runtime/Extensions/Effects/noise-pixi-filter.js +2 -0
  122. package/dist/Runtime/Extensions/Effects/noise-pixi-filter.js.map +7 -0
  123. package/dist/Runtime/Extensions/Effects/old-film-pixi-filter.js +2 -0
  124. package/dist/Runtime/Extensions/Effects/old-film-pixi-filter.js.map +7 -0
  125. package/dist/Runtime/Extensions/Effects/outline-pixi-filter.js +2 -0
  126. package/dist/Runtime/Extensions/Effects/outline-pixi-filter.js.map +7 -0
  127. package/dist/Runtime/Extensions/Effects/pixelate-pixi-filter.js +2 -0
  128. package/dist/Runtime/Extensions/Effects/pixelate-pixi-filter.js.map +7 -0
  129. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-adjustment.js +8 -0
  130. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-advanced-bloom.js +8 -0
  131. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-ascii.js +8 -0
  132. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-bevel.js +8 -0
  133. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-bulge-pinch.js +8 -0
  134. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-color-map.js +8 -0
  135. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-color-replace.js +8 -0
  136. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-crt.js +8 -0
  137. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-dot.js +8 -0
  138. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-drop-shadow.js +8 -0
  139. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-glitch.js +8 -0
  140. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-glow.js +8 -0
  141. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-godray.js +8 -0
  142. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-kawase-blur.js +8 -0
  143. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-old-film.js +8 -0
  144. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-outline.js +8 -0
  145. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-pixelate.js +8 -0
  146. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-radial-blur.js +8 -0
  147. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-reflection.js +8 -0
  148. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-rgb-split.js +8 -0
  149. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-tilt-shift.js +171 -0
  150. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-twist.js +8 -0
  151. package/dist/Runtime/Extensions/Effects/pixi-filters/filter-zoom-blur.js +8 -0
  152. package/dist/Runtime/Extensions/Effects/pixi-filters/types/adjustment/types.d.ts +29 -0
  153. package/dist/Runtime/Extensions/Effects/pixi-filters/types/advanced-bloom/types.d.ts +30 -0
  154. package/dist/Runtime/Extensions/Effects/pixi-filters/types/ascii/types.d.ts +11 -0
  155. package/dist/Runtime/Extensions/Effects/pixi-filters/types/bevel/types.d.ts +25 -0
  156. package/dist/Runtime/Extensions/Effects/pixi-filters/types/bloom/types.d.ts +18 -0
  157. package/dist/Runtime/Extensions/Effects/pixi-filters/types/bulge-pinch/types.d.ts +24 -0
  158. package/dist/Runtime/Extensions/Effects/pixi-filters/types/color-map/types.d.ts +22 -0
  159. package/dist/Runtime/Extensions/Effects/pixi-filters/types/color-overlay/types.d.ts +11 -0
  160. package/dist/Runtime/Extensions/Effects/pixi-filters/types/color-replace/types.d.ts +17 -0
  161. package/dist/Runtime/Extensions/Effects/pixi-filters/types/convolution/types.d.ts +13 -0
  162. package/dist/Runtime/Extensions/Effects/pixi-filters/types/cross-hatch/types.d.ts +10 -0
  163. package/dist/Runtime/Extensions/Effects/pixi-filters/types/crt/types.d.ts +35 -0
  164. package/dist/Runtime/Extensions/Effects/pixi-filters/types/dot/types.d.ts +12 -0
  165. package/dist/Runtime/Extensions/Effects/pixi-filters/types/drop-shadow/types.d.ts +33 -0
  166. package/dist/Runtime/Extensions/Effects/pixi-filters/types/emboss/types.d.ts +11 -0
  167. package/dist/Runtime/Extensions/Effects/pixi-filters/types/glitch/types.d.ts +38 -0
  168. package/dist/Runtime/Extensions/Effects/pixi-filters/types/glow/types.d.ts +23 -0
  169. package/dist/Runtime/Extensions/Effects/pixi-filters/types/godray/types.d.ts +27 -0
  170. package/dist/Runtime/Extensions/Effects/pixi-filters/types/kawase-blur/types.d.ts +15 -0
  171. package/dist/Runtime/Extensions/Effects/pixi-filters/types/motion-blur/types.d.ts +17 -0
  172. package/dist/Runtime/Extensions/Effects/pixi-filters/types/multi-color-replace/types.d.ts +18 -0
  173. package/dist/Runtime/Extensions/Effects/pixi-filters/types/old-film/types.d.ts +33 -0
  174. package/dist/Runtime/Extensions/Effects/pixi-filters/types/outline/types.d.ts +13 -0
  175. package/dist/Runtime/Extensions/Effects/pixi-filters/types/pixelate/types.d.ts +11 -0
  176. package/dist/Runtime/Extensions/Effects/pixi-filters/types/radial-blur/types.d.ts +19 -0
  177. package/dist/Runtime/Extensions/Effects/pixi-filters/types/reflection/types.d.ts +25 -0
  178. package/dist/Runtime/Extensions/Effects/pixi-filters/types/rgb-split/types.d.ts +13 -0
  179. package/dist/Runtime/Extensions/Effects/pixi-filters/types/shockwave/types.d.ts +25 -0
  180. package/dist/Runtime/Extensions/Effects/pixi-filters/types/simple-lightmap/types.d.ts +13 -0
  181. package/dist/Runtime/Extensions/Effects/pixi-filters/types/tilt-shift/types.d.ts +19 -0
  182. package/dist/Runtime/Extensions/Effects/pixi-filters/types/twist/types.d.ts +13 -0
  183. package/dist/Runtime/Extensions/Effects/pixi-filters/types/zoom-blur/types.d.ts +28 -0
  184. package/dist/Runtime/Extensions/Effects/radial-blur-pixi-filter.js +2 -0
  185. package/dist/Runtime/Extensions/Effects/radial-blur-pixi-filter.js.map +7 -0
  186. package/dist/Runtime/Extensions/Effects/reflection-pixi-filter.js +2 -0
  187. package/dist/Runtime/Extensions/Effects/reflection-pixi-filter.js.map +7 -0
  188. package/dist/Runtime/Extensions/Effects/rgb-split-pixi-filter.js +2 -0
  189. package/dist/Runtime/Extensions/Effects/rgb-split-pixi-filter.js.map +7 -0
  190. package/dist/Runtime/Extensions/Effects/sepia-pixi-filter.js +2 -0
  191. package/dist/Runtime/Extensions/Effects/sepia-pixi-filter.js.map +7 -0
  192. package/dist/Runtime/Extensions/Effects/tilt-shift-pixi-filter.js +2 -0
  193. package/dist/Runtime/Extensions/Effects/tilt-shift-pixi-filter.js.map +7 -0
  194. package/dist/Runtime/Extensions/Effects/twist-pixi-filter.js +2 -0
  195. package/dist/Runtime/Extensions/Effects/twist-pixi-filter.js.map +7 -0
  196. package/dist/Runtime/Extensions/Effects/zoom-blur-pixi-filter.js +2 -0
  197. package/dist/Runtime/Extensions/Effects/zoom-blur-pixi-filter.js.map +7 -0
  198. package/dist/Runtime/Extensions/ExampleJsExtension/JsExtension.js +589 -0
  199. package/dist/Runtime/Extensions/ExampleJsExtension/dummyeffect.js +3 -0
  200. package/dist/Runtime/Extensions/ExampleJsExtension/dummyeffect.js.map +7 -0
  201. package/dist/Runtime/Extensions/ExampleJsExtension/dummyruntimebehavior.js +2 -0
  202. package/dist/Runtime/Extensions/ExampleJsExtension/dummyruntimebehavior.js.map +7 -0
  203. package/dist/Runtime/Extensions/ExampleJsExtension/dummyruntimeobject-pixi-renderer.js +2 -0
  204. package/dist/Runtime/Extensions/ExampleJsExtension/dummyruntimeobject-pixi-renderer.js.map +7 -0
  205. package/dist/Runtime/Extensions/ExampleJsExtension/dummyruntimeobject.js +2 -0
  206. package/dist/Runtime/Extensions/ExampleJsExtension/dummyruntimeobject.js.map +7 -0
  207. package/dist/Runtime/Extensions/ExampleJsExtension/dummywithshareddataruntimebehavior.js +2 -0
  208. package/dist/Runtime/Extensions/ExampleJsExtension/dummywithshareddataruntimebehavior.js.map +7 -0
  209. package/dist/Runtime/Extensions/ExampleJsExtension/examplejsextensiontools.js +2 -0
  210. package/dist/Runtime/Extensions/ExampleJsExtension/examplejsextensiontools.js.map +7 -0
  211. package/dist/Runtime/Extensions/FacebookInstantGames/FBInstant.d.ts +2 -0
  212. package/dist/Runtime/Extensions/FacebookInstantGames/JsExtension.js +379 -0
  213. package/dist/Runtime/Extensions/FacebookInstantGames/facebookinstantgamestools.js +2 -0
  214. package/dist/Runtime/Extensions/FacebookInstantGames/facebookinstantgamestools.js.map +7 -0
  215. package/dist/Runtime/Extensions/FileSystem/JsExtension.js +559 -0
  216. package/dist/Runtime/Extensions/FileSystem/filesystemtools.js +2 -0
  217. package/dist/Runtime/Extensions/FileSystem/filesystemtools.js.map +7 -0
  218. package/dist/Runtime/Extensions/Firebase/A_firebasejs/A_firebase-base.js +2 -0
  219. package/dist/Runtime/Extensions/Firebase/A_firebasejs/A_firebase-base.js.map +1 -0
  220. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-analytics.js +2 -0
  221. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-analytics.js.map +1 -0
  222. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-auth.js +2 -0
  223. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-auth.js.map +1 -0
  224. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-database.js +2 -0
  225. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-database.js.map +1 -0
  226. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-firestore.js +2 -0
  227. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-firestore.js.map +1 -0
  228. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-functions.js +2 -0
  229. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-functions.js.map +1 -0
  230. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-messaging.js +2 -0
  231. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-messaging.js.map +1 -0
  232. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-performance.js +2 -0
  233. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-performance.js.map +1 -0
  234. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-remote-config.js +2 -0
  235. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-remote-config.js.map +1 -0
  236. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-storage.js +2 -0
  237. package/dist/Runtime/Extensions/Firebase/A_firebasejs/B_firebase-storage.js.map +1 -0
  238. package/dist/Runtime/Extensions/Firebase/A_firebasejs/firebase.d.ts +10191 -0
  239. package/dist/Runtime/Extensions/Firebase/B_firebasetools/C_firebasetools.js +2 -0
  240. package/dist/Runtime/Extensions/Firebase/B_firebasetools/C_firebasetools.js.map +7 -0
  241. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_analyticstools.js +2 -0
  242. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_analyticstools.js.map +7 -0
  243. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_authtools.js +2 -0
  244. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_authtools.js.map +7 -0
  245. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_cloudfirestoretools.js +2 -0
  246. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_cloudfirestoretools.js.map +7 -0
  247. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_databasetools.js +2 -0
  248. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_databasetools.js.map +7 -0
  249. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_functionstools.js +2 -0
  250. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_functionstools.js.map +7 -0
  251. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_performancetools.js +2 -0
  252. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_performancetools.js.map +7 -0
  253. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_remoteconfigtools.js +2 -0
  254. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_remoteconfigtools.js.map +7 -0
  255. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_storagetools.js +2 -0
  256. package/dist/Runtime/Extensions/Firebase/B_firebasetools/D_storagetools.js.map +7 -0
  257. package/dist/Runtime/Extensions/Firebase/JsExtension.js +2323 -0
  258. package/dist/Runtime/Extensions/Inventory/inventory.js +2 -0
  259. package/dist/Runtime/Extensions/Inventory/inventory.js.map +7 -0
  260. package/dist/Runtime/Extensions/Inventory/inventorytools.js +2 -0
  261. package/dist/Runtime/Extensions/Inventory/inventorytools.js.map +7 -0
  262. package/dist/Runtime/Extensions/JsExtensionTypes.flow.js +34 -0
  263. package/dist/Runtime/Extensions/Leaderboards/JsExtension.js +299 -0
  264. package/dist/Runtime/Extensions/Leaderboards/leaderboardstools.js +2 -0
  265. package/dist/Runtime/Extensions/Leaderboards/leaderboardstools.js.map +7 -0
  266. package/dist/Runtime/Extensions/Leaderboards/sha256.d.ts +234 -0
  267. package/dist/Runtime/Extensions/Leaderboards/sha256.js +21 -0
  268. package/dist/Runtime/Extensions/Lighting/JsExtension.js +371 -0
  269. package/dist/Runtime/Extensions/Lighting/lightobstacleruntimebehavior.js +2 -0
  270. package/dist/Runtime/Extensions/Lighting/lightobstacleruntimebehavior.js.map +7 -0
  271. package/dist/Runtime/Extensions/Lighting/lightruntimeobject-pixi-renderer.js +40 -0
  272. package/dist/Runtime/Extensions/Lighting/lightruntimeobject-pixi-renderer.js.map +7 -0
  273. package/dist/Runtime/Extensions/Lighting/lightruntimeobject.js +2 -0
  274. package/dist/Runtime/Extensions/Lighting/lightruntimeobject.js.map +7 -0
  275. package/dist/Runtime/Extensions/LinkedObjects/linkedobjects.js +2 -0
  276. package/dist/Runtime/Extensions/LinkedObjects/linkedobjects.js.map +7 -0
  277. package/dist/Runtime/Extensions/P2P/A_peer.js +4 -0
  278. package/dist/Runtime/Extensions/P2P/A_peer.js.map +1 -0
  279. package/dist/Runtime/Extensions/P2P/B_p2ptools.js +2 -0
  280. package/dist/Runtime/Extensions/P2P/B_p2ptools.js.map +7 -0
  281. package/dist/Runtime/Extensions/P2P/JsExtension.js +483 -0
  282. package/dist/Runtime/Extensions/P2P/peerjs.d.ts +509 -0
  283. package/dist/Runtime/Extensions/PanelSpriteObject/panelspriteruntimeobject-pixi-renderer.js +2 -0
  284. package/dist/Runtime/Extensions/PanelSpriteObject/panelspriteruntimeobject-pixi-renderer.js.map +7 -0
  285. package/dist/Runtime/Extensions/PanelSpriteObject/panelspriteruntimeobject.js +2 -0
  286. package/dist/Runtime/Extensions/PanelSpriteObject/panelspriteruntimeobject.js.map +7 -0
  287. package/dist/Runtime/Extensions/ParticleSystem/particleemitterobject-pixi-renderer.js +2 -0
  288. package/dist/Runtime/Extensions/ParticleSystem/particleemitterobject-pixi-renderer.js.map +7 -0
  289. package/dist/Runtime/Extensions/ParticleSystem/particleemitterobject.js +2 -0
  290. package/dist/Runtime/Extensions/ParticleSystem/particleemitterobject.js.map +7 -0
  291. package/dist/Runtime/Extensions/ParticleSystem/pixi-particles-pixi-renderer.min.js +3 -0
  292. package/dist/Runtime/Extensions/PathfindingBehavior/PathTools.js +2 -0
  293. package/dist/Runtime/Extensions/PathfindingBehavior/PathTools.js.map +7 -0
  294. package/dist/Runtime/Extensions/PathfindingBehavior/pathfindingobstacleruntimebehavior.js +2 -0
  295. package/dist/Runtime/Extensions/PathfindingBehavior/pathfindingobstacleruntimebehavior.js.map +7 -0
  296. package/dist/Runtime/Extensions/PathfindingBehavior/pathfindingruntimebehavior.js +2 -0
  297. package/dist/Runtime/Extensions/PathfindingBehavior/pathfindingruntimebehavior.js.map +7 -0
  298. package/dist/Runtime/Extensions/Physics2Behavior/Box2D_v2.3.1_min.wasm.js +2 -0
  299. package/dist/Runtime/Extensions/Physics2Behavior/Box2D_v2.3.1_min.wasm.js.map +7 -0
  300. package/dist/Runtime/Extensions/Physics2Behavior/Box2D_v2.3.1_min.wasm.wasm +0 -0
  301. package/dist/Runtime/Extensions/Physics2Behavior/JsExtension.js +4072 -0
  302. package/dist/Runtime/Extensions/Physics2Behavior/box2d.d.ts +1804 -0
  303. package/dist/Runtime/Extensions/Physics2Behavior/physics2runtimebehavior.js +2 -0
  304. package/dist/Runtime/Extensions/Physics2Behavior/physics2runtimebehavior.js.map +7 -0
  305. package/dist/Runtime/Extensions/Physics2Behavior/physics2tools.js +2 -0
  306. package/dist/Runtime/Extensions/Physics2Behavior/physics2tools.js.map +7 -0
  307. package/dist/Runtime/Extensions/PhysicsBehavior/box2djs/box2d.js +804 -0
  308. package/dist/Runtime/Extensions/PhysicsBehavior/physicsruntimebehavior.js +2 -0
  309. package/dist/Runtime/Extensions/PhysicsBehavior/physicsruntimebehavior.js.map +7 -0
  310. package/dist/Runtime/Extensions/PlatformBehavior/benchmarks/platformerobjectruntimebehavior.benchmark.js +2 -0
  311. package/dist/Runtime/Extensions/PlatformBehavior/benchmarks/platformerobjectruntimebehavior.benchmark.js.map +7 -0
  312. package/dist/Runtime/Extensions/PlatformBehavior/platformerobjectruntimebehavior.js +2 -0
  313. package/dist/Runtime/Extensions/PlatformBehavior/platformerobjectruntimebehavior.js.map +7 -0
  314. package/dist/Runtime/Extensions/PlatformBehavior/platformruntimebehavior.js +2 -0
  315. package/dist/Runtime/Extensions/PlatformBehavior/platformruntimebehavior.js.map +7 -0
  316. package/dist/Runtime/Extensions/PlatformBehavior/platformtools.js +2 -0
  317. package/dist/Runtime/Extensions/PlatformBehavior/platformtools.js.map +7 -0
  318. package/dist/Runtime/Extensions/PlayerAuthentication/JsExtension.js +218 -0
  319. package/dist/Runtime/Extensions/PlayerAuthentication/playerauthenticationcomponents.js +5 -0
  320. package/dist/Runtime/Extensions/PlayerAuthentication/playerauthenticationcomponents.js.map +7 -0
  321. package/dist/Runtime/Extensions/PlayerAuthentication/playerauthenticationtools.js +2 -0
  322. package/dist/Runtime/Extensions/PlayerAuthentication/playerauthenticationtools.js.map +7 -0
  323. package/dist/Runtime/Extensions/PrimitiveDrawing/pixi-graphics-extras/graphics-extras.min.js +10 -0
  324. package/dist/Runtime/Extensions/PrimitiveDrawing/pixi-graphics-extras/graphics-extras.min.js.map +1 -0
  325. package/dist/Runtime/Extensions/PrimitiveDrawing/shapepainterruntimeobject-pixi-renderer.js +2 -0
  326. package/dist/Runtime/Extensions/PrimitiveDrawing/shapepainterruntimeobject-pixi-renderer.js.map +7 -0
  327. package/dist/Runtime/Extensions/PrimitiveDrawing/shapepainterruntimeobject.js +2 -0
  328. package/dist/Runtime/Extensions/PrimitiveDrawing/shapepainterruntimeobject.js.map +7 -0
  329. package/dist/Runtime/Extensions/Screenshot/JsExtension.js +68 -0
  330. package/dist/Runtime/Extensions/Screenshot/screenshottools.js +2 -0
  331. package/dist/Runtime/Extensions/Screenshot/screenshottools.js.map +7 -0
  332. package/dist/Runtime/Extensions/Shopify/shopify-buy.umd.polyfilled.min.js +2 -0
  333. package/dist/Runtime/Extensions/Shopify/shopifytools.js +2 -0
  334. package/dist/Runtime/Extensions/Shopify/shopifytools.js.map +7 -0
  335. package/dist/Runtime/Extensions/SpatialSound/JsExtension.js +92 -0
  336. package/dist/Runtime/Extensions/SpatialSound/howler.spatial.min.js +2 -0
  337. package/dist/Runtime/Extensions/SpatialSound/spatialsoundtools.js +2 -0
  338. package/dist/Runtime/Extensions/SpatialSound/spatialsoundtools.js.map +7 -0
  339. package/dist/Runtime/Extensions/SystemInfo/systeminfotools.js +2 -0
  340. package/dist/Runtime/Extensions/SystemInfo/systeminfotools.js.map +7 -0
  341. package/dist/Runtime/Extensions/TextEntryObject/textentryruntimeobject-pixi-renderer.js +2 -0
  342. package/dist/Runtime/Extensions/TextEntryObject/textentryruntimeobject-pixi-renderer.js.map +7 -0
  343. package/dist/Runtime/Extensions/TextEntryObject/textentryruntimeobject.js +2 -0
  344. package/dist/Runtime/Extensions/TextEntryObject/textentryruntimeobject.js.map +7 -0
  345. package/dist/Runtime/Extensions/TextInput/JsExtension.js +790 -0
  346. package/dist/Runtime/Extensions/TextInput/textinputruntimeobject-pixi-renderer.js +2 -0
  347. package/dist/Runtime/Extensions/TextInput/textinputruntimeobject-pixi-renderer.js.map +7 -0
  348. package/dist/Runtime/Extensions/TextInput/textinputruntimeobject.js +2 -0
  349. package/dist/Runtime/Extensions/TextInput/textinputruntimeobject.js.map +7 -0
  350. package/dist/Runtime/Extensions/TextObject/textruntimeobject-pixi-renderer.js +2 -0
  351. package/dist/Runtime/Extensions/TextObject/textruntimeobject-pixi-renderer.js.map +7 -0
  352. package/dist/Runtime/Extensions/TextObject/textruntimeobject.js +2 -0
  353. package/dist/Runtime/Extensions/TextObject/textruntimeobject.js.map +7 -0
  354. package/dist/Runtime/Extensions/TileMap/JsExtension.js +1653 -0
  355. package/dist/Runtime/Extensions/TileMap/TileMapRuntimeManager.js +2 -0
  356. package/dist/Runtime/Extensions/TileMap/TileMapRuntimeManager.js.map +7 -0
  357. package/dist/Runtime/Extensions/TileMap/collision/TileMapCollisionMaskRenderer.js +2 -0
  358. package/dist/Runtime/Extensions/TileMap/collision/TileMapCollisionMaskRenderer.js.map +7 -0
  359. package/dist/Runtime/Extensions/TileMap/collision/TransformedTileMap.js +2 -0
  360. package/dist/Runtime/Extensions/TileMap/collision/TransformedTileMap.js.map +7 -0
  361. package/dist/Runtime/Extensions/TileMap/example/anotherIsland.json +5769 -0
  362. package/dist/Runtime/Extensions/TileMap/example/island.json +5823 -0
  363. package/dist/Runtime/Extensions/TileMap/helper/TileMapHelper.d.ts +25 -0
  364. package/dist/Runtime/Extensions/TileMap/helper/TileMapHelper.js +2 -0
  365. package/dist/Runtime/Extensions/TileMap/helper/TileMapHelper.js.map +7 -0
  366. package/dist/Runtime/Extensions/TileMap/helper/dts/index.d.ts +16 -0
  367. package/dist/Runtime/Extensions/TileMap/helper/dts/index.d.ts.map +1 -0
  368. package/dist/Runtime/Extensions/TileMap/helper/dts/load/TileMapFileContent.d.ts +12 -0
  369. package/dist/Runtime/Extensions/TileMap/helper/dts/load/TileMapFileContent.d.ts.map +1 -0
  370. package/dist/Runtime/Extensions/TileMap/helper/dts/load/TileMapLoader.d.ts +18 -0
  371. package/dist/Runtime/Extensions/TileMap/helper/dts/load/TileMapLoader.d.ts.map +1 -0
  372. package/dist/Runtime/Extensions/TileMap/helper/dts/load/ldtk/LDtkFormat.d.ts +589 -0
  373. package/dist/Runtime/Extensions/TileMap/helper/dts/load/ldtk/LDtkFormat.d.ts.map +1 -0
  374. package/dist/Runtime/Extensions/TileMap/helper/dts/load/ldtk/LDtkTileMapLoader.d.ts +16 -0
  375. package/dist/Runtime/Extensions/TileMap/helper/dts/load/ldtk/LDtkTileMapLoader.d.ts.map +1 -0
  376. package/dist/Runtime/Extensions/TileMap/helper/dts/load/ldtk/LDtkTileMapLoaderHelper.d.ts +5 -0
  377. package/dist/Runtime/Extensions/TileMap/helper/dts/load/ldtk/LDtkTileMapLoaderHelper.d.ts.map +1 -0
  378. package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledFormat.d.ts +343 -0
  379. package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledFormat.d.ts.map +1 -0
  380. package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledTileMapLoader.d.ts +16 -0
  381. package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledTileMapLoader.d.ts.map +1 -0
  382. package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledTileMapLoader.spec.d.ts +2 -0
  383. package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledTileMapLoader.spec.d.ts.map +1 -0
  384. package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledTileMapLoaderHelper.d.ts +37 -0
  385. package/dist/Runtime/Extensions/TileMap/helper/dts/load/tiled/TiledTileMapLoaderHelper.d.ts.map +1 -0
  386. package/dist/Runtime/Extensions/TileMap/helper/dts/model/CommonTypes.d.ts +5 -0
  387. package/dist/Runtime/Extensions/TileMap/helper/dts/model/CommonTypes.d.ts.map +1 -0
  388. package/dist/Runtime/Extensions/TileMap/helper/dts/model/GID.d.ts +45 -0
  389. package/dist/Runtime/Extensions/TileMap/helper/dts/model/GID.d.ts.map +1 -0
  390. package/dist/Runtime/Extensions/TileMap/helper/dts/model/TileMapModel.d.ts +361 -0
  391. package/dist/Runtime/Extensions/TileMap/helper/dts/model/TileMapModel.d.ts.map +1 -0
  392. package/dist/Runtime/Extensions/TileMap/helper/dts/render/ResourceCache.d.ts +27 -0
  393. package/dist/Runtime/Extensions/TileMap/helper/dts/render/ResourceCache.d.ts.map +1 -0
  394. package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileMapManager.d.ts +70 -0
  395. package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileMapManager.d.ts.map +1 -0
  396. package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileMapPixiHelper.d.ts +56 -0
  397. package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileMapPixiHelper.d.ts.map +1 -0
  398. package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileTextureCache.d.ts +24 -0
  399. package/dist/Runtime/Extensions/TileMap/helper/dts/render/TileTextureCache.d.ts.map +1 -0
  400. package/dist/Runtime/Extensions/TileMap/helper/dts/render/ldtk/LDtkPixiHelper.d.ts +26 -0
  401. package/dist/Runtime/Extensions/TileMap/helper/dts/render/ldtk/LDtkPixiHelper.d.ts.map +1 -0
  402. package/dist/Runtime/Extensions/TileMap/helper/dts/render/tiled/TiledPixiHelper.d.ts +21 -0
  403. package/dist/Runtime/Extensions/TileMap/helper/dts/render/tiled/TiledPixiHelper.d.ts.map +1 -0
  404. package/dist/Runtime/Extensions/TileMap/helper/dts/types/index.d.ts +12 -0
  405. package/dist/Runtime/Extensions/TileMap/helper/dts/types/index.d.ts.map +1 -0
  406. package/dist/Runtime/Extensions/TileMap/pako/dist/pako.d.ts +166 -0
  407. package/dist/Runtime/Extensions/TileMap/pako/dist/pako.min.js +2 -0
  408. package/dist/Runtime/Extensions/TileMap/pixi-tilemap/dist/global-pixi-tilemap.d.ts +23 -0
  409. package/dist/Runtime/Extensions/TileMap/pixi-tilemap/dist/pixi-tilemap.d.ts +270 -0
  410. package/dist/Runtime/Extensions/TileMap/pixi-tilemap/dist/pixi-tilemap.umd.js +74 -0
  411. package/dist/Runtime/Extensions/TileMap/pixi-tilemap/dist/pixi-tilemap.umd.js.map +7 -0
  412. package/dist/Runtime/Extensions/TileMap/tilemapcollisionmaskruntimeobject.js +2 -0
  413. package/dist/Runtime/Extensions/TileMap/tilemapcollisionmaskruntimeobject.js.map +7 -0
  414. package/dist/Runtime/Extensions/TileMap/tilemapruntimeobject-pixi-renderer.js +2 -0
  415. package/dist/Runtime/Extensions/TileMap/tilemapruntimeobject-pixi-renderer.js.map +7 -0
  416. package/dist/Runtime/Extensions/TileMap/tilemapruntimeobject.js +2 -0
  417. package/dist/Runtime/Extensions/TileMap/tilemapruntimeobject.js.map +7 -0
  418. package/dist/Runtime/Extensions/TiledSpriteObject/tiledspriteruntimeobject-pixi-renderer.js +2 -0
  419. package/dist/Runtime/Extensions/TiledSpriteObject/tiledspriteruntimeobject-pixi-renderer.js.map +7 -0
  420. package/dist/Runtime/Extensions/TiledSpriteObject/tiledspriteruntimeobject.js +2 -0
  421. package/dist/Runtime/Extensions/TiledSpriteObject/tiledspriteruntimeobject.js.map +7 -0
  422. package/dist/Runtime/Extensions/TopDownMovementBehavior/topdownmovementruntimebehavior.js +2 -0
  423. package/dist/Runtime/Extensions/TopDownMovementBehavior/topdownmovementruntimebehavior.js.map +7 -0
  424. package/dist/Runtime/Extensions/TweenBehavior/JsExtension.js +1087 -0
  425. package/dist/Runtime/Extensions/TweenBehavior/shifty.d.ts +839 -0
  426. package/dist/Runtime/Extensions/TweenBehavior/shifty.js +5 -0
  427. package/dist/Runtime/Extensions/TweenBehavior/shifty.js.map +1 -0
  428. package/dist/Runtime/Extensions/TweenBehavior/shifty_setup.js +2 -0
  429. package/dist/Runtime/Extensions/TweenBehavior/shifty_setup.js.map +7 -0
  430. package/dist/Runtime/Extensions/TweenBehavior/tweenruntimebehavior.js +2 -0
  431. package/dist/Runtime/Extensions/TweenBehavior/tweenruntimebehavior.js.map +7 -0
  432. package/dist/Runtime/Extensions/TweenBehavior/tweentools.js +2 -0
  433. package/dist/Runtime/Extensions/TweenBehavior/tweentools.js.map +7 -0
  434. package/dist/Runtime/Extensions/Video/JsExtension.js +694 -0
  435. package/dist/Runtime/Extensions/Video/videoruntimeobject-pixi-renderer.js +2 -0
  436. package/dist/Runtime/Extensions/Video/videoruntimeobject-pixi-renderer.js.map +7 -0
  437. package/dist/Runtime/Extensions/Video/videoruntimeobject.js +2 -0
  438. package/dist/Runtime/Extensions/Video/videoruntimeobject.js.map +7 -0
  439. package/dist/Runtime/FacebookInstantGames/fbapp-config.json +17 -0
  440. package/dist/Runtime/FacebookInstantGames/index.html +68 -0
  441. package/dist/Runtime/Model3DManager.js +2 -0
  442. package/dist/Runtime/Model3DManager.js.map +7 -0
  443. package/dist/Runtime/RuntimeCustomObjectLayer.js +2 -0
  444. package/dist/Runtime/RuntimeCustomObjectLayer.js.map +7 -0
  445. package/dist/Runtime/RuntimeInstanceContainer.js +2 -0
  446. package/dist/Runtime/RuntimeInstanceContainer.js.map +7 -0
  447. package/dist/Runtime/RuntimeLayer.js +2 -0
  448. package/dist/Runtime/RuntimeLayer.js.map +7 -0
  449. package/dist/Runtime/affinetransformation.js +2 -0
  450. package/dist/Runtime/affinetransformation.js.map +7 -0
  451. package/dist/Runtime/debugger-client/abstract-debugger-client.js +2 -0
  452. package/dist/Runtime/debugger-client/abstract-debugger-client.js.map +7 -0
  453. package/dist/Runtime/debugger-client/hot-reloader.js +2 -0
  454. package/dist/Runtime/debugger-client/hot-reloader.js.map +7 -0
  455. package/dist/Runtime/debugger-client/websocket-debugger-client.js +2 -0
  456. package/dist/Runtime/debugger-client/websocket-debugger-client.js.map +7 -0
  457. package/dist/Runtime/debugger-client/window-message-debugger-client.js +2 -0
  458. package/dist/Runtime/debugger-client/window-message-debugger-client.js.map +7 -0
  459. package/dist/Runtime/events-tools/cameratools.js +2 -0
  460. package/dist/Runtime/events-tools/cameratools.js.map +7 -0
  461. package/dist/Runtime/events-tools/commontools.js +2 -0
  462. package/dist/Runtime/events-tools/commontools.js.map +7 -0
  463. package/dist/Runtime/events-tools/inputtools.js +2 -0
  464. package/dist/Runtime/events-tools/inputtools.js.map +7 -0
  465. package/dist/Runtime/events-tools/networktools.js +2 -0
  466. package/dist/Runtime/events-tools/networktools.js.map +7 -0
  467. package/dist/Runtime/events-tools/objecttools.js +2 -0
  468. package/dist/Runtime/events-tools/objecttools.js.map +7 -0
  469. package/dist/Runtime/events-tools/runtimescenetools.js +2 -0
  470. package/dist/Runtime/events-tools/runtimescenetools.js.map +7 -0
  471. package/dist/Runtime/events-tools/soundtools.js +2 -0
  472. package/dist/Runtime/events-tools/soundtools.js.map +7 -0
  473. package/dist/Runtime/events-tools/storagetools.js +2 -0
  474. package/dist/Runtime/events-tools/storagetools.js.map +7 -0
  475. package/dist/Runtime/events-tools/stringtools.js +3 -0
  476. package/dist/Runtime/events-tools/stringtools.js.map +7 -0
  477. package/dist/Runtime/events-tools/variabletools.js +2 -0
  478. package/dist/Runtime/events-tools/variabletools.js.map +7 -0
  479. package/dist/Runtime/events-tools/windowtools.js +2 -0
  480. package/dist/Runtime/events-tools/windowtools.js.map +7 -0
  481. package/dist/Runtime/fontfaceobserver-font-manager/fontfaceobserver-font-manager.js +2 -0
  482. package/dist/Runtime/fontfaceobserver-font-manager/fontfaceobserver-font-manager.js.map +7 -0
  483. package/dist/Runtime/fontfaceobserver-font-manager/fontfaceobserver.js +16 -0
  484. package/dist/Runtime/force.js +2 -0
  485. package/dist/Runtime/force.js.map +7 -0
  486. package/dist/Runtime/gd.js +2 -0
  487. package/dist/Runtime/gd.js.map +7 -0
  488. package/dist/Runtime/howler-sound-manager/howler-sound-manager.js +2 -0
  489. package/dist/Runtime/howler-sound-manager/howler-sound-manager.js.map +7 -0
  490. package/dist/Runtime/howler-sound-manager/howler.min.js +3 -0
  491. package/dist/Runtime/index.html +55 -0
  492. package/dist/Runtime/inputmanager.js +2 -0
  493. package/dist/Runtime/inputmanager.js.map +7 -0
  494. package/dist/Runtime/jsonmanager.js +2 -0
  495. package/dist/Runtime/jsonmanager.js.map +7 -0
  496. package/dist/Runtime/layer.js +2 -0
  497. package/dist/Runtime/layer.js.map +7 -0
  498. package/dist/Runtime/libs/CocoonJS/cocoon.min.js +4 -0
  499. package/dist/Runtime/libs/jshashtable.js +2 -0
  500. package/dist/Runtime/libs/jshashtable.js.map +7 -0
  501. package/dist/Runtime/libs/rbush.js +624 -0
  502. package/dist/Runtime/logger.js +2 -0
  503. package/dist/Runtime/logger.js.map +7 -0
  504. package/dist/Runtime/oncetriggers.js +2 -0
  505. package/dist/Runtime/oncetriggers.js.map +7 -0
  506. package/dist/Runtime/pixi-renderers/CustomObjectPixiRenderer.js +2 -0
  507. package/dist/Runtime/pixi-renderers/CustomObjectPixiRenderer.js.map +7 -0
  508. package/dist/Runtime/pixi-renderers/DebuggerPixiRenderer.js +2 -0
  509. package/dist/Runtime/pixi-renderers/DebuggerPixiRenderer.js.map +7 -0
  510. package/dist/Runtime/pixi-renderers/RuntimeInstanceContainerPixiRenderer.js +1 -0
  511. package/dist/Runtime/pixi-renderers/RuntimeInstanceContainerPixiRenderer.js.map +7 -0
  512. package/dist/Runtime/pixi-renderers/ThreeAddons.js +2 -0
  513. package/dist/Runtime/pixi-renderers/draco/gltf/draco_decoder.wasm +0 -0
  514. package/dist/Runtime/pixi-renderers/draco/gltf/draco_wasm_wrapper.js +116 -0
  515. package/dist/Runtime/pixi-renderers/layer-pixi-renderer.js +15 -0
  516. package/dist/Runtime/pixi-renderers/layer-pixi-renderer.js.map +7 -0
  517. package/dist/Runtime/pixi-renderers/loadingscreen-pixi-renderer.js +2 -0
  518. package/dist/Runtime/pixi-renderers/loadingscreen-pixi-renderer.js.map +7 -0
  519. package/dist/Runtime/pixi-renderers/pixi-bitmapfont-manager.js +2 -0
  520. package/dist/Runtime/pixi-renderers/pixi-bitmapfont-manager.js.map +7 -0
  521. package/dist/Runtime/pixi-renderers/pixi-effects-manager.js +2 -0
  522. package/dist/Runtime/pixi-renderers/pixi-effects-manager.js.map +7 -0
  523. package/dist/Runtime/pixi-renderers/pixi-filters-tools.js +2 -0
  524. package/dist/Runtime/pixi-renderers/pixi-filters-tools.js.map +7 -0
  525. package/dist/Runtime/pixi-renderers/pixi-image-manager.js +2 -0
  526. package/dist/Runtime/pixi-renderers/pixi-image-manager.js.map +7 -0
  527. package/dist/Runtime/pixi-renderers/pixi.js +11 -0
  528. package/dist/Runtime/pixi-renderers/runtimegame-pixi-renderer.js +2 -0
  529. package/dist/Runtime/pixi-renderers/runtimegame-pixi-renderer.js.map +7 -0
  530. package/dist/Runtime/pixi-renderers/runtimescene-pixi-renderer.js +3 -0
  531. package/dist/Runtime/pixi-renderers/runtimescene-pixi-renderer.js.map +7 -0
  532. package/dist/Runtime/pixi-renderers/spriteruntimeobject-pixi-renderer.js +2 -0
  533. package/dist/Runtime/pixi-renderers/spriteruntimeobject-pixi-renderer.js.map +7 -0
  534. package/dist/Runtime/pixi-renderers/three.js +7 -0
  535. package/dist/Runtime/polygon.js +2 -0
  536. package/dist/Runtime/polygon.js.map +7 -0
  537. package/dist/Runtime/profiler.js +2 -0
  538. package/dist/Runtime/profiler.js.map +7 -0
  539. package/dist/Runtime/runtimebehavior.js +2 -0
  540. package/dist/Runtime/runtimebehavior.js.map +7 -0
  541. package/dist/Runtime/runtimegame.js +2 -0
  542. package/dist/Runtime/runtimegame.js.map +7 -0
  543. package/dist/Runtime/runtimeobject.js +2 -0
  544. package/dist/Runtime/runtimeobject.js.map +7 -0
  545. package/dist/Runtime/runtimescene.js +2 -0
  546. package/dist/Runtime/runtimescene.js.map +7 -0
  547. package/dist/Runtime/runtimewatermark.js +100 -0
  548. package/dist/Runtime/runtimewatermark.js.map +7 -0
  549. package/dist/Runtime/scenestack.js +2 -0
  550. package/dist/Runtime/scenestack.js.map +7 -0
  551. package/dist/Runtime/splash/gd-logo-dark-colored.js +2 -0
  552. package/dist/Runtime/splash/gd-logo-dark-colored.js.map +7 -0
  553. package/dist/Runtime/splash/gd-logo-dark.js +2 -0
  554. package/dist/Runtime/splash/gd-logo-dark.js.map +7 -0
  555. package/dist/Runtime/splash/gd-logo-light-colored.js +2 -0
  556. package/dist/Runtime/splash/gd-logo-light-colored.js.map +7 -0
  557. package/dist/Runtime/splash/gd-logo-light.js +2 -0
  558. package/dist/Runtime/splash/gd-logo-light.js.map +7 -0
  559. package/dist/Runtime/spriteruntimeobject.js +2 -0
  560. package/dist/Runtime/spriteruntimeobject.js.map +7 -0
  561. package/dist/Runtime/timemanager.js +2 -0
  562. package/dist/Runtime/timemanager.js.map +7 -0
  563. package/dist/Runtime/timer.js +2 -0
  564. package/dist/Runtime/timer.js.map +7 -0
  565. package/dist/Runtime/types/global-pixi.d.ts +22 -0
  566. package/dist/Runtime/types/global-three-addons.d.ts +9 -0
  567. package/dist/Runtime/types/global-three.d.ts +3 -0
  568. package/dist/Runtime/types/global-types.d.ts +61 -0
  569. package/dist/Runtime/types/howler.d.ts +313 -0
  570. package/dist/Runtime/types/project-data.d.ts +276 -0
  571. package/dist/Runtime/variable.js +2 -0
  572. package/dist/Runtime/variable.js.map +7 -0
  573. package/dist/Runtime/variablescontainer.js +2 -0
  574. package/dist/Runtime/variablescontainer.js.map +7 -0
  575. package/dist/lib/libGD.cjs +22 -0
  576. package/dist/lib/libGD.wasm +0 -0
  577. package/dist/loaders.js +1 -0
  578. package/package.json +24 -10
  579. package/src/downloadGD.js +0 -70
  580. package/src/index.js +21 -14
  581. package/examples/create-objects-from-json/assets/Blank button.png +0 -0
  582. package/examples/create-objects-from-json/game.json +0 -258
  583. package/examples/create-objects-from-json/index.js +0 -50
  584. package/examples/create-objects-from-json/mylist.json +0 -7
  585. package/examples/export-game/game.json +0 -205
  586. package/examples/export-game/index.js +0 -13
  587. package/src/CaseSensitiveSlug.js +0 -34
  588. package/src/EventsFunctionsExtensionsLoader/LocalEventsFunctionCodeWriter.js +0 -56
  589. package/src/EventsFunctionsExtensionsLoader/MetadataDeclarationHelpers.js +0 -489
  590. package/src/EventsFunctionsExtensionsLoader/index.js +0 -451
  591. package/src/JsExtensionsLoader/LocalJsExtensionsFinder.js +0 -42
  592. package/src/JsExtensionsLoader/LocalJsExtensionsLoader.js +0 -57
  593. package/src/JsExtensionsLoader/index.js +0 -101
  594. package/src/LocalFileSystem.js +0 -158
  595. package/src/LocalProjectOpener.js +0 -46
  596. package/src/LocalProjectWriter.js +0 -96
  597. package/src/MapFor.js +0 -46
  598. package/src/ObjectSplitter.js +0 -187
  599. package/src/Serializer.js +0 -35
  600. package/src/build.js +0 -51
  601. package/src/runtime-files-list.js +0 -143
@@ -0,0 +1,2809 @@
1
+ // @flow
2
+ /**
3
+ * This is a declaration of an extension for GDevelop 5.
4
+ *
5
+ * ℹ️ Changes in this file are watched and automatically imported if the editor
6
+ * is running. You can also manually run `node import-GDJS-Runtime.js` (in newIDE/app/scripts).
7
+ *
8
+ * The file must be named "JsExtension.js", otherwise GDevelop won't load it.
9
+ * ⚠️ If you make a change and the extension is not loaded, open the developer console
10
+ * and search for any errors.
11
+ *
12
+ * More information on https://github.com/4ian/GDevelop/blob/master/newIDE/README-extensions.md
13
+ */
14
+
15
+ /*::
16
+ // Import types to allow Flow to do static type checking on this file.
17
+ // Extensions declaration are typed using Flow (like the editor), but the files
18
+ // for the game engine are checked with TypeScript annotations.
19
+ import { type ObjectsRenderingService, type ObjectsEditorService } from '../JsExtensionTypes.flow.js'
20
+ */
21
+
22
+ module.exports = {
23
+ createExtension: function (
24
+ _ /*: (string) => string */,
25
+ gd /*: libGDevelop */
26
+ ) {
27
+ const extension = new gd.PlatformExtension();
28
+ extension
29
+ .setExtensionInformation(
30
+ 'Scene3D',
31
+ _('3D'),
32
+ _('Support for 3D in GDevelop.'),
33
+ 'Florian Rival',
34
+ 'MIT'
35
+ )
36
+ .setCategory('General');
37
+ extension
38
+ .addInstructionOrExpressionGroupMetadata(_('3D'))
39
+ .setIcon('res/conditions/3d_box.svg');
40
+
41
+ {
42
+ const object = extension
43
+ .addObject(
44
+ 'Model3DObject',
45
+ _('3D Model'),
46
+ _('A 3D model.'),
47
+ 'JsPlatform/Extensions/3d_box.svg',
48
+ new gd.Model3DObjectConfiguration()
49
+ )
50
+ .setCategoryFullName(_('3D'))
51
+ .addUnsupportedBaseObjectCapability('effect')
52
+ .setIncludeFile('Extensions/3D/A_RuntimeObject3D.js')
53
+ .addIncludeFile('Extensions/3D/A_RuntimeObject3DRenderer.js')
54
+ .addIncludeFile('Extensions/3D/Model3DRuntimeObject.js')
55
+ .addIncludeFile('Extensions/3D/Model3DRuntimeObject3DRenderer.js');
56
+
57
+ // Properties expressions/conditions/actions:
58
+ object
59
+ .addExpressionAndConditionAndAction(
60
+ 'number',
61
+ 'Z',
62
+ _('Z (elevation)'),
63
+ _('the Z position (the "elevation")'),
64
+ _('the Z position'),
65
+ _('Position'),
66
+ 'res/conditions/3d_box.svg'
67
+ )
68
+ .addParameter('object', _('3D model'), 'Model3DObject', false)
69
+ .useStandardParameters('number', gd.ParameterOptions.makeNewOptions())
70
+ .setFunctionName('setZ')
71
+ .setGetter('getZ');
72
+
73
+ object
74
+ .addExpressionAndConditionAndAction(
75
+ 'number',
76
+ 'Depth',
77
+ _('Depth (size on Z axis)'),
78
+ _('the depth (size on Z axis)'),
79
+ _('the depth'),
80
+ _('Size'),
81
+ 'res/conditions/3d_box.svg'
82
+ )
83
+ .addParameter('object', _('3D model'), 'Model3DObject', false)
84
+ .useStandardParameters('number', gd.ParameterOptions.makeNewOptions())
85
+ .setFunctionName('setDepth')
86
+ .setGetter('getDepth');
87
+
88
+ object
89
+ .addScopedAction(
90
+ 'SetWidth',
91
+ _('Width'),
92
+ _('Change the width of an object.'),
93
+ _('the width'),
94
+ _('Size'),
95
+ 'res/actions/scaleWidth24_black.png',
96
+ 'res/actions/scaleWidth_black.png'
97
+ )
98
+ .addParameter('object', _('3D model'), 'Model3DObject', false)
99
+ .useStandardOperatorParameters(
100
+ 'number',
101
+ gd.ParameterOptions.makeNewOptions()
102
+ )
103
+ .markAsAdvanced()
104
+ .setFunctionName('setWidth')
105
+ .setGetter('getWidth');
106
+
107
+ object
108
+ .addScopedCondition(
109
+ 'Width',
110
+ _('Width'),
111
+ _('Compare the width of an object.'),
112
+ _('the width'),
113
+ _('Size'),
114
+ 'res/actions/scaleWidth24_black.png',
115
+ 'res/actions/scaleWidth_black.png'
116
+ )
117
+ .addParameter('object', _('3D model'), 'Model3DObject', false)
118
+ .useStandardRelationalOperatorParameters(
119
+ 'number',
120
+ gd.ParameterOptions.makeNewOptions()
121
+ )
122
+ .markAsAdvanced()
123
+ .setFunctionName('getWidth');
124
+
125
+ object
126
+ .addScopedAction(
127
+ 'SetHeight',
128
+ _('Height'),
129
+ _('Change the height of an object.'),
130
+ _('the height'),
131
+ _('Size'),
132
+ 'res/actions/scaleHeight24_black.png',
133
+ 'res/actions/scaleHeight_black.png'
134
+ )
135
+ .addParameter('object', _('3D model'), 'Model3DObject', false)
136
+ .useStandardOperatorParameters(
137
+ 'number',
138
+ gd.ParameterOptions.makeNewOptions()
139
+ )
140
+ .markAsAdvanced()
141
+ .setFunctionName('setHeight')
142
+ .setGetter('getHeight');
143
+
144
+ object
145
+ .addScopedCondition(
146
+ 'Height',
147
+ _('Height'),
148
+ _('Compare the height of an object.'),
149
+ _('the height'),
150
+ _('Size'),
151
+ 'res/actions/scaleHeight24_black.png',
152
+ 'res/actions/scaleHeight_black.png'
153
+ )
154
+ .addParameter('object', _('3D model'), 'Model3DObject', false)
155
+ .useStandardRelationalOperatorParameters(
156
+ 'number',
157
+ gd.ParameterOptions.makeNewOptions()
158
+ )
159
+ .markAsAdvanced()
160
+ .setFunctionName('getHeight');
161
+
162
+ object
163
+ .addExpressionAndConditionAndAction(
164
+ 'number',
165
+ 'Height',
166
+ _('Height'),
167
+ _('the height'),
168
+ _('the height'),
169
+ _('Size'),
170
+ 'res/actions/scaleHeight24_black.png'
171
+ )
172
+ .addParameter('object', _('3D model'), 'Model3DObject', false)
173
+ .useStandardParameters('number', gd.ParameterOptions.makeNewOptions())
174
+ .setFunctionName('setHeight')
175
+ .setGetter('getHeight');
176
+
177
+ object
178
+ .addScopedAction(
179
+ 'Scale',
180
+ _('Scale'),
181
+ _('Modify the scale of the specified object.'),
182
+ _('the scale'),
183
+ _('Size'),
184
+ 'res/actions/scale24_black.png',
185
+ 'res/actions/scale_black.png'
186
+ )
187
+ .addParameter('object', _('3D model'), 'Model3DObject', false)
188
+ .useStandardOperatorParameters(
189
+ 'number',
190
+ gd.ParameterOptions.makeNewOptions().setDescription(
191
+ _('Scale (1 by default)')
192
+ )
193
+ )
194
+ .markAsAdvanced()
195
+ .setFunctionName('setScale')
196
+ .setGetter('getScale');
197
+
198
+ object
199
+ .addExpressionAndConditionAndAction(
200
+ 'number',
201
+ 'ScaleX',
202
+ _('Scale on X axis'),
203
+ _("the width's scale of an object"),
204
+ _("the width's scale"),
205
+ _('Size'),
206
+ 'res/actions/scaleWidth24_black.png'
207
+ )
208
+ .addParameter('object', _('3D model'), 'Model3DObject', false)
209
+ .useStandardParameters(
210
+ 'number',
211
+ gd.ParameterOptions.makeNewOptions().setDescription(
212
+ _('Scale (1 by default)')
213
+ )
214
+ )
215
+ .markAsAdvanced()
216
+ .setFunctionName('setScaleX')
217
+ .setGetter('getScaleX');
218
+
219
+ object
220
+ .addExpressionAndConditionAndAction(
221
+ 'number',
222
+ 'ScaleY',
223
+ _('Scale on Y axis'),
224
+ _("the height's scale of an object"),
225
+ _("the height's scale"),
226
+ _('Size'),
227
+ 'res/actions/scaleHeight24_black.png'
228
+ )
229
+ .addParameter('object', _('3D model'), 'Model3DObject', false)
230
+ .useStandardParameters(
231
+ 'number',
232
+ gd.ParameterOptions.makeNewOptions().setDescription(
233
+ _('Scale (1 by default)')
234
+ )
235
+ )
236
+ .markAsAdvanced()
237
+ .setFunctionName('setScaleY')
238
+ .setGetter('getScaleY');
239
+
240
+ object
241
+ .addExpressionAndConditionAndAction(
242
+ 'number',
243
+ 'ScaleZ',
244
+ _('Scale on Z axis'),
245
+ _("the depth's scale of an object"),
246
+ _("the depth's scale"),
247
+ _('Size'),
248
+ 'res/conditions/3d_box.svg'
249
+ )
250
+ .addParameter('object', _('3D model'), 'Model3DObject', false)
251
+ .useStandardParameters(
252
+ 'number',
253
+ gd.ParameterOptions.makeNewOptions().setDescription(
254
+ _('Scale (1 by default)')
255
+ )
256
+ )
257
+ .markAsAdvanced()
258
+ .setFunctionName('setScaleZ')
259
+ .setGetter('getScaleZ');
260
+
261
+ object
262
+ .addScopedAction(
263
+ 'FlipX',
264
+ _('Flip the object horizontally'),
265
+ _('Flip the object horizontally'),
266
+ _('Flip horizontally _PARAM0_: _PARAM1_'),
267
+ _('Effects'),
268
+ 'res/actions/flipX24.png',
269
+ 'res/actions/flipX.png'
270
+ )
271
+ .addParameter('object', _('3D model'), 'Model3DObject')
272
+ .addParameter('yesorno', _('Activate flipping'))
273
+ .markAsSimple()
274
+ .setFunctionName('flipX');
275
+
276
+ object
277
+ .addScopedAction(
278
+ 'FlipY',
279
+ _('Flip the object vertically'),
280
+ _('Flip the object vertically'),
281
+ _('Flip vertically _PARAM0_: _PARAM1_'),
282
+ _('Effects'),
283
+ 'res/actions/flipY24.png',
284
+ 'res/actions/flipY.png'
285
+ )
286
+ .addParameter('object', _('3D model'), 'Model3DObject')
287
+ .addParameter('yesorno', _('Activate flipping'))
288
+ .markAsSimple()
289
+ .setFunctionName('flipY');
290
+
291
+ object
292
+ .addScopedAction(
293
+ 'FlipZ',
294
+ _('Flip the object on Z'),
295
+ _('Flip the object on Z axis'),
296
+ _('Flip on Z axis _PARAM0_: _PARAM1_'),
297
+ _('Effects'),
298
+ 'res/conditions/3d_box.svg',
299
+ 'res/conditions/3d_box.svg'
300
+ )
301
+ .addParameter('object', _('3D model'), 'Model3DObject')
302
+ .addParameter('yesorno', _('Activate flipping'))
303
+ .markAsSimple()
304
+ .setFunctionName('flipZ');
305
+
306
+ object
307
+ .addScopedCondition(
308
+ 'FlippedX',
309
+ _('Horizontally flipped'),
310
+ _('Check if the object is horizontally flipped'),
311
+ _('_PARAM0_ is horizontally flipped'),
312
+ _('Effects'),
313
+ 'res/actions/flipX24.png',
314
+ 'res/actions/flipX.png'
315
+ )
316
+ .addParameter('object', _('3D model'), 'Model3DObject')
317
+ .setFunctionName('isFlippedX');
318
+
319
+ object
320
+ .addScopedCondition(
321
+ 'FlippedY',
322
+ _('Vertically flipped'),
323
+ _('Check if the object is vertically flipped'),
324
+ _('_PARAM0_ is vertically flipped'),
325
+ _('Effects'),
326
+ 'res/actions/flipY24.png',
327
+ 'res/actions/flipY.png'
328
+ )
329
+ .addParameter('object', _('3D model'), 'Model3DObject')
330
+ .setFunctionName('isFlippedY');
331
+
332
+ object
333
+ .addScopedCondition(
334
+ 'FlippedZ',
335
+ _('Flipped on Z'),
336
+ _('Check if the object is flipped on Z axis'),
337
+ _('_PARAM0_ is flipped on Z axis'),
338
+ _('Effects'),
339
+ 'res/conditions/3d_box.svg',
340
+ 'res/conditions/3d_box.svg'
341
+ )
342
+ .addParameter('object', _('3D model'), 'Model3DObject')
343
+ .setFunctionName('isFlippedZ');
344
+
345
+ object
346
+ .addExpressionAndConditionAndAction(
347
+ 'number',
348
+ 'RotationX',
349
+ _('Rotation on X axis'),
350
+ _('the rotation on X axis'),
351
+ _('the rotation on X axis'),
352
+ _('Angle'),
353
+ 'res/conditions/3d_box.svg'
354
+ )
355
+ .addParameter('object', _('3D model'), 'Model3DObject', false)
356
+ .useStandardParameters('number', gd.ParameterOptions.makeNewOptions())
357
+ .setFunctionName('setRotationX')
358
+ .setGetter('getRotationX');
359
+
360
+ object
361
+ .addExpressionAndConditionAndAction(
362
+ 'number',
363
+ 'RotationY',
364
+ _('Rotation on Y axis'),
365
+ _('the rotation on Y axis'),
366
+ _('the rotation on Y axis'),
367
+ _('Angle'),
368
+ 'res/conditions/3d_box.svg'
369
+ )
370
+ .addParameter('object', _('3D model'), 'Model3DObject', false)
371
+ .useStandardParameters('number', gd.ParameterOptions.makeNewOptions())
372
+ .setFunctionName('setRotationY')
373
+ .setGetter('getRotationY');
374
+
375
+ object
376
+ .addScopedAction(
377
+ 'TurnAroundX',
378
+ _('Turn around X axis'),
379
+ _(
380
+ "Turn the object around X axis. This axis doesn't move with the object rotation."
381
+ ),
382
+ _('Turn _PARAM0_ from _PARAM1_° around X axis'),
383
+ _('Angle'),
384
+ 'res/conditions/3d_box.svg',
385
+ 'res/conditions/3d_box.svg'
386
+ )
387
+ .addParameter('object', _('3D model'), 'Model3DObject', false)
388
+ .addParameter('number', _('Rotation angle'), '', false)
389
+ .markAsAdvanced()
390
+ .setFunctionName('turnAroundX');
391
+
392
+ object
393
+ .addScopedAction(
394
+ 'TurnAroundY',
395
+ _('Turn around Y axis'),
396
+ _(
397
+ "Turn the object around Y axis. This axis doesn't move with the object rotation."
398
+ ),
399
+ _('Turn _PARAM0_ from _PARAM1_° around Y axis'),
400
+ _('Angle'),
401
+ 'res/conditions/3d_box.svg',
402
+ 'res/conditions/3d_box.svg'
403
+ )
404
+ .addParameter('object', _('3D model'), 'Model3DObject', false)
405
+ .addParameter('number', _('Rotation angle'), '', false)
406
+ .markAsAdvanced()
407
+ .setFunctionName('turnAroundY');
408
+
409
+ object
410
+ .addScopedAction(
411
+ 'TurnAroundZ',
412
+ _('Turn around Z axis'),
413
+ _(
414
+ "Turn the object around Z axis. This axis doesn't move with the object rotation."
415
+ ),
416
+ _('Turn _PARAM0_ from _PARAM1_° around Z axis'),
417
+ _('Angle'),
418
+ 'res/conditions/3d_box.svg',
419
+ 'res/conditions/3d_box.svg'
420
+ )
421
+ .addParameter('object', _('3D model'), 'Model3DObject', false)
422
+ .addParameter('number', _('Rotation angle'), '', false)
423
+ .markAsAdvanced()
424
+ .setFunctionName('turnAroundZ');
425
+
426
+ object
427
+ .addExpressionAndConditionAndAction(
428
+ 'number',
429
+ 'Animation',
430
+ _('Animation (by number)'),
431
+ _(
432
+ 'the number of the animation played by the object (the number from the animations list)'
433
+ ),
434
+ _('the number of the animation'),
435
+ _('Animations and images'),
436
+ 'res/actions/animation24.png'
437
+ )
438
+ .addParameter('object', _('3D model'), 'Model3DObject')
439
+ .useStandardParameters('number', gd.ParameterOptions.makeNewOptions())
440
+ .markAsSimple()
441
+ .setFunctionName('setAnimationIndex')
442
+ .setGetter('getAnimationIndex');
443
+
444
+ object
445
+ .addExpressionAndConditionAndAction(
446
+ 'string',
447
+ 'AnimationName',
448
+ _('Animation (by name)'),
449
+ _('the animation played by the object'),
450
+ _('the animation'),
451
+ _('Animations and images'),
452
+ 'res/actions/animation24.png'
453
+ )
454
+ .addParameter('object', _('3D model'), 'Model3DObject')
455
+ .useStandardParameters(
456
+ 'objectAnimationName',
457
+ gd.ParameterOptions.makeNewOptions().setDescription(
458
+ _('Animation name')
459
+ )
460
+ )
461
+ .markAsAdvanced()
462
+ .setFunctionName('setAnimationName')
463
+ .setGetter('getAnimationName');
464
+
465
+ object
466
+ .addAction(
467
+ 'PauseAnimation',
468
+ _('Pause the animation'),
469
+ _('Pause the animation of the object'),
470
+ _('Pause the animation of _PARAM0_'),
471
+ _('Animations and images'),
472
+ 'res/actions/animation24.png',
473
+ 'res/actions/animation.png'
474
+ )
475
+ .addParameter('object', _('3D model'), 'Model3DObject')
476
+ .markAsSimple()
477
+ .setFunctionName('pauseAnimation');
478
+
479
+ object
480
+ .addAction(
481
+ 'ResumeAnimation',
482
+ _('Resume the animation'),
483
+ _('Resume the animation of the object'),
484
+ _('Resume the animation of _PARAM0_'),
485
+ _('Animations and images'),
486
+ 'res/actions/animation24.png',
487
+ 'res/actions/animation.png'
488
+ )
489
+ .addParameter('object', _('3D model'), 'Model3DObject')
490
+ .markAsSimple()
491
+ .setFunctionName('resumeAnimation');
492
+
493
+ object
494
+ .addExpressionAndConditionAndAction(
495
+ 'number',
496
+ 'AnimationSpeedScale',
497
+ _('Animation speed scale'),
498
+ _(
499
+ 'the animation speed scale (1 = the default speed, >1 = faster and <1 = slower)'
500
+ ),
501
+ _('the animation speed scale'),
502
+ _('Animations and images'),
503
+ 'res/actions/animation24.png'
504
+ )
505
+ .addParameter('object', _('3D model'), 'Model3DObject')
506
+ .useStandardParameters(
507
+ 'number',
508
+ gd.ParameterOptions.makeNewOptions().setDescription(_('Speed scale'))
509
+ )
510
+ .markAsSimple()
511
+ .setFunctionName('setAnimationSpeedScale')
512
+ .setGetter('getAnimationSpeedScale');
513
+
514
+ object
515
+ .addCondition(
516
+ 'IsAnimationPaused',
517
+ _('Animation paused'),
518
+ _('Check if the animation of an object is paused.'),
519
+ _('The animation of _PARAM0_ is paused'),
520
+ _('Animations and images'),
521
+ 'res/conditions/animation24.png',
522
+ 'res/conditions/animation.png'
523
+ )
524
+ .addParameter('object', _('3D model'), 'Model3DObject')
525
+ .markAsSimple()
526
+ .setFunctionName('isAnimationPaused');
527
+
528
+ object
529
+ .addCondition(
530
+ 'HasAnimationEnded',
531
+ _('Animation finished'),
532
+ _(
533
+ 'Check if the animation being played by the Sprite object is finished.'
534
+ ),
535
+ _('The animation of _PARAM0_ is finished'),
536
+ _('Animations and images'),
537
+ 'res/conditions/animation24.png',
538
+ 'res/conditions/animation.png'
539
+ )
540
+ .addParameter('object', _('3D model'), 'Model3DObject')
541
+ .markAsSimple()
542
+ .setFunctionName('hasAnimationEnded');
543
+ }
544
+
545
+ const Cube3DObject = new gd.ObjectJsImplementation();
546
+ // $FlowExpectedError - ignore Flow warning as we're creating an object
547
+ Cube3DObject.updateProperty = function (
548
+ objectContent,
549
+ propertyName,
550
+ newValue
551
+ ) {
552
+ if (
553
+ propertyName === 'width' ||
554
+ propertyName === 'height' ||
555
+ propertyName === 'depth'
556
+ ) {
557
+ objectContent[propertyName] = parseFloat(newValue);
558
+ return true;
559
+ }
560
+ if (
561
+ propertyName === 'frontFaceResourceName' ||
562
+ propertyName === 'backFaceResourceName' ||
563
+ propertyName === 'leftFaceResourceName' ||
564
+ propertyName === 'rightFaceResourceName' ||
565
+ propertyName === 'topFaceResourceName' ||
566
+ propertyName === 'bottomFaceResourceName' ||
567
+ propertyName === 'backFaceUpThroughWhichAxisRotation' ||
568
+ propertyName === 'facesOrientation' ||
569
+ propertyName === 'materialType'
570
+ ) {
571
+ objectContent[propertyName] = newValue;
572
+ return true;
573
+ }
574
+ if (
575
+ propertyName === 'frontFaceVisible' ||
576
+ propertyName === 'backFaceVisible' ||
577
+ propertyName === 'leftFaceVisible' ||
578
+ propertyName === 'rightFaceVisible' ||
579
+ propertyName === 'topFaceVisible' ||
580
+ propertyName === 'bottomFaceVisible' ||
581
+ propertyName === 'frontFaceResourceRepeat' ||
582
+ propertyName === 'backFaceResourceRepeat' ||
583
+ propertyName === 'leftFaceResourceRepeat' ||
584
+ propertyName === 'rightFaceResourceRepeat' ||
585
+ propertyName === 'topFaceResourceRepeat' ||
586
+ propertyName === 'bottomFaceResourceRepeat' ||
587
+ propertyName === 'enableTextureTransparency'
588
+ ) {
589
+ objectContent[propertyName] = newValue === '1';
590
+ return true;
591
+ }
592
+
593
+ return false;
594
+ };
595
+ // $FlowExpectedError - ignore Flow warning as we're creating an object
596
+ Cube3DObject.getProperties = function (objectContent) {
597
+ const objectProperties = new gd.MapStringPropertyDescriptor();
598
+
599
+ objectProperties
600
+ .getOrCreate('enableTextureTransparency')
601
+ .setValue(objectContent.enableTextureTransparency ? 'true' : 'false')
602
+ .setType('boolean')
603
+ .setLabel(_('Enable texture transparency'))
604
+ .setDescription(
605
+ _(
606
+ 'Enabling texture transparency has an impact on rendering performance.'
607
+ )
608
+ )
609
+ .setGroup(_('Texture settings'));
610
+
611
+ objectProperties
612
+ .getOrCreate('facesOrientation')
613
+ .setValue(objectContent.facesOrientation || 'Y')
614
+ .setType('choice')
615
+ .addExtraInfo('Y')
616
+ .addExtraInfo('Z')
617
+ .setLabel(_('Faces orientation'))
618
+ .setDescription(
619
+ _(
620
+ 'The top of each image can touch the **top face** (Y) or the **front face** (Z).'
621
+ )
622
+ )
623
+ .setGroup(_('Face orientation'));
624
+
625
+ objectProperties
626
+ .getOrCreate('width')
627
+ .setValue((objectContent.width || 0).toString())
628
+ .setType('number')
629
+ .setLabel(_('Width'))
630
+ .setMeasurementUnit(gd.MeasurementUnit.getPixel())
631
+ .setGroup(_('Default size'));
632
+
633
+ objectProperties
634
+ .getOrCreate('height')
635
+ .setValue((objectContent.height || 0).toString())
636
+ .setType('number')
637
+ .setLabel(_('Height'))
638
+ .setMeasurementUnit(gd.MeasurementUnit.getPixel())
639
+ .setGroup(_('Default size'));
640
+
641
+ objectProperties
642
+ .getOrCreate('depth')
643
+ .setValue((objectContent.depth || 0).toString())
644
+ .setType('number')
645
+ .setLabel(_('Depth'))
646
+ .setMeasurementUnit(gd.MeasurementUnit.getPixel())
647
+ .setGroup(_('Default size'));
648
+
649
+ objectProperties
650
+ .getOrCreate('frontFaceResourceName')
651
+ .setValue(objectContent.frontFaceResourceName || '')
652
+ .setType('resource')
653
+ .addExtraInfo('image')
654
+ .setLabel(_('Front face image'))
655
+ .setGroup(_('Textures'));
656
+
657
+ objectProperties
658
+ .getOrCreate('backFaceResourceName')
659
+ .setValue(objectContent.backFaceResourceName || '')
660
+ .setType('resource')
661
+ .addExtraInfo('image')
662
+ .setLabel(_('Back face image'))
663
+ .setGroup(_('Textures'));
664
+
665
+ objectProperties
666
+ .getOrCreate('backFaceUpThroughWhichAxisRotation')
667
+ .setValue(objectContent.backFaceUpThroughWhichAxisRotation || 'X')
668
+ .setType('choice')
669
+ .addExtraInfo('X')
670
+ .addExtraInfo('Y')
671
+ .setLabel(_('Back face orientation'))
672
+ .setDescription(
673
+ _(
674
+ 'The top of the image can touch the **top face** (Y) or the **bottom face** (X).'
675
+ )
676
+ )
677
+ .setGroup(_('Textures'));
678
+
679
+ objectProperties
680
+ .getOrCreate('leftFaceResourceName')
681
+ .setValue(objectContent.leftFaceResourceName || '')
682
+ .setType('resource')
683
+ .addExtraInfo('image')
684
+ .setLabel(_('Left face image'))
685
+ .setGroup(_('Textures'));
686
+
687
+ objectProperties
688
+ .getOrCreate('rightFaceResourceName')
689
+ .setValue(objectContent.rightFaceResourceName || '')
690
+ .setType('resource')
691
+ .addExtraInfo('image')
692
+ .setLabel(_('Right face image'))
693
+ .setGroup(_('Textures'));
694
+
695
+ objectProperties
696
+ .getOrCreate('topFaceResourceName')
697
+ .setValue(objectContent.topFaceResourceName || '')
698
+ .setType('resource')
699
+ .addExtraInfo('image')
700
+ .setLabel(_('Top face image'))
701
+ .setGroup(_('Textures'));
702
+
703
+ objectProperties
704
+ .getOrCreate('bottomFaceResourceName')
705
+ .setValue(objectContent.bottomFaceResourceName || '')
706
+ .setType('resource')
707
+ .addExtraInfo('image')
708
+ .setLabel(_('Bottom face image'))
709
+ .setGroup(_('Textures'));
710
+
711
+ objectProperties
712
+ .getOrCreate('frontFaceResourceRepeat')
713
+ .setValue(objectContent.frontFaceResourceRepeat ? 'true' : 'false')
714
+ .setType('boolean')
715
+ .setLabel(_('Tile front face image'))
716
+ .setGroup(_('Textures'));
717
+
718
+ objectProperties
719
+ .getOrCreate('backFaceResourceRepeat')
720
+ .setValue(objectContent.backFaceResourceRepeat ? 'true' : 'false')
721
+ .setType('boolean')
722
+ .setLabel(_('Tile back face image'))
723
+ .setGroup(_('Textures'));
724
+
725
+ objectProperties
726
+ .getOrCreate('leftFaceResourceRepeat')
727
+ .setValue(objectContent.leftFaceResourceRepeat ? 'true' : 'false')
728
+ .setType('boolean')
729
+ .setLabel(_('Tile left face image'))
730
+ .setGroup(_('Textures'));
731
+
732
+ objectProperties
733
+ .getOrCreate('rightFaceResourceRepeat')
734
+ .setValue(objectContent.rightFaceResourceRepeat ? 'true' : 'false')
735
+ .setType('boolean')
736
+ .setLabel(_('Tile right face image'))
737
+ .setGroup(_('Textures'));
738
+
739
+ objectProperties
740
+ .getOrCreate('topFaceResourceRepeat')
741
+ .setValue(objectContent.topFaceResourceRepeat ? 'true' : 'false')
742
+ .setType('boolean')
743
+ .setLabel(_('Tile top face image'))
744
+ .setGroup(_('Textures'));
745
+
746
+ objectProperties
747
+ .getOrCreate('bottomFaceResourceRepeat')
748
+ .setValue(objectContent.bottomFaceResourceRepeat ? 'true' : 'false')
749
+ .setType('boolean')
750
+ .setLabel(_('Tile bottom face image'))
751
+ .setGroup(_('Textures'));
752
+
753
+ objectProperties
754
+ .getOrCreate('frontFaceVisible')
755
+ .setValue(objectContent.frontFaceVisible ? 'true' : 'false')
756
+ .setType('boolean')
757
+ .setLabel(_('Show front face'))
758
+ .setGroup(_('Face visibility'));
759
+
760
+ objectProperties
761
+ .getOrCreate('backFaceVisible')
762
+ .setValue(objectContent.backFaceVisible ? 'true' : 'false')
763
+ .setType('boolean')
764
+ .setLabel(_('Show back face'))
765
+ .setGroup(_('Face visibility'));
766
+
767
+ objectProperties
768
+ .getOrCreate('leftFaceVisible')
769
+ .setValue(objectContent.leftFaceVisible ? 'true' : 'false')
770
+ .setType('boolean')
771
+ .setLabel(_('Show left face'))
772
+ .setGroup(_('Face visibility'));
773
+
774
+ objectProperties
775
+ .getOrCreate('rightFaceVisible')
776
+ .setValue(objectContent.rightFaceVisible ? 'true' : 'false')
777
+ .setType('boolean')
778
+ .setLabel(_('Show right face'))
779
+ .setGroup(_('Face visibility'));
780
+
781
+ objectProperties
782
+ .getOrCreate('topFaceVisible')
783
+ .setValue(objectContent.topFaceVisible ? 'true' : 'false')
784
+ .setType('boolean')
785
+ .setLabel(_('Show top face'))
786
+ .setGroup(_('Face visibility'));
787
+
788
+ objectProperties
789
+ .getOrCreate('bottomFaceVisible')
790
+ .setValue(objectContent.bottomFaceVisible ? 'true' : 'false')
791
+ .setType('boolean')
792
+ .setLabel(_('Show bottom face'))
793
+ .setGroup(_('Face visibility'));
794
+
795
+ objectProperties
796
+ .getOrCreate('materialType')
797
+ .setValue(objectContent.materialType || 'Basic')
798
+ .setType('choice')
799
+ .addExtraInfo('Basic')
800
+ .addExtraInfo('StandardWithoutMetalness')
801
+ .setLabel(_('Material type'));
802
+
803
+ return objectProperties;
804
+ };
805
+ Cube3DObject.setRawJSONContent(
806
+ JSON.stringify({
807
+ width: 100,
808
+ height: 100,
809
+ depth: 100,
810
+ enableTextureTransparency: false,
811
+ facesOrientation: 'Y',
812
+ frontFaceResourceName: '',
813
+ backFaceResourceName: '',
814
+ backFaceUpThroughWhichAxisRotation: 'X',
815
+ leftFaceResourceName: '',
816
+ rightFaceResourceName: '',
817
+ topFaceResourceName: '',
818
+ bottomFaceResourceName: '',
819
+ frontFaceVisible: true,
820
+ backFaceVisible: false,
821
+ leftFaceVisible: true,
822
+ rightFaceVisible: true,
823
+ topFaceVisible: true,
824
+ bottomFaceVisible: true,
825
+ frontFaceResourceRepeat: false,
826
+ backFaceResourceRepeat: false,
827
+ leftFaceResourceRepeat: false,
828
+ rightFaceResourceRepeat: false,
829
+ topFaceResourceRepeat: false,
830
+ bottomFaceResourceRepeat: false,
831
+ materialType: 'Basic',
832
+ })
833
+ );
834
+
835
+ // $FlowExpectedError
836
+ Cube3DObject.updateInitialInstanceProperty = function (
837
+ objectContent,
838
+ instance,
839
+ propertyName,
840
+ newValue,
841
+ project,
842
+ layout
843
+ ) {
844
+ return false;
845
+ };
846
+
847
+ // $FlowExpectedError
848
+ Cube3DObject.getInitialInstanceProperties = function (
849
+ content,
850
+ instance,
851
+ project,
852
+ layout
853
+ ) {
854
+ const instanceProperties = new gd.MapStringPropertyDescriptor();
855
+ return instanceProperties;
856
+ };
857
+
858
+ const object = extension
859
+ .addObject(
860
+ 'Cube3DObject',
861
+ _('3D Box'),
862
+ _('A 3D box.'),
863
+ 'JsPlatform/Extensions/3d_box.svg',
864
+ Cube3DObject
865
+ )
866
+ .setCategoryFullName(_('3D'))
867
+ .addUnsupportedBaseObjectCapability('effect')
868
+ .setIncludeFile('Extensions/3D/A_RuntimeObject3D.js')
869
+ .addIncludeFile('Extensions/3D/A_RuntimeObject3DRenderer.js')
870
+ .addIncludeFile('Extensions/3D/Cube3DRuntimeObject.js')
871
+ .addIncludeFile('Extensions/3D/Cube3DRuntimeObjectPixiRenderer.js');
872
+
873
+ // Properties expressions/conditions/actions:
874
+ object
875
+ .addExpressionAndConditionAndAction(
876
+ 'number',
877
+ 'Z',
878
+ _('Z (elevation)'),
879
+ _('the Z position (the "elevation")'),
880
+ _('the Z position'),
881
+ _('Position'),
882
+ 'res/conditions/3d_box.svg'
883
+ )
884
+ .addParameter('object', _('3D cube'), 'Cube3DObject', false)
885
+ .useStandardParameters('number', gd.ParameterOptions.makeNewOptions())
886
+ .setFunctionName('setZ')
887
+ .setGetter('getZ');
888
+
889
+ object
890
+ .addExpressionAndConditionAndAction(
891
+ 'number',
892
+ 'Depth',
893
+ _('Depth (size on Z axis)'),
894
+ _('the depth (size on Z axis)'),
895
+ _('the depth'),
896
+ _('Size'),
897
+ 'res/conditions/3d_box.svg'
898
+ )
899
+ .addParameter('object', _('3D cube'), 'Cube3DObject', false)
900
+ .useStandardParameters('number', gd.ParameterOptions.makeNewOptions())
901
+ .setFunctionName('setDepth')
902
+ .setGetter('getDepth');
903
+
904
+ object
905
+ .addScopedAction(
906
+ 'SetWidth',
907
+ _('Width'),
908
+ _('Change the width of an object.'),
909
+ _('the width'),
910
+ _('Size'),
911
+ 'res/actions/scaleWidth24_black.png',
912
+ 'res/actions/scaleWidth_black.png'
913
+ )
914
+ .addParameter('object', _('3D cube'), 'Cube3DObject', false)
915
+ .useStandardOperatorParameters(
916
+ 'number',
917
+ gd.ParameterOptions.makeNewOptions()
918
+ )
919
+ .markAsAdvanced()
920
+ .setFunctionName('setWidth')
921
+ .setGetter('getWidth');
922
+
923
+ object
924
+ .addScopedCondition(
925
+ 'Width',
926
+ _('Width'),
927
+ _('Compare the width of an object.'),
928
+ _('the width'),
929
+ _('Size'),
930
+ 'res/actions/scaleWidth24_black.png',
931
+ 'res/actions/scaleWidth_black.png'
932
+ )
933
+ .addParameter('object', _('3D cube'), 'Cube3DObject', false)
934
+ .useStandardRelationalOperatorParameters(
935
+ 'number',
936
+ gd.ParameterOptions.makeNewOptions()
937
+ )
938
+ .markAsAdvanced()
939
+ .setFunctionName('getWidth');
940
+
941
+ object
942
+ .addScopedAction(
943
+ 'SetHeight',
944
+ _('Height'),
945
+ _('Change the height of an object.'),
946
+ _('the height'),
947
+ _('Size'),
948
+ 'res/actions/scaleHeight24_black.png',
949
+ 'res/actions/scaleHeight_black.png'
950
+ )
951
+ .addParameter('object', _('3D cube'), 'Cube3DObject', false)
952
+ .useStandardOperatorParameters(
953
+ 'number',
954
+ gd.ParameterOptions.makeNewOptions()
955
+ )
956
+ .markAsAdvanced()
957
+ .setFunctionName('setHeight')
958
+ .setGetter('getHeight');
959
+
960
+ object
961
+ .addScopedCondition(
962
+ 'Height',
963
+ _('Height'),
964
+ _('Compare the height of an object.'),
965
+ _('the height'),
966
+ _('Size'),
967
+ 'res/actions/scaleHeight24_black.png',
968
+ 'res/actions/scaleHeight_black.png'
969
+ )
970
+ .addParameter('object', _('3D cube'), 'Cube3DObject', false)
971
+ .useStandardRelationalOperatorParameters(
972
+ 'number',
973
+ gd.ParameterOptions.makeNewOptions()
974
+ )
975
+ .markAsAdvanced()
976
+ .setFunctionName('getHeight');
977
+
978
+ object
979
+ .addScopedAction(
980
+ 'Scale',
981
+ _('Scale'),
982
+ _('Modify the scale of the specified object.'),
983
+ _('the scale'),
984
+ _('Size'),
985
+ 'res/actions/scale24_black.png',
986
+ 'res/actions/scale_black.png'
987
+ )
988
+ .addParameter('object', _('3D cube'), 'Cube3DObject', false)
989
+ .useStandardOperatorParameters(
990
+ 'number',
991
+ gd.ParameterOptions.makeNewOptions().setDescription(
992
+ _('Scale (1 by default)')
993
+ )
994
+ )
995
+ .markAsAdvanced()
996
+ .setFunctionName('setScale')
997
+ .setGetter('getScale');
998
+
999
+ object
1000
+ .addExpressionAndConditionAndAction(
1001
+ 'number',
1002
+ 'ScaleX',
1003
+ _('Scale on X axis'),
1004
+ _("the width's scale of an object"),
1005
+ _("the width's scale"),
1006
+ _('Size'),
1007
+ 'res/actions/scaleWidth24_black.png'
1008
+ )
1009
+ .addParameter('object', _('3D cube'), 'Cube3DObject', false)
1010
+ .useStandardParameters(
1011
+ 'number',
1012
+ gd.ParameterOptions.makeNewOptions().setDescription(
1013
+ _('Scale (1 by default)')
1014
+ )
1015
+ )
1016
+ .markAsAdvanced()
1017
+ .setFunctionName('setScaleX')
1018
+ .setGetter('getScaleX');
1019
+
1020
+ object
1021
+ .addExpressionAndConditionAndAction(
1022
+ 'number',
1023
+ 'ScaleY',
1024
+ _('Scale on Y axis'),
1025
+ _("the height's scale of an object"),
1026
+ _("the height's scale"),
1027
+ _('Size'),
1028
+ 'res/actions/scaleHeight24_black.png'
1029
+ )
1030
+ .addParameter('object', _('3D cube'), 'Cube3DObject', false)
1031
+ .useStandardParameters(
1032
+ 'number',
1033
+ gd.ParameterOptions.makeNewOptions().setDescription(
1034
+ _('Scale (1 by default)')
1035
+ )
1036
+ )
1037
+ .markAsAdvanced()
1038
+ .setFunctionName('setScaleY')
1039
+ .setGetter('getScaleY');
1040
+
1041
+ object
1042
+ .addExpressionAndConditionAndAction(
1043
+ 'number',
1044
+ 'ScaleZ',
1045
+ _('Scale on Z axis'),
1046
+ _("the depth's scale of an object"),
1047
+ _("the depth's scale"),
1048
+ _('Size'),
1049
+ 'res/conditions/3d_box.svg'
1050
+ )
1051
+ .addParameter('object', _('3D cube'), 'Cube3DObject', false)
1052
+ .useStandardParameters(
1053
+ 'number',
1054
+ gd.ParameterOptions.makeNewOptions().setDescription(
1055
+ _('Scale (1 by default)')
1056
+ )
1057
+ )
1058
+ .markAsAdvanced()
1059
+ .setFunctionName('setScaleZ')
1060
+ .setGetter('getScaleZ');
1061
+
1062
+ object
1063
+ .addScopedAction(
1064
+ 'FlipX',
1065
+ _('Flip the object horizontally'),
1066
+ _('Flip the object horizontally'),
1067
+ _('Flip horizontally _PARAM0_: _PARAM1_'),
1068
+ _('Effects'),
1069
+ 'res/actions/flipX24.png',
1070
+ 'res/actions/flipX.png'
1071
+ )
1072
+ .addParameter('object', _('3D cube'), 'Cube3DObject')
1073
+ .addParameter('yesorno', _('Activate flipping'))
1074
+ .markAsSimple()
1075
+ .setFunctionName('flipX');
1076
+
1077
+ object
1078
+ .addScopedAction(
1079
+ 'FlipY',
1080
+ _('Flip the object vertically'),
1081
+ _('Flip the object vertically'),
1082
+ _('Flip vertically _PARAM0_: _PARAM1_'),
1083
+ _('Effects'),
1084
+ 'res/actions/flipY24.png',
1085
+ 'res/actions/flipY.png'
1086
+ )
1087
+ .addParameter('object', _('3D cube'), 'Cube3DObject')
1088
+ .addParameter('yesorno', _('Activate flipping'))
1089
+ .markAsSimple()
1090
+ .setFunctionName('flipY');
1091
+
1092
+ object
1093
+ .addScopedAction(
1094
+ 'FlipZ',
1095
+ _('Flip the object on Z'),
1096
+ _('Flip the object on Z axis'),
1097
+ _('Flip on Z axis _PARAM0_: _PARAM1_'),
1098
+ _('Effects'),
1099
+ 'res/conditions/3d_box.svg',
1100
+ 'res/conditions/3d_box.svg'
1101
+ )
1102
+ .addParameter('object', _('3D cube'), 'Cube3DObject')
1103
+ .addParameter('yesorno', _('Activate flipping'))
1104
+ .markAsSimple()
1105
+ .setFunctionName('flipZ');
1106
+
1107
+ object
1108
+ .addScopedCondition(
1109
+ 'FlippedX',
1110
+ _('Horizontally flipped'),
1111
+ _('Check if the object is horizontally flipped'),
1112
+ _('_PARAM0_ is horizontally flipped'),
1113
+ _('Effects'),
1114
+ 'res/actions/flipX24.png',
1115
+ 'res/actions/flipX.png'
1116
+ )
1117
+ .addParameter('object', _('3D cube'), 'Cube3DObject')
1118
+ .setFunctionName('isFlippedX');
1119
+
1120
+ object
1121
+ .addScopedCondition(
1122
+ 'FlippedY',
1123
+ _('Vertically flipped'),
1124
+ _('Check if the object is vertically flipped'),
1125
+ _('_PARAM0_ is vertically flipped'),
1126
+ _('Effects'),
1127
+ 'res/actions/flipY24.png',
1128
+ 'res/actions/flipY.png'
1129
+ )
1130
+ .addParameter('object', _('3D cube'), 'Cube3DObject')
1131
+ .setFunctionName('isFlippedY');
1132
+
1133
+ object
1134
+ .addScopedCondition(
1135
+ 'FlippedZ',
1136
+ _('Flipped on Z'),
1137
+ _('Check if the object is flipped on Z axis'),
1138
+ _('_PARAM0_ is flipped on Z axis'),
1139
+ _('Effects'),
1140
+ 'res/conditions/3d_box.svg',
1141
+ 'res/conditions/3d_box.svg'
1142
+ )
1143
+ .addParameter('object', _('3D cube'), 'Cube3DObject')
1144
+ .setFunctionName('isFlippedZ');
1145
+
1146
+ object
1147
+ .addExpressionAndConditionAndAction(
1148
+ 'number',
1149
+ 'RotationX',
1150
+ _('Rotation on X axis'),
1151
+ _('the rotation on X axis'),
1152
+ _('the rotation on X axis'),
1153
+ _('Angle'),
1154
+ 'res/conditions/3d_box.svg'
1155
+ )
1156
+ .addParameter('object', _('3D cube'), 'Cube3DObject', false)
1157
+ .useStandardParameters('number', gd.ParameterOptions.makeNewOptions())
1158
+ .setFunctionName('setRotationX')
1159
+ .setGetter('getRotationX');
1160
+
1161
+ object
1162
+ .addExpressionAndConditionAndAction(
1163
+ 'number',
1164
+ 'RotationY',
1165
+ _('Rotation on Y axis'),
1166
+ _('the rotation on Y axis'),
1167
+ _('the rotation on Y axis'),
1168
+ _('Angle'),
1169
+ 'res/conditions/3d_box.svg'
1170
+ )
1171
+ .addParameter('object', _('3D cube'), 'Cube3DObject', false)
1172
+ .useStandardParameters('number', gd.ParameterOptions.makeNewOptions())
1173
+ .setFunctionName('setRotationY')
1174
+ .setGetter('getRotationY');
1175
+
1176
+ object
1177
+ .addExpressionAndConditionAndAction(
1178
+ 'boolean',
1179
+ 'FaceVisibility',
1180
+ _('Face visibility'),
1181
+ _('a face should be visible'),
1182
+ _('having its _PARAM1_ face visible'),
1183
+ _('Face'),
1184
+ 'res/conditions/3d_box.svg'
1185
+ )
1186
+ .addParameter('object', _('3D cube'), 'Cube3DObject', false)
1187
+ .addParameter(
1188
+ 'stringWithSelector',
1189
+ _('Face'),
1190
+ JSON.stringify(['front', 'back', 'left', 'right', 'top', 'bottom']),
1191
+ false
1192
+ )
1193
+ .useStandardParameters(
1194
+ 'boolean',
1195
+ gd.ParameterOptions.makeNewOptions().setDescription(_('Visible?'))
1196
+ )
1197
+ .setFunctionName('setFaceVisibility')
1198
+ .setGetter('isFaceVisible');
1199
+
1200
+ object
1201
+ .addScopedAction(
1202
+ 'TurnAroundX',
1203
+ _('Turn around X axis'),
1204
+ _(
1205
+ "Turn the object around X axis. This axis doesn't move with the object rotation."
1206
+ ),
1207
+ _('Turn _PARAM0_ from _PARAM1_° around X axis'),
1208
+ _('Angle'),
1209
+ 'res/conditions/3d_box.svg',
1210
+ 'res/conditions/3d_box.svg'
1211
+ )
1212
+ .addParameter('object', _('3D cube'), 'Cube3DObject', false)
1213
+ .addParameter('number', _('Rotation angle'), '', false)
1214
+ .markAsAdvanced()
1215
+ .setFunctionName('turnAroundX');
1216
+
1217
+ object
1218
+ .addScopedAction(
1219
+ 'TurnAroundY',
1220
+ _('Turn around Y axis'),
1221
+ _(
1222
+ "Turn the object around Y axis. This axis doesn't move with the object rotation."
1223
+ ),
1224
+ _('Turn _PARAM0_ from _PARAM1_° around Y axis'),
1225
+ _('Angle'),
1226
+ 'res/conditions/3d_box.svg',
1227
+ 'res/conditions/3d_box.svg'
1228
+ )
1229
+ .addParameter('object', _('3D cube'), 'Cube3DObject', false)
1230
+ .addParameter('number', _('Rotation angle'), '', false)
1231
+ .markAsAdvanced()
1232
+ .setFunctionName('turnAroundY');
1233
+
1234
+ object
1235
+ .addScopedAction(
1236
+ 'TurnAroundZ',
1237
+ _('Turn around Z axis'),
1238
+ _(
1239
+ "Turn the object around Z axis. This axis doesn't move with the object rotation."
1240
+ ),
1241
+ _('Turn _PARAM0_ from _PARAM1_° around Z axis'),
1242
+ _('Angle'),
1243
+ 'res/conditions/3d_box.svg',
1244
+ 'res/conditions/3d_box.svg'
1245
+ )
1246
+ .addParameter('object', _('3D cube'), 'Cube3DObject', false)
1247
+ .addParameter('number', _('Rotation angle'), '', false)
1248
+ .markAsAdvanced()
1249
+ .setFunctionName('turnAroundZ');
1250
+
1251
+ object
1252
+ .addScopedAction(
1253
+ 'SetFaceResource',
1254
+ _('Face image'),
1255
+ _('Change the image of the face.'),
1256
+ _('Change the image of _PARAM1_ face of _PARAM0_ to _PARAM2_'),
1257
+ _('Face'),
1258
+ 'res/conditions/3d_box.svg',
1259
+ 'res/conditions/3d_box.svg'
1260
+ )
1261
+ .addParameter('object', _('3D cube'), 'Cube3DObject', false)
1262
+ .addParameter(
1263
+ 'stringWithSelector',
1264
+ _('Face'),
1265
+ JSON.stringify(['front', 'back', 'left', 'right', 'top', 'bottom']),
1266
+ false
1267
+ )
1268
+ .addParameter('imageResource', _('Image'), '', false)
1269
+ .setFunctionName('setFaceResourceName');
1270
+
1271
+ extension
1272
+ .addExpressionAndConditionAndAction(
1273
+ 'number',
1274
+ 'CameraZ',
1275
+ _('Camera Z position'),
1276
+ _('the camera position on Z axis'),
1277
+ _('the camera position on Z axis'),
1278
+ '',
1279
+ 'res/conditions/3d_box.svg'
1280
+ )
1281
+ .addCodeOnlyParameter('currentScene', '')
1282
+ .useStandardParameters('number', gd.ParameterOptions.makeNewOptions())
1283
+ .addParameter('layer', _('Layer'), '', true)
1284
+ .setDefaultValue('""')
1285
+ .addParameter('expression', _('Camera number (default : 0)'), '', true)
1286
+ .setDefaultValue('0')
1287
+ .markAsAdvanced()
1288
+ .setFunctionName('gdjs.scene3d.camera.setCameraZ')
1289
+ .setGetter('gdjs.scene3d.camera.getCameraZ')
1290
+ .setIncludeFile('Extensions/3D/Scene3DTools.js');
1291
+
1292
+ extension
1293
+ .addExpressionAndConditionAndAction(
1294
+ 'number',
1295
+ 'CameraRotationX',
1296
+ _('Camera X rotation'),
1297
+ _('the camera rotation on X axis'),
1298
+ _('the camera rotation on X axis'),
1299
+ '',
1300
+ 'res/conditions/3d_box.svg'
1301
+ )
1302
+ .addCodeOnlyParameter('currentScene', '')
1303
+ .useStandardParameters(
1304
+ 'number',
1305
+ gd.ParameterOptions.makeNewOptions().setDescription(
1306
+ _('Angle (in degrees)')
1307
+ )
1308
+ )
1309
+ .addParameter('layer', _('Layer'), '', true)
1310
+ .setDefaultValue('""')
1311
+ .addParameter('expression', _('Camera number (default : 0)'), '', true)
1312
+ .setDefaultValue('0')
1313
+ .markAsAdvanced()
1314
+ .setFunctionName('gdjs.scene3d.camera.setCameraRotationX')
1315
+ .setGetter('gdjs.scene3d.camera.getCameraRotationX')
1316
+ .setIncludeFile('Extensions/3D/Scene3DTools.js');
1317
+
1318
+ extension
1319
+ .addExpressionAndConditionAndAction(
1320
+ 'number',
1321
+ 'CameraRotationY',
1322
+ _('Camera Y rotation'),
1323
+ _('the camera rotation on Y axis'),
1324
+ _('the camera rotation on Y axis'),
1325
+ '',
1326
+ 'res/conditions/3d_box.svg'
1327
+ )
1328
+ .addCodeOnlyParameter('currentScene', '')
1329
+ .useStandardParameters(
1330
+ 'number',
1331
+ gd.ParameterOptions.makeNewOptions().setDescription(
1332
+ _('Angle (in degrees)')
1333
+ )
1334
+ )
1335
+ .addParameter('layer', _('Layer'), '', true)
1336
+ .setDefaultValue('""')
1337
+ .addParameter('expression', _('Camera number (default : 0)'), '', true)
1338
+ .setDefaultValue('0')
1339
+ .markAsAdvanced()
1340
+ .setFunctionName('gdjs.scene3d.camera.setCameraRotationY')
1341
+ .setGetter('gdjs.scene3d.camera.getCameraRotationY')
1342
+ .setIncludeFile('Extensions/3D/Scene3DTools.js');
1343
+
1344
+ extension
1345
+ .addAction(
1346
+ 'TurnCameraTowardObject',
1347
+ _('Look at an object'),
1348
+ _(
1349
+ 'Change the camera rotation to look at an object. The camera top always face the screen.'
1350
+ ),
1351
+ _('Change the camera rotation of _PARAM2_ to look at _PARAM1_'),
1352
+ '',
1353
+ 'res/conditions/3d_box.svg',
1354
+ 'res/conditions/3d_box.svg'
1355
+ )
1356
+ .addCodeOnlyParameter('currentScene', '')
1357
+ .addParameter('objectPtr', _('Object'), '')
1358
+ .addParameter('layer', _('Layer'), '', true)
1359
+ .setDefaultValue('""')
1360
+ .addParameter('expression', _('Camera number (default : 0)'), '', true)
1361
+ .setDefaultValue('0')
1362
+ .addParameter('yesorno', _('Stand on Y instead of Z'), '', true)
1363
+ .setDefaultValue('false')
1364
+ .setFunctionName('gdjs.scene3d.camera.turnCameraTowardObject')
1365
+ .setIncludeFile('Extensions/3D/Scene3DTools.js');
1366
+
1367
+ extension
1368
+ .addAction(
1369
+ 'TurnCameraTowardPosition',
1370
+ _('Look at a position'),
1371
+ _(
1372
+ 'Change the camera rotation to look at a position. The camera top always face the screen.'
1373
+ ),
1374
+ _(
1375
+ 'Change the camera rotation of _PARAM4_ to look at _PARAM1_; _PARAM2_; _PARAM3_'
1376
+ ),
1377
+ '',
1378
+ 'res/conditions/3d_box.svg',
1379
+ 'res/conditions/3d_box.svg'
1380
+ )
1381
+ .addCodeOnlyParameter('currentScene', '')
1382
+ .addParameter('number', _('X position'))
1383
+ .addParameter('number', _('Y position'))
1384
+ .addParameter('number', _('Z position'))
1385
+ .addParameter('layer', _('Layer'), '', true)
1386
+ .setDefaultValue('""')
1387
+ .addParameter('expression', _('Camera number (default : 0)'), '', true)
1388
+ .setDefaultValue('0')
1389
+ .addParameter('yesorno', _('Stand on Y instead of Z'), '', true)
1390
+ .setDefaultValue('false')
1391
+ .setFunctionName('gdjs.scene3d.camera.turnCameraTowardPosition')
1392
+ .setIncludeFile('Extensions/3D/Scene3DTools.js');
1393
+
1394
+ extension
1395
+ .addExpressionAndConditionAndAction(
1396
+ 'number',
1397
+ 'CameraNearPlane',
1398
+ _('Camera near plane'),
1399
+ _('the camera near plane distance'),
1400
+ _('the camera near plane distance'),
1401
+ '',
1402
+ 'res/conditions/3d_box.svg'
1403
+ )
1404
+ .addCodeOnlyParameter('currentScene', '')
1405
+ .useStandardParameters(
1406
+ 'number',
1407
+ gd.ParameterOptions.makeNewOptions().setDescription(_('Distance (> 0)'))
1408
+ )
1409
+ .addParameter('layer', _('Layer'), '', true)
1410
+ .setDefaultValue('""')
1411
+ .addParameter('expression', _('Camera number (default : 0)'), '', true)
1412
+ .setDefaultValue('0')
1413
+ .markAsAdvanced()
1414
+ .setFunctionName('gdjs.scene3d.camera.setNearPlane')
1415
+ .setGetter('gdjs.scene3d.camera.getNearPlane')
1416
+ .setIncludeFile('Extensions/3D/Scene3DTools.js');
1417
+
1418
+ extension
1419
+ .addExpressionAndConditionAndAction(
1420
+ 'number',
1421
+ 'CameraFarPlane',
1422
+ _('Camera far plane'),
1423
+ _('the camera far plane distance'),
1424
+ _('the camera far plane distance'),
1425
+ '',
1426
+ 'res/conditions/3d_box.svg'
1427
+ )
1428
+ .addCodeOnlyParameter('currentScene', '')
1429
+ .useStandardParameters(
1430
+ 'number',
1431
+ gd.ParameterOptions.makeNewOptions().setDescription(_('Distance (> 0)'))
1432
+ )
1433
+ .addParameter('layer', _('Layer'), '', true)
1434
+ .setDefaultValue('""')
1435
+ .addParameter('expression', _('Camera number (default : 0)'), '', true)
1436
+ .setDefaultValue('0')
1437
+ .markAsAdvanced()
1438
+ .setFunctionName('gdjs.scene3d.camera.setFarPlane')
1439
+ .setGetter('gdjs.scene3d.camera.getFarPlane')
1440
+ .setIncludeFile('Extensions/3D/Scene3DTools.js');
1441
+
1442
+ extension
1443
+ .addExpressionAndConditionAndAction(
1444
+ 'number',
1445
+ 'CameraFov',
1446
+ _('Camera field of view (fov)'),
1447
+ _('the camera field of view'),
1448
+ _('the camera field of view'),
1449
+ '',
1450
+ 'res/conditions/3d_box.svg'
1451
+ )
1452
+ .addCodeOnlyParameter('currentScene', '')
1453
+ .useStandardParameters(
1454
+ 'number',
1455
+ gd.ParameterOptions.makeNewOptions().setDescription(
1456
+ _('Field of view in degrees (between 0° and 180°)')
1457
+ )
1458
+ )
1459
+ .addParameter('layer', _('Layer'), '', true)
1460
+ .setDefaultValue('""')
1461
+ .addParameter('expression', _('Camera number (default : 0)'), '', true)
1462
+ .setDefaultValue('0')
1463
+ .markAsAdvanced()
1464
+ .setFunctionName('gdjs.scene3d.camera.setFov')
1465
+ .setGetter('gdjs.scene3d.camera.getFov')
1466
+ .setIncludeFile('Extensions/3D/Scene3DTools.js');
1467
+
1468
+ {
1469
+ const effect = extension
1470
+ .addEffect('LinearFog')
1471
+ .setFullName(_('Fog (linear)'))
1472
+ .setDescription(_('Linear fog for 3D objects.'))
1473
+ .markAsNotWorkingForObjects()
1474
+ .markAsOnlyWorkingFor3D()
1475
+ .addIncludeFile('Extensions/3D/LinearFog.js');
1476
+ const properties = effect.getProperties();
1477
+ properties
1478
+ .getOrCreate('color')
1479
+ .setValue('255;255;255')
1480
+ .setLabel(_('Fog color'))
1481
+ .setType('color');
1482
+ properties
1483
+ .getOrCreate('near')
1484
+ .setValue('200')
1485
+ .setLabel(_('Distance where the fog starts'))
1486
+ .setType('number');
1487
+ properties
1488
+ .getOrCreate('far')
1489
+ .setValue('2000')
1490
+ .setLabel(_('Distance where the fog is fully opaque'))
1491
+ .setType('number');
1492
+ }
1493
+ {
1494
+ const effect = extension
1495
+ .addEffect('ExponentialFog')
1496
+ .setFullName(_('Fog (exponential)'))
1497
+ .setDescription(_('Exponential fog for 3D objects.'))
1498
+ .markAsNotWorkingForObjects()
1499
+ .markAsOnlyWorkingFor3D()
1500
+ .addIncludeFile('Extensions/3D/ExponentialFog.js');
1501
+ const properties = effect.getProperties();
1502
+ properties
1503
+ .getOrCreate('color')
1504
+ .setValue('255;255;255')
1505
+ .setLabel(_('Fog color'))
1506
+ .setType('color');
1507
+ properties
1508
+ .getOrCreate('density')
1509
+ .setValue('0.0012')
1510
+ .setLabel(_('Density'))
1511
+ .setType('number');
1512
+ }
1513
+ {
1514
+ const effect = extension
1515
+ .addEffect('AmbientLight')
1516
+ .setFullName(_('Ambient light'))
1517
+ .setDescription(
1518
+ _('A light that illuminates all objects from every direction.')
1519
+ )
1520
+ .markAsNotWorkingForObjects()
1521
+ .markAsOnlyWorkingFor3D()
1522
+ .addIncludeFile('Extensions/3D/AmbientLight.js');
1523
+ const properties = effect.getProperties();
1524
+ properties
1525
+ .getOrCreate('color')
1526
+ .setValue('255;255;255')
1527
+ .setLabel(_('Light color'))
1528
+ .setType('color');
1529
+ properties
1530
+ .getOrCreate('intensity')
1531
+ .setValue('0.75')
1532
+ .setLabel(_('Intensity'))
1533
+ .setType('number');
1534
+ }
1535
+ {
1536
+ const effect = extension
1537
+ .addEffect('DirectionalLight')
1538
+ .setFullName(_('Directional light'))
1539
+ .setDescription(_('A very far light source like the sun.'))
1540
+ .markAsNotWorkingForObjects()
1541
+ .markAsOnlyWorkingFor3D()
1542
+ .addIncludeFile('Extensions/3D/DirectionalLight.js');
1543
+ const properties = effect.getProperties();
1544
+ properties
1545
+ .getOrCreate('color')
1546
+ .setValue('255;255;255')
1547
+ .setLabel(_('Light color'))
1548
+ .setType('color');
1549
+ properties
1550
+ .getOrCreate('intensity')
1551
+ .setValue('0.5')
1552
+ .setLabel(_('Intensity'))
1553
+ .setType('number');
1554
+ properties
1555
+ .getOrCreate('top')
1556
+ .setValue('Y-')
1557
+ .setLabel(_('3D world top'))
1558
+ .setType('choice')
1559
+ .addExtraInfo('Y-')
1560
+ .addExtraInfo('Z+')
1561
+ .setGroup(_('Orientation'));
1562
+ properties
1563
+ .getOrCreate('elevation')
1564
+ .setValue('45')
1565
+ .setLabel(_('Elevation (in degrees)'))
1566
+ .setType('number')
1567
+ .setGroup(_('Orientation'))
1568
+ .setDescription(_('Maximal elevation is reached at 90°.'));
1569
+ properties
1570
+ .getOrCreate('rotation')
1571
+ .setValue('0')
1572
+ .setLabel(_('Rotation (in degrees)'))
1573
+ .setType('number')
1574
+ .setGroup(_('Orientation'));
1575
+ }
1576
+ {
1577
+ const effect = extension
1578
+ .addEffect('HemisphereLight')
1579
+ .setFullName(_('Hemisphere light'))
1580
+ .setDescription(
1581
+ _(
1582
+ 'A light that illuminates objects from every direction with a gradient.'
1583
+ )
1584
+ )
1585
+ .markAsNotWorkingForObjects()
1586
+ .markAsOnlyWorkingFor3D()
1587
+ .addIncludeFile('Extensions/3D/HemisphereLight.js');
1588
+ const properties = effect.getProperties();
1589
+ properties
1590
+ .getOrCreate('skyColor')
1591
+ .setValue('255;255;255')
1592
+ .setLabel(_('Sky color'))
1593
+ .setType('color');
1594
+ properties
1595
+ .getOrCreate('groundColor')
1596
+ .setValue('127;127;127')
1597
+ .setLabel(_('Ground color'))
1598
+ .setType('color');
1599
+ properties
1600
+ .getOrCreate('intensity')
1601
+ .setValue('0.5')
1602
+ .setLabel(_('Intensity'))
1603
+ .setType('number');
1604
+ properties
1605
+ .getOrCreate('top')
1606
+ .setValue('Y-')
1607
+ .setLabel(_('3D world top'))
1608
+ .setType('choice')
1609
+ .addExtraInfo('Y-')
1610
+ .addExtraInfo('Z+')
1611
+ .setGroup(_('Orientation'));
1612
+ properties
1613
+ .getOrCreate('elevation')
1614
+ .setValue('90')
1615
+ .setLabel(_('Elevation (in degrees)'))
1616
+ .setType('number')
1617
+ .setGroup(_('Orientation'))
1618
+ .setDescription(_('Maximal elevation is reached at 90°.'));
1619
+ properties
1620
+ .getOrCreate('rotation')
1621
+ .setValue('0')
1622
+ .setLabel(_('Rotation (in degrees)'))
1623
+ .setType('number')
1624
+ .setGroup(_('Orientation'));
1625
+ }
1626
+ // Don't forget to update the alert condition in Model3DEditor.js when
1627
+ // adding a new light.
1628
+
1629
+ return extension;
1630
+ },
1631
+ /**
1632
+ * You can optionally add sanity tests that will check the basic working
1633
+ * of your extension behaviors/objects by instantiating behaviors/objects
1634
+ * and setting the property to a given value.
1635
+ *
1636
+ * If you don't have any tests, you can simply return an empty array.
1637
+ *
1638
+ * But it is recommended to create tests for the behaviors/objects properties you created
1639
+ * to avoid mistakes.
1640
+ */
1641
+ runExtensionSanityTests: function (
1642
+ gd /*: libGDevelop */,
1643
+ extension /*: gdPlatformExtension*/
1644
+ ) {
1645
+ return [];
1646
+ },
1647
+ /**
1648
+ * Register editors for objects.
1649
+ *
1650
+ * ℹ️ Run `node import-GDJS-Runtime.js` (in newIDE/app/scripts) if you make any change.
1651
+ */
1652
+ registerEditorConfigurations: function (
1653
+ objectsEditorService /*: ObjectsEditorService */
1654
+ ) {},
1655
+ /**
1656
+ * Register renderers for instance of objects on the scene editor.
1657
+ *
1658
+ * ℹ️ Run `node import-GDJS-Runtime.js` (in newIDE/app/scripts) if you make any change.
1659
+ */
1660
+ registerInstanceRenderers: function (
1661
+ objectsRenderingService /*: ObjectsRenderingService */
1662
+ ) {
1663
+ const RenderedInstance = objectsRenderingService.RenderedInstance;
1664
+ const Rendered3DInstance = objectsRenderingService.Rendered3DInstance;
1665
+ const PIXI = objectsRenderingService.PIXI;
1666
+ const THREE = objectsRenderingService.THREE;
1667
+ const THREE_ADDONS = objectsRenderingService.THREE_ADDONS;
1668
+
1669
+ const materialIndexToFaceIndex = {
1670
+ // $FlowFixMe
1671
+ 0: 3,
1672
+ // $FlowFixMe
1673
+ 1: 2,
1674
+ // $FlowFixMe
1675
+ 2: 5,
1676
+ // $FlowFixMe
1677
+ 3: 4,
1678
+ // $FlowFixMe
1679
+ 4: 0,
1680
+ // $FlowFixMe
1681
+ 5: 1,
1682
+ };
1683
+
1684
+ const noRepeatTextureVertexIndexToUvMapping = {
1685
+ // $FlowFixMe
1686
+ 0: [0, 0],
1687
+ // $FlowFixMe
1688
+ 1: [1, 0],
1689
+ // $FlowFixMe
1690
+ 2: [0, 1],
1691
+ // $FlowFixMe
1692
+ 3: [1, 1],
1693
+ };
1694
+
1695
+ const noRepeatTextureVertexIndexToUvMappingForLeftAndRightFacesTowardsZ = {
1696
+ // $FlowFixMe
1697
+ 0: [0, 1],
1698
+ // $FlowFixMe
1699
+ 1: [0, 0],
1700
+ // $FlowFixMe
1701
+ 2: [1, 1],
1702
+ // $FlowFixMe
1703
+ 3: [1, 0],
1704
+ };
1705
+
1706
+ const getFirstVisibleFaceResourceName = (objectConfiguration) => {
1707
+ const properties = objectConfiguration.getProperties();
1708
+
1709
+ const orderedFaces = [
1710
+ ['frontFaceVisible', 'frontFaceResourceName'],
1711
+ ['backFaceVisible', 'backFaceResourceName'],
1712
+ ['leftFaceVisible', 'leftFaceResourceName'],
1713
+ ['rightFaceVisible', 'rightFaceResourceName'],
1714
+ ['topFaceVisible', 'topFaceResourceName'],
1715
+ ['bottomFaceVisible', 'bottomFaceResourceName'],
1716
+ ];
1717
+
1718
+ for (const [
1719
+ faceVisibleProperty,
1720
+ faceResourceNameProperty,
1721
+ ] of orderedFaces) {
1722
+ if (properties.get(faceVisibleProperty).getValue() === 'true') {
1723
+ const textureResource = properties
1724
+ .get(faceResourceNameProperty)
1725
+ .getValue();
1726
+ if (textureResource) return textureResource;
1727
+ }
1728
+ }
1729
+
1730
+ return null;
1731
+ };
1732
+
1733
+ let transparentMaterial = null;
1734
+ const getTransparentMaterial = () => {
1735
+ if (!transparentMaterial)
1736
+ transparentMaterial = new THREE.MeshBasicMaterial({
1737
+ transparent: true,
1738
+ opacity: 0,
1739
+ // Set the alpha test to to ensure the faces behind are rendered
1740
+ // (no "back face culling" that would still be done if alphaTest is not set).
1741
+ alphaTest: 1,
1742
+ });
1743
+
1744
+ return transparentMaterial;
1745
+ };
1746
+
1747
+ class RenderedCube3DObject2DInstance extends RenderedInstance {
1748
+ constructor(
1749
+ project,
1750
+ layout,
1751
+ instance,
1752
+ associatedObjectConfiguration,
1753
+ pixiContainer,
1754
+ pixiResourcesLoader
1755
+ ) {
1756
+ super(
1757
+ project,
1758
+ layout,
1759
+ instance,
1760
+ associatedObjectConfiguration,
1761
+ pixiContainer,
1762
+ pixiResourcesLoader
1763
+ );
1764
+ /**
1765
+ * Name of the resource that is rendered.
1766
+ * If no face is visible, this will be null.
1767
+ */
1768
+ this._renderedResourceName = undefined;
1769
+ const properties = associatedObjectConfiguration.getProperties();
1770
+ this._defaultWidth = parseFloat(properties.get('width').getValue());
1771
+ this._defaultHeight = parseFloat(properties.get('height').getValue());
1772
+ this._defaultDepth = parseFloat(properties.get('depth').getValue());
1773
+
1774
+ this._pixiObject = new PIXI.Container();
1775
+ this._pixiFallbackObject = new PIXI.Graphics();
1776
+ this._pixiTexturedObject = new PIXI.Sprite(
1777
+ this._pixiResourcesLoader.getInvalidPIXITexture()
1778
+ );
1779
+ this._pixiObject.addChild(this._pixiTexturedObject);
1780
+ this._pixiObject.addChild(this._pixiFallbackObject);
1781
+ this._pixiContainer.addChild(this._pixiObject);
1782
+ this._renderFallbackObject = false;
1783
+ this.updateTexture();
1784
+ }
1785
+
1786
+ static _getResourceNameToDisplay(objectConfiguration) {
1787
+ return getFirstVisibleFaceResourceName(objectConfiguration);
1788
+ }
1789
+
1790
+ static getThumbnail(project, resourcesLoader, objectConfiguration) {
1791
+ const instance = this._instance;
1792
+
1793
+ const textureResourceName =
1794
+ RenderedCube3DObject2DInstance._getResourceNameToDisplay(
1795
+ objectConfiguration
1796
+ );
1797
+ if (textureResourceName) {
1798
+ return resourcesLoader.getResourceFullUrl(
1799
+ project,
1800
+ textureResourceName,
1801
+ {}
1802
+ );
1803
+ }
1804
+ return 'JsPlatform/Extensions/3d_box.svg';
1805
+ }
1806
+
1807
+ updateTextureIfNeeded() {
1808
+ const textureName =
1809
+ RenderedCube3DObject2DInstance._getResourceNameToDisplay(
1810
+ this._associatedObjectConfiguration
1811
+ );
1812
+ if (textureName === this._renderedResourceName) return;
1813
+
1814
+ this.updateTexture();
1815
+ }
1816
+
1817
+ updateTexture() {
1818
+ const textureName =
1819
+ RenderedCube3DObject2DInstance._getResourceNameToDisplay(
1820
+ this._associatedObjectConfiguration
1821
+ );
1822
+
1823
+ if (!textureName) {
1824
+ this._renderFallbackObject = true;
1825
+ this._renderedResourceName = null;
1826
+ } else {
1827
+ const texture = this._pixiResourcesLoader.getPIXITexture(
1828
+ this._project,
1829
+ textureName
1830
+ );
1831
+ this._pixiTexturedObject.texture = texture;
1832
+ this._centerX = texture.frame.width / 2;
1833
+ this._centerY = texture.frame.height / 2;
1834
+ this._renderedResourceName = textureName;
1835
+
1836
+ if (!texture.baseTexture.valid) {
1837
+ // Post pone texture update if texture is not loaded.
1838
+ texture.once('update', () => {
1839
+ this.updateTexture();
1840
+ this.updatePIXISprite();
1841
+ });
1842
+ return;
1843
+ }
1844
+ }
1845
+ }
1846
+
1847
+ updatePIXISprite() {
1848
+ const width = this.getWidth();
1849
+ const height = this.getHeight();
1850
+
1851
+ this._pixiTexturedObject.anchor.x =
1852
+ this._centerX / this._pixiTexturedObject.texture.frame.width;
1853
+ this._pixiTexturedObject.anchor.y =
1854
+ this._centerY / this._pixiTexturedObject.texture.frame.height;
1855
+
1856
+ this._pixiTexturedObject.angle = this._instance.getAngle();
1857
+ this._pixiTexturedObject.scale.x =
1858
+ width / this._pixiTexturedObject.texture.frame.width;
1859
+ this._pixiTexturedObject.scale.y =
1860
+ height / this._pixiTexturedObject.texture.frame.height;
1861
+
1862
+ this._pixiTexturedObject.position.x =
1863
+ this._instance.getX() +
1864
+ this._centerX * Math.abs(this._pixiTexturedObject.scale.x);
1865
+ this._pixiTexturedObject.position.y =
1866
+ this._instance.getY() +
1867
+ this._centerY * Math.abs(this._pixiTexturedObject.scale.y);
1868
+ }
1869
+
1870
+ updateFallbackObject() {
1871
+ const width = this.getWidth();
1872
+ const height = this.getHeight();
1873
+
1874
+ this._pixiFallbackObject.clear();
1875
+ this._pixiFallbackObject.beginFill(0x0033ff);
1876
+ this._pixiFallbackObject.lineStyle(1, 0xffd900, 1);
1877
+ this._pixiFallbackObject.moveTo(-width / 2, -height / 2);
1878
+ this._pixiFallbackObject.lineTo(width / 2, -height / 2);
1879
+ this._pixiFallbackObject.lineTo(width / 2, height / 2);
1880
+ this._pixiFallbackObject.lineTo(-width / 2, height / 2);
1881
+ this._pixiFallbackObject.endFill();
1882
+
1883
+ this._pixiFallbackObject.position.x = this._instance.getX() + width / 2;
1884
+ this._pixiFallbackObject.position.y =
1885
+ this._instance.getY() + height / 2;
1886
+ this._pixiFallbackObject.angle = this._instance.getAngle();
1887
+ }
1888
+
1889
+ update() {
1890
+ this.updateTextureIfNeeded();
1891
+
1892
+ this._pixiFallbackObject.visible = this._renderFallbackObject;
1893
+ this._pixiTexturedObject.visible = !this._renderFallbackObject;
1894
+
1895
+ if (this._renderFallbackObject) {
1896
+ this.updateFallbackObject();
1897
+ } else {
1898
+ this.updatePIXISprite();
1899
+ }
1900
+ }
1901
+
1902
+ getDefaultWidth() {
1903
+ return this._defaultWidth;
1904
+ }
1905
+
1906
+ getDefaultHeight() {
1907
+ return this._defaultHeight;
1908
+ }
1909
+
1910
+ getDefaultDepth() {
1911
+ return this._defaultDepth;
1912
+ }
1913
+
1914
+ getCenterX() {
1915
+ if (this._renderFallbackObject) {
1916
+ return this.getWidth() / 2;
1917
+ } else {
1918
+ return this._centerX * this._pixiTexturedObject.scale.x;
1919
+ }
1920
+ }
1921
+
1922
+ getCenterY() {
1923
+ if (this._renderFallbackObject) {
1924
+ return this.getHeight() / 2;
1925
+ } else {
1926
+ return this._centerY * this._pixiTexturedObject.scale.y;
1927
+ }
1928
+ }
1929
+ }
1930
+
1931
+ class RenderedCube3DObject3DInstance extends Rendered3DInstance {
1932
+ constructor(
1933
+ project,
1934
+ layout,
1935
+ instance,
1936
+ associatedObjectConfiguration,
1937
+ pixiContainer,
1938
+ threeGroup,
1939
+ pixiResourcesLoader
1940
+ ) {
1941
+ super(
1942
+ project,
1943
+ layout,
1944
+ instance,
1945
+ associatedObjectConfiguration,
1946
+ pixiContainer,
1947
+ threeGroup,
1948
+ pixiResourcesLoader
1949
+ );
1950
+
1951
+ const properties = associatedObjectConfiguration.getProperties();
1952
+ this._defaultWidth = parseFloat(properties.get('width').getValue());
1953
+ this._defaultHeight = parseFloat(properties.get('height').getValue());
1954
+ this._defaultDepth = parseFloat(properties.get('depth').getValue());
1955
+
1956
+ this._pixiObject = new PIXI.Graphics();
1957
+ this._pixiContainer.addChild(this._pixiObject);
1958
+
1959
+ this._faceResourceNames = [
1960
+ properties.get('frontFaceResourceName').getValue(),
1961
+ properties.get('backFaceResourceName').getValue(),
1962
+ properties.get('leftFaceResourceName').getValue(),
1963
+ properties.get('rightFaceResourceName').getValue(),
1964
+ properties.get('topFaceResourceName').getValue(),
1965
+ properties.get('bottomFaceResourceName').getValue(),
1966
+ ];
1967
+ this._faceVisibilities = [
1968
+ properties.get('frontFaceVisible').getValue() === 'true',
1969
+ properties.get('backFaceVisible').getValue() === 'true',
1970
+ properties.get('leftFaceVisible').getValue() === 'true',
1971
+ properties.get('rightFaceVisible').getValue() === 'true',
1972
+ properties.get('topFaceVisible').getValue() === 'true',
1973
+ properties.get('bottomFaceVisible').getValue() === 'true',
1974
+ ];
1975
+ this._shouldRepeatTextureOnFace = [
1976
+ properties.get('frontFaceResourceRepeat').getValue() === 'true',
1977
+ properties.get('backFaceResourceRepeat').getValue() === 'true',
1978
+ properties.get('leftFaceResourceRepeat').getValue() === 'true',
1979
+ properties.get('rightFaceResourceRepeat').getValue() === 'true',
1980
+ properties.get('topFaceResourceRepeat').getValue() === 'true',
1981
+ properties.get('bottomFaceResourceRepeat').getValue() === 'true',
1982
+ ];
1983
+ this._facesOrientation = properties.get('facesOrientation').getValue();
1984
+ this._backFaceUpThroughWhichAxisRotation = properties
1985
+ .get('backFaceUpThroughWhichAxisRotation')
1986
+ .getValue();
1987
+ this._shouldUseTransparentTexture =
1988
+ properties.get('enableTextureTransparency').getValue() === 'true';
1989
+
1990
+ const geometry = new THREE.BoxGeometry(1, 1, 1);
1991
+ const materials = [
1992
+ this._getFaceMaterial(project, materialIndexToFaceIndex[0]),
1993
+ this._getFaceMaterial(project, materialIndexToFaceIndex[1]),
1994
+ this._getFaceMaterial(project, materialIndexToFaceIndex[2]),
1995
+ this._getFaceMaterial(project, materialIndexToFaceIndex[3]),
1996
+ this._getFaceMaterial(project, materialIndexToFaceIndex[4]),
1997
+ this._getFaceMaterial(project, materialIndexToFaceIndex[5]),
1998
+ ];
1999
+ this._threeObject = new THREE.Mesh(geometry, materials);
2000
+ this._threeObject.rotation.order = 'ZYX';
2001
+
2002
+ this._threeGroup.add(this._threeObject);
2003
+ }
2004
+
2005
+ _getFaceMaterial(project, faceIndex) {
2006
+ if (!this._faceVisibilities[faceIndex]) return getTransparentMaterial();
2007
+
2008
+ return this._pixiResourcesLoader.getThreeMaterial(
2009
+ project,
2010
+ this._faceResourceNames[faceIndex],
2011
+ {
2012
+ useTransparentTexture: this._shouldUseTransparentTexture,
2013
+ }
2014
+ );
2015
+ }
2016
+
2017
+ static _getResourceNameToDisplay(objectConfiguration) {
2018
+ return getFirstVisibleFaceResourceName(objectConfiguration);
2019
+ }
2020
+
2021
+ updateThreeObject() {
2022
+ const width = this.getWidth();
2023
+ const height = this.getHeight();
2024
+ const depth = this.getDepth();
2025
+
2026
+ this._threeObject.position.set(
2027
+ this._instance.getX() + width / 2,
2028
+ this._instance.getY() + height / 2,
2029
+ this._instance.getZ() + depth / 2
2030
+ );
2031
+
2032
+ this._threeObject.rotation.set(
2033
+ RenderedInstance.toRad(this._instance.getRotationX()),
2034
+ RenderedInstance.toRad(this._instance.getRotationY()),
2035
+ RenderedInstance.toRad(this._instance.getAngle())
2036
+ );
2037
+
2038
+ if (
2039
+ width !== this._threeObject.scale.width ||
2040
+ height !== this._threeObject.scale.height ||
2041
+ depth !== this._threeObject.scale.depth
2042
+ ) {
2043
+ this._threeObject.scale.set(width, height, depth);
2044
+ this.updateTextureUvMapping();
2045
+ }
2046
+ }
2047
+
2048
+ /**
2049
+ * Updates the UV mapping of the geometry in order to repeat a material
2050
+ * over the different faces of the cube.
2051
+ * The mesh must be configured with a list of materials in order
2052
+ * for the method to work.
2053
+ */
2054
+ updateTextureUvMapping() {
2055
+ // @ts-ignore - position is stored as a Float32BufferAttribute
2056
+ /** @type {THREE.BufferAttribute} */
2057
+ const pos = this._threeObject.geometry.getAttribute('position');
2058
+ // @ts-ignore - uv is stored as a Float32BufferAttribute
2059
+ /** @type {THREE.BufferAttribute} */
2060
+ const uvMapping = this._threeObject.geometry.getAttribute('uv');
2061
+ const startIndex = 0;
2062
+ const endIndex = 23;
2063
+ for (
2064
+ let vertexIndex = startIndex;
2065
+ vertexIndex <= endIndex;
2066
+ vertexIndex++
2067
+ ) {
2068
+ const materialIndex = Math.floor(
2069
+ vertexIndex /
2070
+ // Each face of the cube has 4 points
2071
+ 4
2072
+ );
2073
+ const material = this._threeObject.material[materialIndex];
2074
+ if (!material || !material.map) {
2075
+ continue;
2076
+ }
2077
+
2078
+ const shouldRepeatTexture =
2079
+ this._shouldRepeatTextureOnFace[
2080
+ materialIndexToFaceIndex[materialIndex]
2081
+ ];
2082
+
2083
+ const shouldOrientateFacesTowardsY = this._facesOrientation === 'Y';
2084
+
2085
+ let x = 0;
2086
+ let y = 0;
2087
+ switch (materialIndex) {
2088
+ case 0:
2089
+ // Right face
2090
+ if (shouldRepeatTexture) {
2091
+ if (shouldOrientateFacesTowardsY) {
2092
+ x =
2093
+ -(
2094
+ this._threeObject.scale.z / material.map.source.data.width
2095
+ ) *
2096
+ (pos.getZ(vertexIndex) - 0.5);
2097
+ y =
2098
+ -(
2099
+ this._threeObject.scale.y /
2100
+ material.map.source.data.height
2101
+ ) *
2102
+ (pos.getY(vertexIndex) + 0.5);
2103
+ } else {
2104
+ x =
2105
+ -(
2106
+ this._threeObject.scale.y / material.map.source.data.width
2107
+ ) *
2108
+ (pos.getY(vertexIndex) - 0.5);
2109
+ y =
2110
+ (this._threeObject.scale.z /
2111
+ material.map.source.data.height) *
2112
+ (pos.getZ(vertexIndex) - 0.5);
2113
+ }
2114
+ } else {
2115
+ if (shouldOrientateFacesTowardsY) {
2116
+ [x, y] =
2117
+ noRepeatTextureVertexIndexToUvMapping[vertexIndex % 4];
2118
+ } else {
2119
+ [x, y] =
2120
+ noRepeatTextureVertexIndexToUvMappingForLeftAndRightFacesTowardsZ[
2121
+ vertexIndex % 4
2122
+ ];
2123
+ }
2124
+ }
2125
+ break;
2126
+ case 1:
2127
+ // Left face
2128
+ if (shouldRepeatTexture) {
2129
+ if (shouldOrientateFacesTowardsY) {
2130
+ x =
2131
+ (this._threeObject.scale.z /
2132
+ material.map.source.data.width) *
2133
+ (pos.getZ(vertexIndex) + 0.5);
2134
+ y =
2135
+ -(
2136
+ this._threeObject.scale.y /
2137
+ material.map.source.data.height
2138
+ ) *
2139
+ (pos.getY(vertexIndex) + 0.5);
2140
+ } else {
2141
+ x =
2142
+ (this._threeObject.scale.y /
2143
+ material.map.source.data.width) *
2144
+ (pos.getY(vertexIndex) + 0.5);
2145
+ y =
2146
+ (this._threeObject.scale.z /
2147
+ material.map.source.data.height) *
2148
+ (pos.getZ(vertexIndex) - 0.5);
2149
+ }
2150
+ } else {
2151
+ if (shouldOrientateFacesTowardsY) {
2152
+ [x, y] =
2153
+ noRepeatTextureVertexIndexToUvMapping[vertexIndex % 4];
2154
+ } else {
2155
+ [x, y] =
2156
+ noRepeatTextureVertexIndexToUvMappingForLeftAndRightFacesTowardsZ[
2157
+ vertexIndex % 4
2158
+ ];
2159
+ x = -x;
2160
+ y = -y;
2161
+ }
2162
+ }
2163
+ break;
2164
+ case 2:
2165
+ // Bottom face
2166
+ if (shouldRepeatTexture) {
2167
+ x =
2168
+ (this._threeObject.scale.x / material.map.source.data.width) *
2169
+ (pos.getX(vertexIndex) + 0.5);
2170
+ y =
2171
+ (this._threeObject.scale.z /
2172
+ material.map.source.data.height) *
2173
+ (pos.getZ(vertexIndex) - 0.5);
2174
+ } else {
2175
+ [x, y] = noRepeatTextureVertexIndexToUvMapping[vertexIndex % 4];
2176
+ }
2177
+ break;
2178
+ case 3:
2179
+ // Top face
2180
+ if (shouldRepeatTexture) {
2181
+ if (shouldOrientateFacesTowardsY) {
2182
+ x =
2183
+ (this._threeObject.scale.x /
2184
+ material.map.source.data.width) *
2185
+ (pos.getX(vertexIndex) + 0.5);
2186
+ y =
2187
+ -(
2188
+ this._threeObject.scale.z /
2189
+ material.map.source.data.height
2190
+ ) *
2191
+ (pos.getZ(vertexIndex) + 0.5);
2192
+ } else {
2193
+ x =
2194
+ -(
2195
+ this._threeObject.scale.x / material.map.source.data.width
2196
+ ) *
2197
+ (pos.getX(vertexIndex) - 0.5);
2198
+ y =
2199
+ (this._threeObject.scale.z /
2200
+ material.map.source.data.height) *
2201
+ (pos.getZ(vertexIndex) - 0.5);
2202
+ }
2203
+ } else {
2204
+ [x, y] = noRepeatTextureVertexIndexToUvMapping[vertexIndex % 4];
2205
+ if (!shouldOrientateFacesTowardsY) {
2206
+ x = -x;
2207
+ y = -y;
2208
+ }
2209
+ }
2210
+ break;
2211
+ case 4:
2212
+ // Front face
2213
+ if (shouldRepeatTexture) {
2214
+ x =
2215
+ (this._threeObject.scale.x / material.map.source.data.width) *
2216
+ (pos.getX(vertexIndex) + 0.5);
2217
+ y =
2218
+ -(
2219
+ this._threeObject.scale.y / material.map.source.data.height
2220
+ ) *
2221
+ (pos.getY(vertexIndex) + 0.5);
2222
+ } else {
2223
+ [x, y] = noRepeatTextureVertexIndexToUvMapping[vertexIndex % 4];
2224
+ }
2225
+ break;
2226
+ case 5:
2227
+ // Back face
2228
+ const shouldBackFaceBeUpThroughXAxisRotation =
2229
+ this._backFaceUpThroughWhichAxisRotation === 'X';
2230
+
2231
+ if (shouldRepeatTexture) {
2232
+ x =
2233
+ (shouldBackFaceBeUpThroughXAxisRotation ? 1 : -1) *
2234
+ (this._threeObject.scale.x / material.map.source.data.width) *
2235
+ (pos.getX(vertexIndex) +
2236
+ (shouldBackFaceBeUpThroughXAxisRotation ? 1 : -1) * 0.5);
2237
+ y =
2238
+ (shouldBackFaceBeUpThroughXAxisRotation ? 1 : -1) *
2239
+ (this._threeObject.scale.y /
2240
+ material.map.source.data.height) *
2241
+ (pos.getY(vertexIndex) +
2242
+ (shouldBackFaceBeUpThroughXAxisRotation ? -1 : 1) * 0.5);
2243
+ } else {
2244
+ [x, y] = noRepeatTextureVertexIndexToUvMapping[vertexIndex % 4];
2245
+ if (shouldBackFaceBeUpThroughXAxisRotation) {
2246
+ x = -x;
2247
+ y = -y;
2248
+ }
2249
+ }
2250
+ break;
2251
+ default:
2252
+ [x, y] = noRepeatTextureVertexIndexToUvMapping[vertexIndex % 4];
2253
+ }
2254
+ uvMapping.setXY(vertexIndex, x, y);
2255
+ }
2256
+ uvMapping.needsUpdate = true;
2257
+ }
2258
+
2259
+ updatePixiObject() {
2260
+ const width = this.getWidth();
2261
+ const height = this.getHeight();
2262
+
2263
+ this._pixiObject.clear();
2264
+ this._pixiObject.beginFill(0x999999, 0.2);
2265
+ this._pixiObject.lineStyle(1, 0xffd900, 0);
2266
+ this._pixiObject.moveTo(-width / 2, -height / 2);
2267
+ this._pixiObject.lineTo(width / 2, -height / 2);
2268
+ this._pixiObject.lineTo(width / 2, height / 2);
2269
+ this._pixiObject.lineTo(-width / 2, height / 2);
2270
+ this._pixiObject.endFill();
2271
+
2272
+ this._pixiObject.position.x = this._instance.getX() + width / 2;
2273
+ this._pixiObject.position.y = this._instance.getY() + height / 2;
2274
+ this._pixiObject.angle = this._instance.getAngle();
2275
+ }
2276
+
2277
+ update() {
2278
+ this.updatePixiObject();
2279
+ this.updateThreeObject();
2280
+ }
2281
+
2282
+ getDefaultWidth() {
2283
+ return this._defaultWidth;
2284
+ }
2285
+
2286
+ getDefaultHeight() {
2287
+ return this._defaultHeight;
2288
+ }
2289
+
2290
+ getDefaultDepth() {
2291
+ return this._defaultDepth;
2292
+ }
2293
+ }
2294
+
2295
+ objectsRenderingService.registerInstanceRenderer(
2296
+ 'Scene3D::Cube3DObject',
2297
+ RenderedCube3DObject2DInstance
2298
+ );
2299
+ objectsRenderingService.registerInstance3DRenderer(
2300
+ 'Scene3D::Cube3DObject',
2301
+ RenderedCube3DObject3DInstance
2302
+ );
2303
+
2304
+ class Model3DRendered2DInstance extends RenderedInstance {
2305
+ _modelOriginPoint = [0, 0, 0];
2306
+
2307
+ constructor(
2308
+ project,
2309
+ layout,
2310
+ instance,
2311
+ associatedObjectConfiguration,
2312
+ pixiContainer,
2313
+ pixiResourcesLoader
2314
+ ) {
2315
+ super(
2316
+ project,
2317
+ layout,
2318
+ instance,
2319
+ associatedObjectConfiguration,
2320
+ pixiContainer,
2321
+ pixiResourcesLoader
2322
+ );
2323
+ const properties = associatedObjectConfiguration.getProperties();
2324
+ this._defaultWidth = parseFloat(properties.get('width').getValue());
2325
+ this._defaultHeight = parseFloat(properties.get('height').getValue());
2326
+ this._defaultDepth = parseFloat(properties.get('depth').getValue());
2327
+ const rotationX = parseFloat(properties.get('rotationX').getValue());
2328
+ const rotationY = parseFloat(properties.get('rotationY').getValue());
2329
+ const rotationZ = parseFloat(properties.get('rotationZ').getValue());
2330
+ const keepAspectRatio =
2331
+ properties.get('keepAspectRatio').getValue() === 'true';
2332
+ const modelResourceName = properties
2333
+ .get('modelResourceName')
2334
+ .getValue();
2335
+ this._originPoint = getPointForLocation(
2336
+ properties.get('originLocation').getValue()
2337
+ );
2338
+ this._centerPoint = getPointForLocation(
2339
+ properties.get('centerLocation').getValue()
2340
+ );
2341
+
2342
+ // This renderer shows a placeholder for the object:
2343
+ this._pixiObject = new PIXI.Graphics();
2344
+ this._pixiContainer.addChild(this._pixiObject);
2345
+
2346
+ this._pixiResourcesLoader
2347
+ .get3DModel(project, modelResourceName)
2348
+ .then((model3d) => {
2349
+ const clonedModel3D = THREE_ADDONS.SkeletonUtils.clone(
2350
+ model3d.scene
2351
+ );
2352
+ // This group hold the rotation defined by properties.
2353
+ const threeObject = new THREE.Group();
2354
+ threeObject.rotation.order = 'ZYX';
2355
+ threeObject.add(clonedModel3D);
2356
+ this._updateDefaultTransformation(
2357
+ threeObject,
2358
+ rotationX,
2359
+ rotationY,
2360
+ rotationZ,
2361
+ this._defaultWidth,
2362
+ this._defaultHeight,
2363
+ this._defaultDepth,
2364
+ keepAspectRatio
2365
+ );
2366
+ });
2367
+ }
2368
+
2369
+ static getThumbnail(project, resourcesLoader, objectConfiguration) {
2370
+ return 'JsPlatform/Extensions/3d_box.svg';
2371
+ }
2372
+
2373
+ getOriginX() {
2374
+ const originPoint = this.getOriginPoint();
2375
+ return this.getWidth() * originPoint[0];
2376
+ }
2377
+
2378
+ getOriginY() {
2379
+ const originPoint = this.getOriginPoint();
2380
+ return this.getHeight() * originPoint[1];
2381
+ }
2382
+
2383
+ getCenterX() {
2384
+ const centerPoint = this.getCenterPoint();
2385
+ return this.getWidth() * centerPoint[0];
2386
+ }
2387
+
2388
+ getCenterY() {
2389
+ const centerPoint = this.getCenterPoint();
2390
+ return this.getHeight() * centerPoint[1];
2391
+ }
2392
+
2393
+ getOriginPoint() {
2394
+ return this._originPoint || this._modelOriginPoint;
2395
+ }
2396
+
2397
+ getCenterPoint() {
2398
+ return this._centerPoint || this._modelOriginPoint;
2399
+ }
2400
+
2401
+ _updateDefaultTransformation(
2402
+ threeObject,
2403
+ rotationX,
2404
+ rotationY,
2405
+ rotationZ,
2406
+ originalWidth,
2407
+ originalHeight,
2408
+ originalDepth,
2409
+ keepAspectRatio
2410
+ ) {
2411
+ threeObject.rotation.set(
2412
+ (rotationX * Math.PI) / 180,
2413
+ (rotationY * Math.PI) / 180,
2414
+ (rotationZ * Math.PI) / 180
2415
+ );
2416
+ threeObject.updateMatrixWorld(true);
2417
+ const boundingBox = new THREE.Box3().setFromObject(threeObject);
2418
+
2419
+ const modelWidth = boundingBox.max.x - boundingBox.min.x;
2420
+ const modelHeight = boundingBox.max.y - boundingBox.min.y;
2421
+ const modelDepth = boundingBox.max.z - boundingBox.min.z;
2422
+ this._modelOriginPoint[0] = -boundingBox.min.x / modelWidth;
2423
+ this._modelOriginPoint[1] = -boundingBox.min.y / modelHeight;
2424
+ this._modelOriginPoint[2] = -boundingBox.min.z / modelDepth;
2425
+
2426
+ // The model is flipped on Y axis.
2427
+ this._modelOriginPoint[1] = 1 - this._modelOriginPoint[1];
2428
+
2429
+ // Center the model.
2430
+ const centerPoint = this._centerPoint;
2431
+ if (centerPoint) {
2432
+ threeObject.position.set(
2433
+ -(
2434
+ boundingBox.min.x +
2435
+ (boundingBox.max.x - boundingBox.min.x) * centerPoint[0]
2436
+ ),
2437
+ // The model is flipped on Y axis.
2438
+ -(
2439
+ boundingBox.min.y +
2440
+ (boundingBox.max.y - boundingBox.min.y) * (1 - centerPoint[1])
2441
+ ),
2442
+ -(
2443
+ boundingBox.min.z +
2444
+ (boundingBox.max.z - boundingBox.min.z) * centerPoint[2]
2445
+ )
2446
+ );
2447
+ }
2448
+
2449
+ // Rotate the model.
2450
+ threeObject.scale.set(1, 1, 1);
2451
+ threeObject.rotation.set(
2452
+ (rotationX * Math.PI) / 180,
2453
+ (rotationY * Math.PI) / 180,
2454
+ (rotationZ * Math.PI) / 180
2455
+ );
2456
+
2457
+ // Stretch the model in a 1x1x1 cube.
2458
+ const scaleX = 1 / modelWidth;
2459
+ const scaleY = 1 / modelHeight;
2460
+ const scaleZ = 1 / modelDepth;
2461
+
2462
+ const scaleMatrix = new THREE.Matrix4();
2463
+ // Flip on Y because the Y axis is on the opposite side of direct basis.
2464
+ // It avoids models to be like a mirror refection.
2465
+ scaleMatrix.makeScale(scaleX, -scaleY, scaleZ);
2466
+ threeObject.updateMatrix();
2467
+ threeObject.applyMatrix4(scaleMatrix);
2468
+
2469
+ if (keepAspectRatio) {
2470
+ // Reduce the object dimensions to keep aspect ratio.
2471
+ const widthRatio = originalWidth / modelWidth;
2472
+ const heightRatio = originalHeight / modelHeight;
2473
+ const depthRatio = originalDepth / modelDepth;
2474
+ const scaleRatio = Math.min(widthRatio, heightRatio, depthRatio);
2475
+
2476
+ this._defaultWidth = scaleRatio * modelWidth;
2477
+ this._defaultHeight = scaleRatio * modelHeight;
2478
+ this._defaultDepth = scaleRatio * modelDepth;
2479
+ }
2480
+ }
2481
+
2482
+ update() {
2483
+ const width = this.getWidth();
2484
+ const height = this.getHeight();
2485
+ const centerPoint = this.getCenterPoint();
2486
+ const centerX = width * centerPoint[0];
2487
+ const centerY = height * centerPoint[1];
2488
+
2489
+ const minX = 0 - centerX;
2490
+ const minY = 0 - centerY;
2491
+ const maxX = width - centerX;
2492
+ const maxY = height - centerY;
2493
+ this._pixiObject.clear();
2494
+ this._pixiObject.beginFill(0x0033ff);
2495
+ this._pixiObject.lineStyle(1, 0xffd900, 1);
2496
+ this._pixiObject.moveTo(minX, minY);
2497
+ this._pixiObject.lineTo(maxX, minY);
2498
+ this._pixiObject.lineTo(maxX, maxY);
2499
+ this._pixiObject.lineTo(minX, maxY);
2500
+ this._pixiObject.endFill();
2501
+
2502
+ this._pixiObject.moveTo(minX, minY);
2503
+ this._pixiObject.lineTo(maxX, maxY);
2504
+ this._pixiObject.moveTo(maxX, minY);
2505
+ this._pixiObject.lineTo(minX, maxY);
2506
+
2507
+ const originPoint = this.getOriginPoint();
2508
+ this._pixiObject.position.x =
2509
+ this._instance.getX() - width * (originPoint[0] - centerPoint[0]);
2510
+ this._pixiObject.position.y =
2511
+ this._instance.getY() - height * (originPoint[1] - centerPoint[1]);
2512
+ this._pixiObject.angle = this._instance.getAngle();
2513
+ }
2514
+
2515
+ getDefaultWidth() {
2516
+ return this._defaultWidth;
2517
+ }
2518
+
2519
+ getDefaultHeight() {
2520
+ return this._defaultHeight;
2521
+ }
2522
+
2523
+ getDefaultDepth() {
2524
+ return this._defaultDepth;
2525
+ }
2526
+ }
2527
+
2528
+ const getPointForLocation = (location) => {
2529
+ switch (location) {
2530
+ case 'ModelOrigin':
2531
+ return null;
2532
+ case 'ObjectCenter':
2533
+ return [0.5, 0.5, 0.5];
2534
+ case 'BottomCenterZ':
2535
+ return [0.5, 0.5, 0];
2536
+ case 'BottomCenterY':
2537
+ return [0.5, 1, 0.5];
2538
+ case 'TopLeft':
2539
+ return [0, 0, 0];
2540
+ default:
2541
+ return null;
2542
+ }
2543
+ };
2544
+
2545
+ class Model3DRendered3DInstance extends Rendered3DInstance {
2546
+ _modelOriginPoint = [0, 0, 0];
2547
+
2548
+ constructor(
2549
+ project,
2550
+ layout,
2551
+ instance,
2552
+ associatedObjectConfiguration,
2553
+ pixiContainer,
2554
+ threeGroup,
2555
+ pixiResourcesLoader
2556
+ ) {
2557
+ super(
2558
+ project,
2559
+ layout,
2560
+ instance,
2561
+ associatedObjectConfiguration,
2562
+ pixiContainer,
2563
+ threeGroup,
2564
+ pixiResourcesLoader
2565
+ );
2566
+ const properties = associatedObjectConfiguration.getProperties();
2567
+ this._defaultWidth = parseFloat(properties.get('width').getValue());
2568
+ this._defaultHeight = parseFloat(properties.get('height').getValue());
2569
+ this._defaultDepth = parseFloat(properties.get('depth').getValue());
2570
+ const rotationX = parseFloat(properties.get('rotationX').getValue());
2571
+ const rotationY = parseFloat(properties.get('rotationY').getValue());
2572
+ const rotationZ = parseFloat(properties.get('rotationZ').getValue());
2573
+ const keepAspectRatio =
2574
+ properties.get('keepAspectRatio').getValue() === 'true';
2575
+ const modelResourceName = properties
2576
+ .get('modelResourceName')
2577
+ .getValue();
2578
+ this._originPoint = getPointForLocation(
2579
+ properties.get('originLocation').getValue()
2580
+ );
2581
+ this._centerPoint = getPointForLocation(
2582
+ properties.get('centerLocation').getValue()
2583
+ );
2584
+
2585
+ this._pixiObject = new PIXI.Graphics();
2586
+ this._pixiContainer.addChild(this._pixiObject);
2587
+
2588
+ this._threeObject = new THREE.Group();
2589
+ this._threeObject.rotation.order = 'ZYX';
2590
+ this._threeGroup.add(this._threeObject);
2591
+
2592
+ this._pixiResourcesLoader
2593
+ .get3DModel(project, modelResourceName)
2594
+ .then((model3d) => {
2595
+ const clonedModel3D = THREE_ADDONS.SkeletonUtils.clone(
2596
+ model3d.scene
2597
+ );
2598
+ // This group hold the rotation defined by properties.
2599
+ const threeObject = new THREE.Group();
2600
+ threeObject.rotation.order = 'ZYX';
2601
+ threeObject.add(clonedModel3D);
2602
+ this._updateDefaultTransformation(
2603
+ threeObject,
2604
+ rotationX,
2605
+ rotationY,
2606
+ rotationZ,
2607
+ this._defaultWidth,
2608
+ this._defaultHeight,
2609
+ this._defaultDepth,
2610
+ keepAspectRatio
2611
+ );
2612
+ this._threeObject.add(threeObject);
2613
+ });
2614
+ }
2615
+
2616
+ getOriginX() {
2617
+ const originPoint = this.getOriginPoint();
2618
+ return this.getWidth() * originPoint[0];
2619
+ }
2620
+
2621
+ getOriginY() {
2622
+ const originPoint = this.getOriginPoint();
2623
+ return this.getHeight() * originPoint[1];
2624
+ }
2625
+
2626
+ getCenterX() {
2627
+ const centerPoint = this.getCenterPoint();
2628
+ return this.getWidth() * centerPoint[0];
2629
+ }
2630
+
2631
+ getCenterY() {
2632
+ const centerPoint = this.getCenterPoint();
2633
+ return this.getHeight() * centerPoint[1];
2634
+ }
2635
+
2636
+ getOriginPoint() {
2637
+ return this._originPoint || this._modelOriginPoint;
2638
+ }
2639
+
2640
+ getCenterPoint() {
2641
+ return this._centerPoint || this._modelOriginPoint;
2642
+ }
2643
+
2644
+ _updateDefaultTransformation(
2645
+ threeObject,
2646
+ rotationX,
2647
+ rotationY,
2648
+ rotationZ,
2649
+ originalWidth,
2650
+ originalHeight,
2651
+ originalDepth,
2652
+ keepAspectRatio
2653
+ ) {
2654
+ threeObject.rotation.set(
2655
+ (rotationX * Math.PI) / 180,
2656
+ (rotationY * Math.PI) / 180,
2657
+ (rotationZ * Math.PI) / 180
2658
+ );
2659
+ threeObject.updateMatrixWorld(true);
2660
+ const boundingBox = new THREE.Box3().setFromObject(threeObject);
2661
+
2662
+ const modelWidth = boundingBox.max.x - boundingBox.min.x;
2663
+ const modelHeight = boundingBox.max.y - boundingBox.min.y;
2664
+ const modelDepth = boundingBox.max.z - boundingBox.min.z;
2665
+ this._modelOriginPoint[0] = -boundingBox.min.x / modelWidth;
2666
+ this._modelOriginPoint[1] = -boundingBox.min.y / modelHeight;
2667
+ this._modelOriginPoint[2] = -boundingBox.min.z / modelDepth;
2668
+
2669
+ // The model is flipped on Y axis.
2670
+ this._modelOriginPoint[1] = 1 - this._modelOriginPoint[1];
2671
+
2672
+ // Center the model.
2673
+ const centerPoint = this._centerPoint;
2674
+ if (centerPoint) {
2675
+ threeObject.position.set(
2676
+ -(
2677
+ boundingBox.min.x +
2678
+ (boundingBox.max.x - boundingBox.min.x) * centerPoint[0]
2679
+ ),
2680
+ // The model is flipped on Y axis.
2681
+ -(
2682
+ boundingBox.min.y +
2683
+ (boundingBox.max.y - boundingBox.min.y) * (1 - centerPoint[1])
2684
+ ),
2685
+ -(
2686
+ boundingBox.min.z +
2687
+ (boundingBox.max.z - boundingBox.min.z) * centerPoint[2]
2688
+ )
2689
+ );
2690
+ }
2691
+
2692
+ // Rotate the model.
2693
+ threeObject.scale.set(1, 1, 1);
2694
+ threeObject.rotation.set(
2695
+ (rotationX * Math.PI) / 180,
2696
+ (rotationY * Math.PI) / 180,
2697
+ (rotationZ * Math.PI) / 180
2698
+ );
2699
+
2700
+ // Stretch the model in a 1x1x1 cube.
2701
+ const scaleX = 1 / modelWidth;
2702
+ const scaleY = 1 / modelHeight;
2703
+ const scaleZ = 1 / modelDepth;
2704
+
2705
+ const scaleMatrix = new THREE.Matrix4();
2706
+ // Flip on Y because the Y axis is on the opposite side of direct basis.
2707
+ // It avoids models to be like a mirror refection.
2708
+ scaleMatrix.makeScale(scaleX, -scaleY, scaleZ);
2709
+ threeObject.updateMatrix();
2710
+ threeObject.applyMatrix4(scaleMatrix);
2711
+
2712
+ if (keepAspectRatio) {
2713
+ // Reduce the object dimensions to keep aspect ratio.
2714
+ const widthRatio = originalWidth / modelWidth;
2715
+ const heightRatio = originalHeight / modelHeight;
2716
+ const depthRatio = originalDepth / modelDepth;
2717
+ const scaleRatio = Math.min(widthRatio, heightRatio, depthRatio);
2718
+
2719
+ this._defaultWidth = scaleRatio * modelWidth;
2720
+ this._defaultHeight = scaleRatio * modelHeight;
2721
+ this._defaultDepth = scaleRatio * modelDepth;
2722
+ }
2723
+ }
2724
+
2725
+ updateThreeObject() {
2726
+ const width = this.getWidth();
2727
+ const height = this.getHeight();
2728
+ const depth = this.getDepth();
2729
+
2730
+ const originPoint = this.getOriginPoint();
2731
+ const centerPoint = this.getCenterPoint();
2732
+ this._threeObject.position.set(
2733
+ this._instance.getX() - width * (originPoint[0] - centerPoint[0]),
2734
+ this._instance.getY() - height * (originPoint[1] - centerPoint[1]),
2735
+ this._instance.getZ() - depth * (originPoint[2] - centerPoint[2])
2736
+ );
2737
+
2738
+ this._threeObject.rotation.set(
2739
+ RenderedInstance.toRad(this._instance.getRotationX()),
2740
+ RenderedInstance.toRad(this._instance.getRotationY()),
2741
+ RenderedInstance.toRad(this._instance.getAngle())
2742
+ );
2743
+
2744
+ if (
2745
+ width !== this._threeObject.scale.width ||
2746
+ height !== this._threeObject.scale.height ||
2747
+ depth !== this._threeObject.scale.depth
2748
+ ) {
2749
+ this._threeObject.scale.set(width, height, depth);
2750
+ }
2751
+ }
2752
+
2753
+ updatePixiObject() {
2754
+ const width = this.getWidth();
2755
+ const height = this.getHeight();
2756
+ const centerPoint = this.getCenterPoint();
2757
+ const centerX = width * centerPoint[0];
2758
+ const centerY = height * centerPoint[1];
2759
+
2760
+ const minX = 0 - centerX;
2761
+ const minY = 0 - centerY;
2762
+ const maxX = width - centerX;
2763
+ const maxY = height - centerY;
2764
+ this._pixiObject.clear();
2765
+ this._pixiObject.beginFill(0x999999, 0.2);
2766
+ this._pixiObject.lineStyle(1, 0xffd900, 0);
2767
+ this._pixiObject.moveTo(minX, minY);
2768
+ this._pixiObject.lineTo(maxX, minY);
2769
+ this._pixiObject.lineTo(maxX, maxY);
2770
+ this._pixiObject.lineTo(minX, maxY);
2771
+ this._pixiObject.endFill();
2772
+
2773
+ const originPoint = this.getOriginPoint();
2774
+ this._pixiObject.position.x =
2775
+ this._instance.getX() - width * (originPoint[0] - centerPoint[0]);
2776
+ this._pixiObject.position.y =
2777
+ this._instance.getY() - height * (originPoint[1] - centerPoint[1]);
2778
+ this._pixiObject.angle = this._instance.getAngle();
2779
+ }
2780
+
2781
+ update() {
2782
+ this.updatePixiObject();
2783
+ this.updateThreeObject();
2784
+ }
2785
+
2786
+ getDefaultWidth() {
2787
+ return this._defaultWidth;
2788
+ }
2789
+
2790
+ getDefaultHeight() {
2791
+ return this._defaultHeight;
2792
+ }
2793
+
2794
+ getDefaultDepth() {
2795
+ return this._defaultDepth;
2796
+ }
2797
+ }
2798
+
2799
+ objectsRenderingService.registerInstanceRenderer(
2800
+ 'Scene3D::Model3DObject',
2801
+ Model3DRendered2DInstance
2802
+ );
2803
+
2804
+ objectsRenderingService.registerInstance3DRenderer(
2805
+ 'Scene3D::Model3DObject',
2806
+ Model3DRendered3DInstance
2807
+ );
2808
+ },
2809
+ };