UNPKG

wonder.js

Version:
112 lines (97 loc) 6.33 kB
'use strict'; var Caml_array = require("bs-platform/lib/js/caml_array.js"); var CloneGeometryService$Wonderjs = require("../../../record/main/geometry/CloneGeometryService.js"); var ClonePointLightService$Wonderjs = require("../../../record/main/light/point/ClonePointLightService.js"); var CloneScriptMainService$Wonderjs = require("../script/CloneScriptMainService.js"); var CloneTransformMainService$Wonderjs = require("../transform/CloneTransformMainService.js"); var CloneDirectionLightService$Wonderjs = require("../../../record/main/light/direction/CloneDirectionLightService.js"); var RecordPointLightMainService$Wonderjs = require("../light/point/RecordPointLightMainService.js"); var CloneMeshRendererMainService$Wonderjs = require("../meshRenderer/CloneMeshRendererMainService.js"); var CloneBasicMaterialMainService$Wonderjs = require("../material/basic/CloneBasicMaterialMainService.js"); var CloneLightMaterialMainService$Wonderjs = require("../material/light/CloneLightMaterialMainService.js"); var CloneBasicCameraViewMainService$Wonderjs = require("../basic_camera_view/CloneBasicCameraViewMainService.js"); var CloneFlyCameraControllerService$Wonderjs = require("../../../record/main/camera_controller/fly/CloneFlyCameraControllerService.js"); var RecordDirectionLightMainService$Wonderjs = require("../light/direction/RecordDirectionLightMainService.js"); var CloneArcballCameraControllerService$Wonderjs = require("../../../record/main/camera_controller/arcball/CloneArcballCameraControllerService.js"); var ClonePerspectiveCameraProjectionService$Wonderjs = require("../../../record/main/perspective_camera_projection/ClonePerspectiveCameraProjectionService.js"); var cloneScriptComponent = CloneScriptMainService$Wonderjs.handleCloneComponent; var cloneBasicCameraViewComponent = CloneBasicCameraViewMainService$Wonderjs.handleCloneComponent; function clonePerspectiveCameraProjectionComponent(sourceComponent, countRangeArr, state) { var perspectiveCameraProjectionRecord = state[/* perspectiveCameraProjectionRecord */14]; var match = ClonePerspectiveCameraProjectionService$Wonderjs.handleCloneComponent(sourceComponent, countRangeArr, perspectiveCameraProjectionRecord); var newrecord = Caml_array.caml_array_dup(state); return /* tuple */[ (newrecord[/* perspectiveCameraProjectionRecord */14] = match[0], newrecord), match[1] ]; } function cloneFlyCameraControllerComponent(sourceComponent, countRangeArr, state) { var flyCameraControllerRecord = state[/* flyCameraControllerRecord */26]; var match = CloneFlyCameraControllerService$Wonderjs.handleCloneComponent(sourceComponent, countRangeArr, flyCameraControllerRecord); var newrecord = Caml_array.caml_array_dup(state); return /* tuple */[ (newrecord[/* flyCameraControllerRecord */26] = match[0], newrecord), match[1] ]; } function cloneArcballCameraControllerComponent(sourceComponent, countRangeArr, state) { var arcballCameraControllerRecord = state[/* arcballCameraControllerRecord */25]; var match = CloneArcballCameraControllerService$Wonderjs.handleCloneComponent(sourceComponent, countRangeArr, arcballCameraControllerRecord); var newrecord = Caml_array.caml_array_dup(state); return /* tuple */[ (newrecord[/* arcballCameraControllerRecord */25] = match[0], newrecord), match[1] ]; } var cloneTransformComponent = CloneTransformMainService$Wonderjs.handleCloneComponent; function cloneMeshRendererComponent(sourceComponent, countRangeArr, state) { var match = CloneMeshRendererMainService$Wonderjs.handleCloneComponent(sourceComponent, countRangeArr, state); return /* tuple */[ match[0], match[1] ]; } function cloneGeometryComponent(sourceComponent, countRangeArr, state) { var geometryRecord = state[/* geometryRecord */23]; var match = CloneGeometryService$Wonderjs.handleCloneComponent(sourceComponent, countRangeArr, geometryRecord); var newrecord = Caml_array.caml_array_dup(state); return /* tuple */[ (newrecord[/* geometryRecord */23] = match[0], newrecord), match[1] ]; } function cloneBasicMaterialComponent(isShareMaterial, sourceComponent, countRangeArr, state) { return CloneBasicMaterialMainService$Wonderjs.handleCloneComponent(sourceComponent, countRangeArr, isShareMaterial, state); } function cloneLightMaterialComponent(isShareMaterial, sourceComponent, countRangeArr, state) { return CloneLightMaterialMainService$Wonderjs.handleCloneComponent(sourceComponent, countRangeArr, isShareMaterial, state); } function cloneDirectionLightComponent(sourceComponent, countRangeArr, state) { var match = CloneDirectionLightService$Wonderjs.handleCloneComponent(sourceComponent, countRangeArr, RecordDirectionLightMainService$Wonderjs.getRecord(state)); var newrecord = Caml_array.caml_array_dup(state); return /* tuple */[ (newrecord[/* directionLightRecord */21] = match[0], newrecord), match[1] ]; } function clonePointLightComponent(sourceComponent, countRangeArr, state) { var match = ClonePointLightService$Wonderjs.handleCloneComponent(sourceComponent, countRangeArr, RecordPointLightMainService$Wonderjs.getRecord(state)); var newrecord = Caml_array.caml_array_dup(state); return /* tuple */[ (newrecord[/* pointLightRecord */22] = match[0], newrecord), match[1] ]; } exports.cloneScriptComponent = cloneScriptComponent; exports.cloneBasicCameraViewComponent = cloneBasicCameraViewComponent; exports.clonePerspectiveCameraProjectionComponent = clonePerspectiveCameraProjectionComponent; exports.cloneFlyCameraControllerComponent = cloneFlyCameraControllerComponent; exports.cloneArcballCameraControllerComponent = cloneArcballCameraControllerComponent; exports.cloneTransformComponent = cloneTransformComponent; exports.cloneMeshRendererComponent = cloneMeshRendererComponent; exports.cloneGeometryComponent = cloneGeometryComponent; exports.cloneBasicMaterialComponent = cloneBasicMaterialComponent; exports.cloneLightMaterialComponent = cloneLightMaterialComponent; exports.cloneDirectionLightComponent = cloneDirectionLightComponent; exports.clonePointLightComponent = clonePointLightComponent; /* ClonePointLightService-Wonderjs Not a pure module */