From 23cb8765b66fdbf504d496db0cac8b41deb55f19 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Fri, 2 Jun 2023 14:33:41 +0300 Subject: [PATCH 01/11] Minor fixes --- gradle.properties | 2 +- ui/bootstrap/build.gradle.kts | 22 +++++++++++++--------- visionforge-threejs/build.gradle.kts | 20 +++++++++++++------- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/gradle.properties b/gradle.properties index e3a218ba..f38299f2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,5 +6,5 @@ kotlin.incremental.js.ir=true org.gradle.parallel=true org.gradle.jvmargs=-Xmx4G -toolsVersion=0.14.9-kotlin-1.8.20 +toolsVersion=0.14.9-kotlin-1.9.0-Beta org.jetbrains.compose.experimental.jscanvas.enabled=true \ No newline at end of file diff --git a/ui/bootstrap/build.gradle.kts b/ui/bootstrap/build.gradle.kts index c0b980d9..f50ae119 100644 --- a/ui/bootstrap/build.gradle.kts +++ b/ui/bootstrap/build.gradle.kts @@ -1,15 +1,19 @@ plugins { - kotlin("js") - id("space.kscience.gradle.js") + id("space.kscience.gradle.mpp") } val dataforgeVersion: String by rootProject.extra -dependencies { - api(project(":visionforge-solid")) - api(project(":ui:react")) - implementation(npm("file-saver", "2.0.2")) - implementation(npm("bootstrap","4.6.0")) - implementation(npm("jquery","3.5.1")) - implementation(npm("popper.js","1.16.1")) +kscience{ + js() + jsMain{ + dependencies { + api(project(":visionforge-solid")) + api(project(":ui:react")) + implementation(npm("file-saver", "2.0.2")) + implementation(npm("bootstrap","4.6.0")) + implementation(npm("jquery","3.5.1")) + implementation(npm("popper.js","1.16.1")) + } + } } \ No newline at end of file diff --git a/visionforge-threejs/build.gradle.kts b/visionforge-threejs/build.gradle.kts index f04275f3..41714618 100644 --- a/visionforge-threejs/build.gradle.kts +++ b/visionforge-threejs/build.gradle.kts @@ -1,17 +1,23 @@ plugins { - id("space.kscience.gradle.js") + id("space.kscience.gradle.mpp") } kotlin{ explicitApi = org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode.Disabled +} + +kscience{ js{ binaries.library() } + jsMain{ + dependencies { + api(projects.visionforgeSolid) + implementation(npm("three", "0.143.0")) + implementation(npm("three-csg-ts", "3.1.10")) + implementation(npm("three.meshline","1.4.0")) + } + } } -dependencies { - api(projects.visionforgeSolid) - implementation(npm("three", "0.143.0")) - implementation(npm("three-csg-ts", "3.1.10")) - implementation(npm("three.meshline","1.4.0")) -} + From 140c59497e24c76ff48325ce1786089ede0206bb Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Fri, 2 Jun 2023 20:58:32 +0300 Subject: [PATCH 02/11] Change all Js modules to MPP --- demo/muon-monitor/build.gradle.kts | 4 ++-- gradle.properties | 2 +- .../visionforge/bootstrap/bootstrap.kt | 0 .../visionforge/bootstrap/outputConfig.kt | 0 .../visionforge/bootstrap/reactBootstrap.kt | 0 .../visionforge/bootstrap/tabComponent.kt | 0 .../visionforge/bootstrap/threeControls.kt | 0 .../bootstrap/visionPropertyEditor.kt | 0 .../resources/css/custom-bootstrap.css | 0 ui/react/build.gradle.kts | 17 +++++++++++------ .../kscience/visionforge/react/MetaViewer.kt | 0 .../visionforge/react/MultiSelectChooser.kt | 0 .../visionforge/react/PropertyEditor.kt | 5 ++++- .../visionforge/react/RangeValueChooser.kt | 0 .../visionforge/react/ThreeCanvasComponent.kt | 0 .../kscience/visionforge/react/TreeStyles.kt | 0 .../kscience/visionforge/react/VisionTree.kt | 0 .../kscience/visionforge/react/createRoot.kt | 0 .../space/kscience/visionforge/react/ext.kt | 0 .../kscience/visionforge/react/layout.kt | 0 .../visionforge/react/valueChooser.kt | 0 ui/ring/build.gradle.kts | 19 +++++++++---------- .../{main => jsMain}/kotlin/ringui/Loader.kt | 0 .../kotlin/ringui/LoaderScreen.kt | 0 .../ThreeViewWithControls.kt | 0 .../ThreeWithControlsPlugin.kt | 0 .../ringPropertyEditor.kt | 0 .../ringThreeControls.kt | 0 visionforge-gdml/build.gradle.kts | 2 +- .../solid/three/ThreeAmbientLightFactory.kt | 0 .../solid/three/ThreeBoxFactory.kt | 0 .../visionforge/solid/three/ThreeCanvas.kt | 0 .../solid/three/ThreeCanvasLabelFactory.kt | 0 .../solid/three/ThreeCompositeFactory.kt | 0 .../solid/three/ThreeConeFactory.kt | 0 .../solid/three/ThreeConvexFactory.kt | 0 .../visionforge/solid/three/ThreeFactory.kt | 0 .../solid/three/ThreeGeometryBuilder.kt | 6 +++--- .../visionforge/solid/three/ThreeJsVision.kt | 2 +- .../solid/three/ThreeLabelFactory.kt | 0 .../solid/three/ThreeLineFactory.kt | 8 ++++---- .../visionforge/solid/three/ThreeMaterials.kt | 0 .../solid/three/ThreeMeshFactory.kt | 0 .../solid/three/ThreeMeshLineFactory.kt | 0 .../visionforge/solid/three/ThreePlugin.kt | 1 - .../solid/three/ThreePointLightFactory.kt | 0 .../solid/three/ThreeReferenceFactory.kt | 0 .../solid/three/ThreeSmartLineFactory.kt | 0 .../solid/three/ThreeSphereFactory.kt | 0 .../kscience/visionforge/solid/three/csg.kt | 0 .../kscience/visionforge/solid/three/three.kt | 0 .../{main => jsMain}/kotlin/three/THREE.kt | 0 .../kotlin/three/animation/AnimationAction.kt | 0 .../kotlin/three/animation/AnimationClip.kt | 0 .../kotlin/three/animation/AnimationMixer.kt | 0 .../kotlin/three/animation/AnimationUtils.kt | 0 .../kotlin/three/animation/KeyFrameTrack.kt | 0 .../kotlin/three/audio/Audio.kt | 0 .../kotlin/three/audio/AudioContext.kt | 0 .../kotlin/three/audio/AudioListener.kt | 0 .../kotlin/three/audio/PositionalAudio.kt | 0 .../kotlin/three/cameras/Camera.kt | 0 .../three/cameras/OrthographicCamera.kt | 0 .../kotlin/three/cameras/PerspectiveCamera.kt | 0 .../kotlin/three/core/BufferAttribute.kt | 0 .../kotlin/three/core/BufferGeometry.kt | 0 .../kotlin/three/core/Clock.kt | 0 .../kotlin/three/core/EventDispatcher.kt | 0 .../kotlin/three/core/Face3.kt | 0 .../three/core/InstancedBufferGeometry.kt | 0 .../kotlin/three/core/Layers.kt | 0 .../kotlin/three/core/Object3D.kt | 0 .../kotlin/three/core/Raycaster.kt | 0 .../kotlin/three/core/Uniform.kt | 0 .../kotlin/three/external/Detector.kt | 0 .../kotlin/three/external/ImprovedNoise.kt | 0 .../kotlin/three/external/SimplexNoise.kt | 0 .../three/external/controls/FlyControls.kt | 0 .../three/external/controls/OrbitControls.kt | 0 .../external/controls/TrackballControls.kt | 0 .../external/controls/TransformControls.kt | 0 .../three/external/exporters/OBJExporter.kt | 0 .../three/external/exporters/STLExporter.kt | 0 .../external/geometries/ConvexGeometry.kt | 0 .../kotlin/three/external/libs/GUIParams.kt | 0 .../kotlin/three/external/libs/Stats.kt | 0 .../kotlin/three/external/libs/datgui.kt | 0 .../three/external/loaders/BabylonLoader.kt | 0 .../three/external/loaders/GLTFLoader.kt | 0 .../three/external/loaders/LoaderSupport.kt | 0 .../three/external/loaders/MTLLoader.kt | 0 .../three/external/loaders/OBJLoader.kt | 0 .../three/external/loaders/OBJLoader2.kt | 0 .../three/external/loaders/STLLoader.kt | 0 .../kotlin/three/external/objects/Sky.kt | 0 .../kotlin/three/external/objects/Water.kt | 0 .../three/external/objects/WaterOptions.kt | 0 .../kotlin/three/extras/SceneUtils.kt | 0 .../kotlin/three/extras/core/Curve.kt | 0 .../kotlin/three/extras/core/CurvePath.kt | 0 .../kotlin/three/extras/core/Path.kt | 0 .../kotlin/three/extras/core/Shape.kt | 0 .../kotlin/three/extras/core/ShapePath.kt | 0 .../kotlin/three/extras/curves/ArcCurve.kt | 0 .../three/extras/curves/CatmullRomCurve3.kt | 0 .../three/extras/curves/EllipseCurve.kt | 0 .../kotlin/three/extras/curves/LineCurve.kt | 0 .../kotlin/three/extras/curves/LineCurve3.kt | 0 .../three/extras/curves/QuadricBezierCurve.kt | 0 .../extras/curves/QuadricBezierCurve3.kt | 0 .../kotlin/three/extras/curves/SplineCurve.kt | 0 .../kotlin/three/geometries/BoxGeometry.kt | 0 .../kotlin/three/geometries/ConeGeometry.kt | 0 .../three/geometries/CylinderGeometry.kt | 0 .../kotlin/three/geometries/EdgesGeometry.kt | 0 .../three/geometries/ExtrudeGeometry.kt | 0 .../kotlin/three/geometries/PlaneGeometry.kt | 0 .../kotlin/three/geometries/SphereGeometry.kt | 0 .../kotlin/three/geometries/TextGeometry.kt | 0 .../kotlin/three/geometries/TorusGeometry.kt | 0 .../kotlin/three/geometries/TubeGeometry.kt | 0 .../three/geometries/WireframeGeometry.kt | 0 .../kotlin/three/helpers/ArrowHelper.kt | 0 .../kotlin/three/helpers/AxesHelper.kt | 0 .../kotlin/three/helpers/Box3Helper.kt | 0 .../kotlin/three/helpers/CameraHelper.kt | 0 .../kotlin/three/helpers/GridHelper.kt | 0 .../three/helpers/HemisphereLightHelper.kt | 0 .../kotlin/three/helpers/PlaneHelper.kt | 0 .../{main => jsMain}/kotlin/three/ktutils.kt | 0 .../kotlin/three/lights/AmbientLight.kt | 0 .../kotlin/three/lights/DirectionalLight.kt | 0 .../three/lights/DirectionalLightShadow.kt | 0 .../kotlin/three/lights/HemisphereLight.kt | 0 .../kotlin/three/lights/Light.kt | 0 .../kotlin/three/lights/LightShadow.kt | 0 .../kotlin/three/lights/PointLight.kt | 0 .../kotlin/three/lights/SpotLight.kt | 0 .../kotlin/three/lights/SpotLightShadow.kt | 0 .../kotlin/three/loaders/Cache.kt | 0 .../three/loaders/CompressedTextureLoader.kt | 0 .../kotlin/three/loaders/ImageLoader.kt | 0 .../kotlin/three/loaders/JSONLoader.kt | 0 .../kotlin/three/loaders/Loader.kt | 0 .../kotlin/three/loaders/LoadingManager.kt | 0 .../kotlin/three/loaders/MaterialLoader.kt | 0 .../kotlin/three/loaders/TextureLoader.kt | 0 .../three/materials/LineBasicMaterial.kt | 0 .../three/materials/LineDashedMaterial.kt | 0 .../kotlin/three/materials/Material.kt | 0 .../three/materials/MeshBasicMaterial.kt | 0 .../three/materials/MeshDepthMaterial.kt | 0 .../three/materials/MeshLambertMaterial.kt | 0 .../three/materials/MeshNormalMaterial.kt | 0 .../three/materials/MeshPhongMaterial.kt | 0 .../three/materials/MeshPhysicalMaterial.kt | 0 .../three/materials/MeshStandardMaterial.kt | 0 .../kotlin/three/materials/PointsMaterial.kt | 0 .../three/materials/RawShaderMaterial.kt | 0 .../kotlin/three/materials/ShaderMaterial.kt | 0 .../kotlin/three/materials/SpriteMaterial.kt | 0 .../kotlin/three/math/Box2.kt | 0 .../kotlin/three/math/Box3.kt | 0 .../kotlin/three/math/Color.kt | 0 .../kotlin/three/math/ColorConstants.kt | 0 .../kotlin/three/math/Cylindrical.kt | 0 .../kotlin/three/math/Euler.kt | 0 .../kotlin/three/math/Frustrum.kt | 0 .../kotlin/three/math/Line3.kt | 0 .../kotlin/three/math/Math.kt | 0 .../kotlin/three/math/Matrix3.kt | 0 .../kotlin/three/math/Matrix4.kt | 0 .../kotlin/three/math/Plane.kt | 0 .../kotlin/three/math/Quaternion.kt | 0 .../{main => jsMain}/kotlin/three/math/Ray.kt | 0 .../kotlin/three/math/Sphere.kt | 0 .../kotlin/three/math/Spherical.kt | 0 .../kotlin/three/math/Triangle.kt | 0 .../kotlin/three/math/Vector2.kt | 0 .../kotlin/three/math/Vector3.kt | 0 .../kotlin/three/math/Vector4.kt | 0 .../kotlin/three/math/operators.kt | 0 .../kotlin/three/meshline/MeshLine.kt | 0 .../kotlin/three/meshline/meshLineExt.kt | 0 .../kotlin/three/objects/Group.kt | 0 .../kotlin/three/objects/LOD.kt | 0 .../kotlin/three/objects/Line.kt | 0 .../kotlin/three/objects/LineLoop.kt | 0 .../kotlin/three/objects/LineSegments.kt | 0 .../kotlin/three/objects/Mesh.kt | 0 .../kotlin/three/objects/Points.kt | 0 .../kotlin/three/objects/Sprite.kt | 0 .../kotlin/three/renderers/WebGL2Renderer.kt | 0 .../three/renderers/WebGL2RendererParams.kt | 0 .../three/renderers/WebGLRenderTarget.kt | 0 .../renderers/WebGLRenderTargetOptions.kt | 0 .../kotlin/three/renderers/WebGLRenderer.kt | 0 .../three/renderers/WebGLRendererParams.kt | 0 .../three/renderers/shaders/ShaderChunk.kt | 0 .../three/renderers/shaders/ShaderLib.kt | 0 .../three/renderers/shaders/UniformsUtil.kt | 0 .../kotlin/three/scenes/Fog.kt | 0 .../kotlin/three/scenes/FogExp2.kt | 0 .../kotlin/three/scenes/Scene.kt | 0 .../three/textures/CompressedTexture.kt | 0 .../kotlin/three/textures/CubeTexture.kt | 0 .../kotlin/three/textures/DepthTexture.kt | 0 .../kotlin/three/textures/Texture.kt | 0 .../kotlin/three/utils/BufferGeometryUtils.kt | 0 209 files changed, 36 insertions(+), 30 deletions(-) rename ui/bootstrap/src/{main => jsMain}/kotlin/space/kscience/visionforge/bootstrap/bootstrap.kt (100%) rename ui/bootstrap/src/{main => jsMain}/kotlin/space/kscience/visionforge/bootstrap/outputConfig.kt (100%) rename ui/bootstrap/src/{main => jsMain}/kotlin/space/kscience/visionforge/bootstrap/reactBootstrap.kt (100%) rename ui/bootstrap/src/{main => jsMain}/kotlin/space/kscience/visionforge/bootstrap/tabComponent.kt (100%) rename ui/bootstrap/src/{main => jsMain}/kotlin/space/kscience/visionforge/bootstrap/threeControls.kt (100%) rename ui/bootstrap/src/{main => jsMain}/kotlin/space/kscience/visionforge/bootstrap/visionPropertyEditor.kt (100%) rename ui/bootstrap/src/{main => jsMain}/resources/css/custom-bootstrap.css (100%) rename ui/react/src/{main => jsMain}/kotlin/space/kscience/visionforge/react/MetaViewer.kt (100%) rename ui/react/src/{main => jsMain}/kotlin/space/kscience/visionforge/react/MultiSelectChooser.kt (100%) rename ui/react/src/{main => jsMain}/kotlin/space/kscience/visionforge/react/PropertyEditor.kt (97%) rename ui/react/src/{main => jsMain}/kotlin/space/kscience/visionforge/react/RangeValueChooser.kt (100%) rename ui/react/src/{main => jsMain}/kotlin/space/kscience/visionforge/react/ThreeCanvasComponent.kt (100%) rename ui/react/src/{main => jsMain}/kotlin/space/kscience/visionforge/react/TreeStyles.kt (100%) rename ui/react/src/{main => jsMain}/kotlin/space/kscience/visionforge/react/VisionTree.kt (100%) rename ui/react/src/{main => jsMain}/kotlin/space/kscience/visionforge/react/createRoot.kt (100%) rename ui/react/src/{main => jsMain}/kotlin/space/kscience/visionforge/react/ext.kt (100%) rename ui/react/src/{main => jsMain}/kotlin/space/kscience/visionforge/react/layout.kt (100%) rename ui/react/src/{main => jsMain}/kotlin/space/kscience/visionforge/react/valueChooser.kt (100%) rename ui/ring/src/{main => jsMain}/kotlin/ringui/Loader.kt (100%) rename ui/ring/src/{main => jsMain}/kotlin/ringui/LoaderScreen.kt (100%) rename ui/ring/src/{main => jsMain}/kotlin/space.kscience.visionforge.ring/ThreeViewWithControls.kt (100%) rename ui/ring/src/{main => jsMain}/kotlin/space.kscience.visionforge.ring/ThreeWithControlsPlugin.kt (100%) rename ui/ring/src/{main => jsMain}/kotlin/space.kscience.visionforge.ring/ringPropertyEditor.kt (100%) rename ui/ring/src/{main => jsMain}/kotlin/space.kscience.visionforge.ring/ringThreeControls.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/ThreeAmbientLightFactory.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/ThreeBoxFactory.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/ThreeCanvas.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/ThreeCanvasLabelFactory.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/ThreeCompositeFactory.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/ThreeConeFactory.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/ThreeConvexFactory.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/ThreeFactory.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/ThreeGeometryBuilder.kt (99%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/ThreeJsVision.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/ThreeLabelFactory.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/ThreeLineFactory.kt (99%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/ThreeMaterials.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/ThreeMeshFactory.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/ThreeMeshLineFactory.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/ThreePlugin.kt (99%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/ThreePointLightFactory.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/ThreeReferenceFactory.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/ThreeSmartLineFactory.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/ThreeSphereFactory.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/csg.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/space/kscience/visionforge/solid/three/three.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/THREE.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/animation/AnimationAction.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/animation/AnimationClip.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/animation/AnimationMixer.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/animation/AnimationUtils.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/animation/KeyFrameTrack.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/audio/Audio.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/audio/AudioContext.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/audio/AudioListener.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/audio/PositionalAudio.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/cameras/Camera.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/cameras/OrthographicCamera.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/cameras/PerspectiveCamera.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/core/BufferAttribute.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/core/BufferGeometry.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/core/Clock.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/core/EventDispatcher.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/core/Face3.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/core/InstancedBufferGeometry.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/core/Layers.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/core/Object3D.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/core/Raycaster.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/core/Uniform.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/Detector.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/ImprovedNoise.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/SimplexNoise.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/controls/FlyControls.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/controls/OrbitControls.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/controls/TrackballControls.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/controls/TransformControls.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/exporters/OBJExporter.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/exporters/STLExporter.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/geometries/ConvexGeometry.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/libs/GUIParams.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/libs/Stats.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/libs/datgui.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/loaders/BabylonLoader.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/loaders/GLTFLoader.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/loaders/LoaderSupport.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/loaders/MTLLoader.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/loaders/OBJLoader.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/loaders/OBJLoader2.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/loaders/STLLoader.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/objects/Sky.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/objects/Water.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/external/objects/WaterOptions.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/extras/SceneUtils.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/extras/core/Curve.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/extras/core/CurvePath.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/extras/core/Path.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/extras/core/Shape.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/extras/core/ShapePath.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/extras/curves/ArcCurve.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/extras/curves/CatmullRomCurve3.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/extras/curves/EllipseCurve.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/extras/curves/LineCurve.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/extras/curves/LineCurve3.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/extras/curves/QuadricBezierCurve.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/extras/curves/QuadricBezierCurve3.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/extras/curves/SplineCurve.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/geometries/BoxGeometry.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/geometries/ConeGeometry.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/geometries/CylinderGeometry.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/geometries/EdgesGeometry.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/geometries/ExtrudeGeometry.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/geometries/PlaneGeometry.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/geometries/SphereGeometry.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/geometries/TextGeometry.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/geometries/TorusGeometry.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/geometries/TubeGeometry.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/geometries/WireframeGeometry.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/helpers/ArrowHelper.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/helpers/AxesHelper.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/helpers/Box3Helper.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/helpers/CameraHelper.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/helpers/GridHelper.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/helpers/HemisphereLightHelper.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/helpers/PlaneHelper.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/ktutils.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/lights/AmbientLight.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/lights/DirectionalLight.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/lights/DirectionalLightShadow.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/lights/HemisphereLight.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/lights/Light.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/lights/LightShadow.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/lights/PointLight.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/lights/SpotLight.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/lights/SpotLightShadow.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/loaders/Cache.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/loaders/CompressedTextureLoader.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/loaders/ImageLoader.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/loaders/JSONLoader.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/loaders/Loader.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/loaders/LoadingManager.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/loaders/MaterialLoader.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/loaders/TextureLoader.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/materials/LineBasicMaterial.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/materials/LineDashedMaterial.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/materials/Material.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/materials/MeshBasicMaterial.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/materials/MeshDepthMaterial.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/materials/MeshLambertMaterial.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/materials/MeshNormalMaterial.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/materials/MeshPhongMaterial.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/materials/MeshPhysicalMaterial.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/materials/MeshStandardMaterial.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/materials/PointsMaterial.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/materials/RawShaderMaterial.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/materials/ShaderMaterial.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/materials/SpriteMaterial.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/math/Box2.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/math/Box3.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/math/Color.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/math/ColorConstants.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/math/Cylindrical.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/math/Euler.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/math/Frustrum.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/math/Line3.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/math/Math.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/math/Matrix3.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/math/Matrix4.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/math/Plane.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/math/Quaternion.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/math/Ray.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/math/Sphere.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/math/Spherical.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/math/Triangle.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/math/Vector2.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/math/Vector3.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/math/Vector4.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/math/operators.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/meshline/MeshLine.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/meshline/meshLineExt.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/objects/Group.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/objects/LOD.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/objects/Line.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/objects/LineLoop.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/objects/LineSegments.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/objects/Mesh.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/objects/Points.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/objects/Sprite.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/renderers/WebGL2Renderer.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/renderers/WebGL2RendererParams.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/renderers/WebGLRenderTarget.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/renderers/WebGLRenderTargetOptions.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/renderers/WebGLRenderer.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/renderers/WebGLRendererParams.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/renderers/shaders/ShaderChunk.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/renderers/shaders/ShaderLib.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/renderers/shaders/UniformsUtil.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/scenes/Fog.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/scenes/FogExp2.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/scenes/Scene.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/textures/CompressedTexture.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/textures/CubeTexture.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/textures/DepthTexture.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/textures/Texture.kt (100%) rename visionforge-threejs/src/{main => jsMain}/kotlin/three/utils/BufferGeometryUtils.kt (100%) diff --git a/demo/muon-monitor/build.gradle.kts b/demo/muon-monitor/build.gradle.kts index 2ea4d0eb..154d4b0a 100644 --- a/demo/muon-monitor/build.gradle.kts +++ b/demo/muon-monitor/build.gradle.kts @@ -34,8 +34,8 @@ kscience { implementation("ch.qos.logback:logback-classic:1.2.11") } jsMain { - implementation(project(":ui:ring")) - implementation(project(":visionforge-threejs")) + implementation(projects.ui.ring) + implementation(projects.visionforgeThreejs) //implementation(devNpm("webpack-bundle-analyzer", "4.4.0")) } } diff --git a/gradle.properties b/gradle.properties index f38299f2..39926f4b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,5 +6,5 @@ kotlin.incremental.js.ir=true org.gradle.parallel=true org.gradle.jvmargs=-Xmx4G -toolsVersion=0.14.9-kotlin-1.9.0-Beta +toolsVersion=0.14.9-kotlin-1.9.0-Beta-2 org.jetbrains.compose.experimental.jscanvas.enabled=true \ No newline at end of file diff --git a/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/bootstrap.kt b/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/bootstrap.kt similarity index 100% rename from ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/bootstrap.kt rename to ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/bootstrap.kt diff --git a/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/outputConfig.kt b/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/outputConfig.kt similarity index 100% rename from ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/outputConfig.kt rename to ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/outputConfig.kt diff --git a/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/reactBootstrap.kt b/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/reactBootstrap.kt similarity index 100% rename from ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/reactBootstrap.kt rename to ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/reactBootstrap.kt diff --git a/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/tabComponent.kt b/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/tabComponent.kt similarity index 100% rename from ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/tabComponent.kt rename to ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/tabComponent.kt diff --git a/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/threeControls.kt b/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/threeControls.kt similarity index 100% rename from ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/threeControls.kt rename to ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/threeControls.kt diff --git a/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/visionPropertyEditor.kt b/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/visionPropertyEditor.kt similarity index 100% rename from ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/visionPropertyEditor.kt rename to ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/visionPropertyEditor.kt diff --git a/ui/bootstrap/src/main/resources/css/custom-bootstrap.css b/ui/bootstrap/src/jsMain/resources/css/custom-bootstrap.css similarity index 100% rename from ui/bootstrap/src/main/resources/css/custom-bootstrap.css rename to ui/bootstrap/src/jsMain/resources/css/custom-bootstrap.css diff --git a/ui/react/build.gradle.kts b/ui/react/build.gradle.kts index acbe40cb..c4d40cf1 100644 --- a/ui/react/build.gradle.kts +++ b/ui/react/build.gradle.kts @@ -1,11 +1,16 @@ plugins { - id("space.kscience.gradle.js") + id("space.kscience.gradle.mpp") } -dependencies{ - api(project(":visionforge-solid")) - api("org.jetbrains.kotlin-wrappers:kotlin-styled") - api("org.jetbrains.kotlin-wrappers:kotlin-react-dom") +kscience { + js() + jsMain { + dependencies { + api(projects.visionforgeSolid) + api("org.jetbrains.kotlin-wrappers:kotlin-styled") + api("org.jetbrains.kotlin-wrappers:kotlin-react-dom") // implementation(npm("react-select","4.3.0")) - implementation(project(":visionforge-threejs")) + implementation(projects.visionforgeThreejs) + } + } } \ No newline at end of file diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/MetaViewer.kt b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/MetaViewer.kt similarity index 100% rename from ui/react/src/main/kotlin/space/kscience/visionforge/react/MetaViewer.kt rename to ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/MetaViewer.kt diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/MultiSelectChooser.kt b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/MultiSelectChooser.kt similarity index 100% rename from ui/react/src/main/kotlin/space/kscience/visionforge/react/MultiSelectChooser.kt rename to ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/MultiSelectChooser.kt diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/PropertyEditor.kt b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/PropertyEditor.kt similarity index 97% rename from ui/react/src/main/kotlin/space/kscience/visionforge/react/PropertyEditor.kt rename to ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/PropertyEditor.kt index a31a04fb..991ba2d5 100644 --- a/ui/react/src/main/kotlin/space/kscience/visionforge/react/PropertyEditor.kt +++ b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/PropertyEditor.kt @@ -13,10 +13,13 @@ import kotlinx.html.js.onClickFunction import kotlinx.html.org.w3c.dom.events.Event import react.* import react.dom.attrs -import space.kscience.dataforge.meta.* +import space.kscience.dataforge.meta.MutableMeta +import space.kscience.dataforge.meta.ObservableMutableMeta import space.kscience.dataforge.meta.descriptors.MetaDescriptor import space.kscience.dataforge.meta.descriptors.ValueRequirement import space.kscience.dataforge.meta.descriptors.get +import space.kscience.dataforge.meta.get +import space.kscience.dataforge.meta.remove import space.kscience.dataforge.names.* import space.kscience.visionforge.hidden import styled.css diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/RangeValueChooser.kt b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/RangeValueChooser.kt similarity index 100% rename from ui/react/src/main/kotlin/space/kscience/visionforge/react/RangeValueChooser.kt rename to ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/RangeValueChooser.kt diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/ThreeCanvasComponent.kt b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/ThreeCanvasComponent.kt similarity index 100% rename from ui/react/src/main/kotlin/space/kscience/visionforge/react/ThreeCanvasComponent.kt rename to ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/ThreeCanvasComponent.kt diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/TreeStyles.kt b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/TreeStyles.kt similarity index 100% rename from ui/react/src/main/kotlin/space/kscience/visionforge/react/TreeStyles.kt rename to ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/TreeStyles.kt diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/VisionTree.kt b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/VisionTree.kt similarity index 100% rename from ui/react/src/main/kotlin/space/kscience/visionforge/react/VisionTree.kt rename to ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/VisionTree.kt diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/createRoot.kt b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/createRoot.kt similarity index 100% rename from ui/react/src/main/kotlin/space/kscience/visionforge/react/createRoot.kt rename to ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/createRoot.kt diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/ext.kt b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/ext.kt similarity index 100% rename from ui/react/src/main/kotlin/space/kscience/visionforge/react/ext.kt rename to ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/ext.kt diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/layout.kt b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/layout.kt similarity index 100% rename from ui/react/src/main/kotlin/space/kscience/visionforge/react/layout.kt rename to ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/layout.kt diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/valueChooser.kt b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/valueChooser.kt similarity index 100% rename from ui/react/src/main/kotlin/space/kscience/visionforge/react/valueChooser.kt rename to ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/valueChooser.kt diff --git a/ui/ring/build.gradle.kts b/ui/ring/build.gradle.kts index 8b4bf056..d1f2ff72 100644 --- a/ui/ring/build.gradle.kts +++ b/ui/ring/build.gradle.kts @@ -1,11 +1,11 @@ plugins { - id("space.kscience.gradle.js") + id("space.kscience.gradle.mpp") } val dataforgeVersion: String by rootProject.extra -kotlin{ - js(IR){ +kscience{ + js{ useCommonJs() browser { commonWebpackConfig { @@ -15,12 +15,11 @@ kotlin{ } } } -} + jsMain{ + api(projects.ui.react) + api("org.jetbrains.kotlin-wrappers:kotlin-ring-ui") -dependencies{ - api(project(":ui:react")) - api("org.jetbrains.kotlin-wrappers:kotlin-ring-ui") - - implementation(npm("core-js","3.12.1")) - implementation(npm("file-saver", "2.0.2")) + implementation(npm("core-js","3.12.1")) + implementation(npm("file-saver", "2.0.2")) + } } \ No newline at end of file diff --git a/ui/ring/src/main/kotlin/ringui/Loader.kt b/ui/ring/src/jsMain/kotlin/ringui/Loader.kt similarity index 100% rename from ui/ring/src/main/kotlin/ringui/Loader.kt rename to ui/ring/src/jsMain/kotlin/ringui/Loader.kt diff --git a/ui/ring/src/main/kotlin/ringui/LoaderScreen.kt b/ui/ring/src/jsMain/kotlin/ringui/LoaderScreen.kt similarity index 100% rename from ui/ring/src/main/kotlin/ringui/LoaderScreen.kt rename to ui/ring/src/jsMain/kotlin/ringui/LoaderScreen.kt diff --git a/ui/ring/src/main/kotlin/space.kscience.visionforge.ring/ThreeViewWithControls.kt b/ui/ring/src/jsMain/kotlin/space.kscience.visionforge.ring/ThreeViewWithControls.kt similarity index 100% rename from ui/ring/src/main/kotlin/space.kscience.visionforge.ring/ThreeViewWithControls.kt rename to ui/ring/src/jsMain/kotlin/space.kscience.visionforge.ring/ThreeViewWithControls.kt diff --git a/ui/ring/src/main/kotlin/space.kscience.visionforge.ring/ThreeWithControlsPlugin.kt b/ui/ring/src/jsMain/kotlin/space.kscience.visionforge.ring/ThreeWithControlsPlugin.kt similarity index 100% rename from ui/ring/src/main/kotlin/space.kscience.visionforge.ring/ThreeWithControlsPlugin.kt rename to ui/ring/src/jsMain/kotlin/space.kscience.visionforge.ring/ThreeWithControlsPlugin.kt diff --git a/ui/ring/src/main/kotlin/space.kscience.visionforge.ring/ringPropertyEditor.kt b/ui/ring/src/jsMain/kotlin/space.kscience.visionforge.ring/ringPropertyEditor.kt similarity index 100% rename from ui/ring/src/main/kotlin/space.kscience.visionforge.ring/ringPropertyEditor.kt rename to ui/ring/src/jsMain/kotlin/space.kscience.visionforge.ring/ringPropertyEditor.kt diff --git a/ui/ring/src/main/kotlin/space.kscience.visionforge.ring/ringThreeControls.kt b/ui/ring/src/jsMain/kotlin/space.kscience.visionforge.ring/ringThreeControls.kt similarity index 100% rename from ui/ring/src/main/kotlin/space.kscience.visionforge.ring/ringThreeControls.kt rename to ui/ring/src/jsMain/kotlin/space.kscience.visionforge.ring/ringThreeControls.kt diff --git a/visionforge-gdml/build.gradle.kts b/visionforge-gdml/build.gradle.kts index 6dd3042a..cdf4ad47 100644 --- a/visionforge-gdml/build.gradle.kts +++ b/visionforge-gdml/build.gradle.kts @@ -9,7 +9,7 @@ kscience { } dependencies { api(projects.visionforgeSolid) - api("space.kscience:gdml:0.4.0") + api("space.kscience:gdml:0.5.0") } dependencies(jvmTest) { implementation(spclibs.logback.classic) diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeAmbientLightFactory.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeAmbientLightFactory.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeAmbientLightFactory.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeAmbientLightFactory.kt diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeBoxFactory.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeBoxFactory.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeBoxFactory.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeBoxFactory.kt diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeCanvas.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeCanvas.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeCanvas.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeCanvas.kt diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeCanvasLabelFactory.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeCanvasLabelFactory.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeCanvasLabelFactory.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeCanvasLabelFactory.kt diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeCompositeFactory.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeCompositeFactory.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeCompositeFactory.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeCompositeFactory.kt diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeConeFactory.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeConeFactory.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeConeFactory.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeConeFactory.kt diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeConvexFactory.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeConvexFactory.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeConvexFactory.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeConvexFactory.kt diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeFactory.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeFactory.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeFactory.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeFactory.kt diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeGeometryBuilder.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeGeometryBuilder.kt similarity index 99% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeGeometryBuilder.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeGeometryBuilder.kt index e75e4847..d97c354a 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeGeometryBuilder.kt +++ b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeGeometryBuilder.kt @@ -1,13 +1,13 @@ package space.kscience.visionforge.solid.three -import three.core.BufferGeometry -import three.core.Float32BufferAttribute -import three.math.Vector3 import space.kscience.dataforge.meta.Meta import space.kscience.visionforge.solid.GeometryBuilder import space.kscience.visionforge.solid.Point3D import space.kscience.visionforge.solid.cross import space.kscience.visionforge.solid.minus +import three.core.BufferGeometry +import three.core.Float32BufferAttribute +import three.math.Vector3 internal fun Point3D.toVector() = Vector3(x, y, z) diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeJsVision.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeJsVision.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeJsVision.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeJsVision.kt index 3829698e..9d4b8e86 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeJsVision.kt +++ b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeJsVision.kt @@ -1,7 +1,7 @@ package space.kscience.visionforge.solid.three -import three.core.Object3D import space.kscience.visionforge.solid.SolidBase +import three.core.Object3D /** * A custom visual object that has its own Three.js renderer diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeLabelFactory.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeLabelFactory.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeLabelFactory.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeLabelFactory.kt diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeLineFactory.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeLineFactory.kt similarity index 99% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeLineFactory.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeLineFactory.kt index adf4ce0d..edfd6b65 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeLineFactory.kt +++ b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeLineFactory.kt @@ -1,15 +1,15 @@ package space.kscience.visionforge.solid.three -import three.core.BufferGeometry -import three.core.Object3D -import three.math.Color -import three.objects.LineSegments import space.kscience.visionforge.onPropertyChange import space.kscience.visionforge.solid.PolyLine import space.kscience.visionforge.solid.SolidMaterial import space.kscience.visionforge.solid.color import space.kscience.visionforge.solid.string import space.kscience.visionforge.solid.three.ThreeMaterials.DEFAULT_LINE_COLOR +import three.core.BufferGeometry +import three.core.Object3D +import three.math.Color +import three.objects.LineSegments import kotlin.math.ceil import kotlin.reflect.KClass diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeMaterials.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeMaterials.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeMaterials.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeMaterials.kt diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeMeshFactory.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeMeshFactory.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeMeshFactory.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeMeshFactory.kt diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeMeshLineFactory.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeMeshLineFactory.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeMeshLineFactory.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeMeshLineFactory.kt diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreePlugin.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreePlugin.kt similarity index 99% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreePlugin.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreePlugin.kt index 064597e6..8f577baa 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreePlugin.kt +++ b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreePlugin.kt @@ -6,7 +6,6 @@ import org.w3c.dom.Element import org.w3c.dom.HTMLElement import space.kscience.dataforge.context.* import space.kscience.dataforge.meta.Meta -import space.kscience.dataforge.meta.update import space.kscience.dataforge.names.* import space.kscience.visionforge.ElementVisionRenderer import space.kscience.visionforge.Vision diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreePointLightFactory.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreePointLightFactory.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreePointLightFactory.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreePointLightFactory.kt diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeReferenceFactory.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeReferenceFactory.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeReferenceFactory.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeReferenceFactory.kt diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeSmartLineFactory.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeSmartLineFactory.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeSmartLineFactory.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeSmartLineFactory.kt diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeSphereFactory.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeSphereFactory.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeSphereFactory.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/ThreeSphereFactory.kt diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/csg.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/csg.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/csg.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/csg.kt diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/three.kt b/visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/three.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/three.kt rename to visionforge-threejs/src/jsMain/kotlin/space/kscience/visionforge/solid/three/three.kt diff --git a/visionforge-threejs/src/main/kotlin/three/THREE.kt b/visionforge-threejs/src/jsMain/kotlin/three/THREE.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/THREE.kt rename to visionforge-threejs/src/jsMain/kotlin/three/THREE.kt diff --git a/visionforge-threejs/src/main/kotlin/three/animation/AnimationAction.kt b/visionforge-threejs/src/jsMain/kotlin/three/animation/AnimationAction.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/animation/AnimationAction.kt rename to visionforge-threejs/src/jsMain/kotlin/three/animation/AnimationAction.kt diff --git a/visionforge-threejs/src/main/kotlin/three/animation/AnimationClip.kt b/visionforge-threejs/src/jsMain/kotlin/three/animation/AnimationClip.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/animation/AnimationClip.kt rename to visionforge-threejs/src/jsMain/kotlin/three/animation/AnimationClip.kt diff --git a/visionforge-threejs/src/main/kotlin/three/animation/AnimationMixer.kt b/visionforge-threejs/src/jsMain/kotlin/three/animation/AnimationMixer.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/animation/AnimationMixer.kt rename to visionforge-threejs/src/jsMain/kotlin/three/animation/AnimationMixer.kt diff --git a/visionforge-threejs/src/main/kotlin/three/animation/AnimationUtils.kt b/visionforge-threejs/src/jsMain/kotlin/three/animation/AnimationUtils.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/animation/AnimationUtils.kt rename to visionforge-threejs/src/jsMain/kotlin/three/animation/AnimationUtils.kt diff --git a/visionforge-threejs/src/main/kotlin/three/animation/KeyFrameTrack.kt b/visionforge-threejs/src/jsMain/kotlin/three/animation/KeyFrameTrack.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/animation/KeyFrameTrack.kt rename to visionforge-threejs/src/jsMain/kotlin/three/animation/KeyFrameTrack.kt diff --git a/visionforge-threejs/src/main/kotlin/three/audio/Audio.kt b/visionforge-threejs/src/jsMain/kotlin/three/audio/Audio.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/audio/Audio.kt rename to visionforge-threejs/src/jsMain/kotlin/three/audio/Audio.kt diff --git a/visionforge-threejs/src/main/kotlin/three/audio/AudioContext.kt b/visionforge-threejs/src/jsMain/kotlin/three/audio/AudioContext.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/audio/AudioContext.kt rename to visionforge-threejs/src/jsMain/kotlin/three/audio/AudioContext.kt diff --git a/visionforge-threejs/src/main/kotlin/three/audio/AudioListener.kt b/visionforge-threejs/src/jsMain/kotlin/three/audio/AudioListener.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/audio/AudioListener.kt rename to visionforge-threejs/src/jsMain/kotlin/three/audio/AudioListener.kt diff --git a/visionforge-threejs/src/main/kotlin/three/audio/PositionalAudio.kt b/visionforge-threejs/src/jsMain/kotlin/three/audio/PositionalAudio.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/audio/PositionalAudio.kt rename to visionforge-threejs/src/jsMain/kotlin/three/audio/PositionalAudio.kt diff --git a/visionforge-threejs/src/main/kotlin/three/cameras/Camera.kt b/visionforge-threejs/src/jsMain/kotlin/three/cameras/Camera.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/cameras/Camera.kt rename to visionforge-threejs/src/jsMain/kotlin/three/cameras/Camera.kt diff --git a/visionforge-threejs/src/main/kotlin/three/cameras/OrthographicCamera.kt b/visionforge-threejs/src/jsMain/kotlin/three/cameras/OrthographicCamera.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/cameras/OrthographicCamera.kt rename to visionforge-threejs/src/jsMain/kotlin/three/cameras/OrthographicCamera.kt diff --git a/visionforge-threejs/src/main/kotlin/three/cameras/PerspectiveCamera.kt b/visionforge-threejs/src/jsMain/kotlin/three/cameras/PerspectiveCamera.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/cameras/PerspectiveCamera.kt rename to visionforge-threejs/src/jsMain/kotlin/three/cameras/PerspectiveCamera.kt diff --git a/visionforge-threejs/src/main/kotlin/three/core/BufferAttribute.kt b/visionforge-threejs/src/jsMain/kotlin/three/core/BufferAttribute.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/core/BufferAttribute.kt rename to visionforge-threejs/src/jsMain/kotlin/three/core/BufferAttribute.kt diff --git a/visionforge-threejs/src/main/kotlin/three/core/BufferGeometry.kt b/visionforge-threejs/src/jsMain/kotlin/three/core/BufferGeometry.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/core/BufferGeometry.kt rename to visionforge-threejs/src/jsMain/kotlin/three/core/BufferGeometry.kt diff --git a/visionforge-threejs/src/main/kotlin/three/core/Clock.kt b/visionforge-threejs/src/jsMain/kotlin/three/core/Clock.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/core/Clock.kt rename to visionforge-threejs/src/jsMain/kotlin/three/core/Clock.kt diff --git a/visionforge-threejs/src/main/kotlin/three/core/EventDispatcher.kt b/visionforge-threejs/src/jsMain/kotlin/three/core/EventDispatcher.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/core/EventDispatcher.kt rename to visionforge-threejs/src/jsMain/kotlin/three/core/EventDispatcher.kt diff --git a/visionforge-threejs/src/main/kotlin/three/core/Face3.kt b/visionforge-threejs/src/jsMain/kotlin/three/core/Face3.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/core/Face3.kt rename to visionforge-threejs/src/jsMain/kotlin/three/core/Face3.kt diff --git a/visionforge-threejs/src/main/kotlin/three/core/InstancedBufferGeometry.kt b/visionforge-threejs/src/jsMain/kotlin/three/core/InstancedBufferGeometry.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/core/InstancedBufferGeometry.kt rename to visionforge-threejs/src/jsMain/kotlin/three/core/InstancedBufferGeometry.kt diff --git a/visionforge-threejs/src/main/kotlin/three/core/Layers.kt b/visionforge-threejs/src/jsMain/kotlin/three/core/Layers.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/core/Layers.kt rename to visionforge-threejs/src/jsMain/kotlin/three/core/Layers.kt diff --git a/visionforge-threejs/src/main/kotlin/three/core/Object3D.kt b/visionforge-threejs/src/jsMain/kotlin/three/core/Object3D.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/core/Object3D.kt rename to visionforge-threejs/src/jsMain/kotlin/three/core/Object3D.kt diff --git a/visionforge-threejs/src/main/kotlin/three/core/Raycaster.kt b/visionforge-threejs/src/jsMain/kotlin/three/core/Raycaster.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/core/Raycaster.kt rename to visionforge-threejs/src/jsMain/kotlin/three/core/Raycaster.kt diff --git a/visionforge-threejs/src/main/kotlin/three/core/Uniform.kt b/visionforge-threejs/src/jsMain/kotlin/three/core/Uniform.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/core/Uniform.kt rename to visionforge-threejs/src/jsMain/kotlin/three/core/Uniform.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/Detector.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/Detector.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/Detector.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/Detector.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/ImprovedNoise.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/ImprovedNoise.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/ImprovedNoise.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/ImprovedNoise.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/SimplexNoise.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/SimplexNoise.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/SimplexNoise.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/SimplexNoise.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/controls/FlyControls.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/controls/FlyControls.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/controls/FlyControls.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/controls/FlyControls.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/controls/OrbitControls.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/controls/OrbitControls.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/controls/OrbitControls.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/controls/OrbitControls.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/controls/TrackballControls.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/controls/TrackballControls.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/controls/TrackballControls.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/controls/TrackballControls.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/controls/TransformControls.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/controls/TransformControls.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/controls/TransformControls.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/controls/TransformControls.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/exporters/OBJExporter.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/exporters/OBJExporter.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/exporters/OBJExporter.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/exporters/OBJExporter.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/exporters/STLExporter.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/exporters/STLExporter.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/exporters/STLExporter.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/exporters/STLExporter.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/geometries/ConvexGeometry.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/geometries/ConvexGeometry.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/geometries/ConvexGeometry.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/geometries/ConvexGeometry.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/libs/GUIParams.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/libs/GUIParams.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/libs/GUIParams.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/libs/GUIParams.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/libs/Stats.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/libs/Stats.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/libs/Stats.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/libs/Stats.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/libs/datgui.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/libs/datgui.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/libs/datgui.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/libs/datgui.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/loaders/BabylonLoader.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/loaders/BabylonLoader.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/loaders/BabylonLoader.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/loaders/BabylonLoader.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/loaders/GLTFLoader.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/loaders/GLTFLoader.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/loaders/GLTFLoader.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/loaders/GLTFLoader.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/loaders/LoaderSupport.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/loaders/LoaderSupport.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/loaders/LoaderSupport.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/loaders/LoaderSupport.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/loaders/MTLLoader.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/loaders/MTLLoader.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/loaders/MTLLoader.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/loaders/MTLLoader.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/loaders/OBJLoader.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/loaders/OBJLoader.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/loaders/OBJLoader.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/loaders/OBJLoader.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/loaders/OBJLoader2.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/loaders/OBJLoader2.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/loaders/OBJLoader2.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/loaders/OBJLoader2.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/loaders/STLLoader.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/loaders/STLLoader.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/loaders/STLLoader.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/loaders/STLLoader.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/objects/Sky.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/objects/Sky.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/objects/Sky.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/objects/Sky.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/objects/Water.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/objects/Water.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/objects/Water.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/objects/Water.kt diff --git a/visionforge-threejs/src/main/kotlin/three/external/objects/WaterOptions.kt b/visionforge-threejs/src/jsMain/kotlin/three/external/objects/WaterOptions.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/external/objects/WaterOptions.kt rename to visionforge-threejs/src/jsMain/kotlin/three/external/objects/WaterOptions.kt diff --git a/visionforge-threejs/src/main/kotlin/three/extras/SceneUtils.kt b/visionforge-threejs/src/jsMain/kotlin/three/extras/SceneUtils.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/extras/SceneUtils.kt rename to visionforge-threejs/src/jsMain/kotlin/three/extras/SceneUtils.kt diff --git a/visionforge-threejs/src/main/kotlin/three/extras/core/Curve.kt b/visionforge-threejs/src/jsMain/kotlin/three/extras/core/Curve.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/extras/core/Curve.kt rename to visionforge-threejs/src/jsMain/kotlin/three/extras/core/Curve.kt diff --git a/visionforge-threejs/src/main/kotlin/three/extras/core/CurvePath.kt b/visionforge-threejs/src/jsMain/kotlin/three/extras/core/CurvePath.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/extras/core/CurvePath.kt rename to visionforge-threejs/src/jsMain/kotlin/three/extras/core/CurvePath.kt diff --git a/visionforge-threejs/src/main/kotlin/three/extras/core/Path.kt b/visionforge-threejs/src/jsMain/kotlin/three/extras/core/Path.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/extras/core/Path.kt rename to visionforge-threejs/src/jsMain/kotlin/three/extras/core/Path.kt diff --git a/visionforge-threejs/src/main/kotlin/three/extras/core/Shape.kt b/visionforge-threejs/src/jsMain/kotlin/three/extras/core/Shape.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/extras/core/Shape.kt rename to visionforge-threejs/src/jsMain/kotlin/three/extras/core/Shape.kt diff --git a/visionforge-threejs/src/main/kotlin/three/extras/core/ShapePath.kt b/visionforge-threejs/src/jsMain/kotlin/three/extras/core/ShapePath.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/extras/core/ShapePath.kt rename to visionforge-threejs/src/jsMain/kotlin/three/extras/core/ShapePath.kt diff --git a/visionforge-threejs/src/main/kotlin/three/extras/curves/ArcCurve.kt b/visionforge-threejs/src/jsMain/kotlin/three/extras/curves/ArcCurve.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/extras/curves/ArcCurve.kt rename to visionforge-threejs/src/jsMain/kotlin/three/extras/curves/ArcCurve.kt diff --git a/visionforge-threejs/src/main/kotlin/three/extras/curves/CatmullRomCurve3.kt b/visionforge-threejs/src/jsMain/kotlin/three/extras/curves/CatmullRomCurve3.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/extras/curves/CatmullRomCurve3.kt rename to visionforge-threejs/src/jsMain/kotlin/three/extras/curves/CatmullRomCurve3.kt diff --git a/visionforge-threejs/src/main/kotlin/three/extras/curves/EllipseCurve.kt b/visionforge-threejs/src/jsMain/kotlin/three/extras/curves/EllipseCurve.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/extras/curves/EllipseCurve.kt rename to visionforge-threejs/src/jsMain/kotlin/three/extras/curves/EllipseCurve.kt diff --git a/visionforge-threejs/src/main/kotlin/three/extras/curves/LineCurve.kt b/visionforge-threejs/src/jsMain/kotlin/three/extras/curves/LineCurve.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/extras/curves/LineCurve.kt rename to visionforge-threejs/src/jsMain/kotlin/three/extras/curves/LineCurve.kt diff --git a/visionforge-threejs/src/main/kotlin/three/extras/curves/LineCurve3.kt b/visionforge-threejs/src/jsMain/kotlin/three/extras/curves/LineCurve3.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/extras/curves/LineCurve3.kt rename to visionforge-threejs/src/jsMain/kotlin/three/extras/curves/LineCurve3.kt diff --git a/visionforge-threejs/src/main/kotlin/three/extras/curves/QuadricBezierCurve.kt b/visionforge-threejs/src/jsMain/kotlin/three/extras/curves/QuadricBezierCurve.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/extras/curves/QuadricBezierCurve.kt rename to visionforge-threejs/src/jsMain/kotlin/three/extras/curves/QuadricBezierCurve.kt diff --git a/visionforge-threejs/src/main/kotlin/three/extras/curves/QuadricBezierCurve3.kt b/visionforge-threejs/src/jsMain/kotlin/three/extras/curves/QuadricBezierCurve3.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/extras/curves/QuadricBezierCurve3.kt rename to visionforge-threejs/src/jsMain/kotlin/three/extras/curves/QuadricBezierCurve3.kt diff --git a/visionforge-threejs/src/main/kotlin/three/extras/curves/SplineCurve.kt b/visionforge-threejs/src/jsMain/kotlin/three/extras/curves/SplineCurve.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/extras/curves/SplineCurve.kt rename to visionforge-threejs/src/jsMain/kotlin/three/extras/curves/SplineCurve.kt diff --git a/visionforge-threejs/src/main/kotlin/three/geometries/BoxGeometry.kt b/visionforge-threejs/src/jsMain/kotlin/three/geometries/BoxGeometry.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/geometries/BoxGeometry.kt rename to visionforge-threejs/src/jsMain/kotlin/three/geometries/BoxGeometry.kt diff --git a/visionforge-threejs/src/main/kotlin/three/geometries/ConeGeometry.kt b/visionforge-threejs/src/jsMain/kotlin/three/geometries/ConeGeometry.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/geometries/ConeGeometry.kt rename to visionforge-threejs/src/jsMain/kotlin/three/geometries/ConeGeometry.kt diff --git a/visionforge-threejs/src/main/kotlin/three/geometries/CylinderGeometry.kt b/visionforge-threejs/src/jsMain/kotlin/three/geometries/CylinderGeometry.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/geometries/CylinderGeometry.kt rename to visionforge-threejs/src/jsMain/kotlin/three/geometries/CylinderGeometry.kt diff --git a/visionforge-threejs/src/main/kotlin/three/geometries/EdgesGeometry.kt b/visionforge-threejs/src/jsMain/kotlin/three/geometries/EdgesGeometry.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/geometries/EdgesGeometry.kt rename to visionforge-threejs/src/jsMain/kotlin/three/geometries/EdgesGeometry.kt diff --git a/visionforge-threejs/src/main/kotlin/three/geometries/ExtrudeGeometry.kt b/visionforge-threejs/src/jsMain/kotlin/three/geometries/ExtrudeGeometry.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/geometries/ExtrudeGeometry.kt rename to visionforge-threejs/src/jsMain/kotlin/three/geometries/ExtrudeGeometry.kt diff --git a/visionforge-threejs/src/main/kotlin/three/geometries/PlaneGeometry.kt b/visionforge-threejs/src/jsMain/kotlin/three/geometries/PlaneGeometry.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/geometries/PlaneGeometry.kt rename to visionforge-threejs/src/jsMain/kotlin/three/geometries/PlaneGeometry.kt diff --git a/visionforge-threejs/src/main/kotlin/three/geometries/SphereGeometry.kt b/visionforge-threejs/src/jsMain/kotlin/three/geometries/SphereGeometry.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/geometries/SphereGeometry.kt rename to visionforge-threejs/src/jsMain/kotlin/three/geometries/SphereGeometry.kt diff --git a/visionforge-threejs/src/main/kotlin/three/geometries/TextGeometry.kt b/visionforge-threejs/src/jsMain/kotlin/three/geometries/TextGeometry.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/geometries/TextGeometry.kt rename to visionforge-threejs/src/jsMain/kotlin/three/geometries/TextGeometry.kt diff --git a/visionforge-threejs/src/main/kotlin/three/geometries/TorusGeometry.kt b/visionforge-threejs/src/jsMain/kotlin/three/geometries/TorusGeometry.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/geometries/TorusGeometry.kt rename to visionforge-threejs/src/jsMain/kotlin/three/geometries/TorusGeometry.kt diff --git a/visionforge-threejs/src/main/kotlin/three/geometries/TubeGeometry.kt b/visionforge-threejs/src/jsMain/kotlin/three/geometries/TubeGeometry.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/geometries/TubeGeometry.kt rename to visionforge-threejs/src/jsMain/kotlin/three/geometries/TubeGeometry.kt diff --git a/visionforge-threejs/src/main/kotlin/three/geometries/WireframeGeometry.kt b/visionforge-threejs/src/jsMain/kotlin/three/geometries/WireframeGeometry.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/geometries/WireframeGeometry.kt rename to visionforge-threejs/src/jsMain/kotlin/three/geometries/WireframeGeometry.kt diff --git a/visionforge-threejs/src/main/kotlin/three/helpers/ArrowHelper.kt b/visionforge-threejs/src/jsMain/kotlin/three/helpers/ArrowHelper.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/helpers/ArrowHelper.kt rename to visionforge-threejs/src/jsMain/kotlin/three/helpers/ArrowHelper.kt diff --git a/visionforge-threejs/src/main/kotlin/three/helpers/AxesHelper.kt b/visionforge-threejs/src/jsMain/kotlin/three/helpers/AxesHelper.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/helpers/AxesHelper.kt rename to visionforge-threejs/src/jsMain/kotlin/three/helpers/AxesHelper.kt diff --git a/visionforge-threejs/src/main/kotlin/three/helpers/Box3Helper.kt b/visionforge-threejs/src/jsMain/kotlin/three/helpers/Box3Helper.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/helpers/Box3Helper.kt rename to visionforge-threejs/src/jsMain/kotlin/three/helpers/Box3Helper.kt diff --git a/visionforge-threejs/src/main/kotlin/three/helpers/CameraHelper.kt b/visionforge-threejs/src/jsMain/kotlin/three/helpers/CameraHelper.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/helpers/CameraHelper.kt rename to visionforge-threejs/src/jsMain/kotlin/three/helpers/CameraHelper.kt diff --git a/visionforge-threejs/src/main/kotlin/three/helpers/GridHelper.kt b/visionforge-threejs/src/jsMain/kotlin/three/helpers/GridHelper.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/helpers/GridHelper.kt rename to visionforge-threejs/src/jsMain/kotlin/three/helpers/GridHelper.kt diff --git a/visionforge-threejs/src/main/kotlin/three/helpers/HemisphereLightHelper.kt b/visionforge-threejs/src/jsMain/kotlin/three/helpers/HemisphereLightHelper.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/helpers/HemisphereLightHelper.kt rename to visionforge-threejs/src/jsMain/kotlin/three/helpers/HemisphereLightHelper.kt diff --git a/visionforge-threejs/src/main/kotlin/three/helpers/PlaneHelper.kt b/visionforge-threejs/src/jsMain/kotlin/three/helpers/PlaneHelper.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/helpers/PlaneHelper.kt rename to visionforge-threejs/src/jsMain/kotlin/three/helpers/PlaneHelper.kt diff --git a/visionforge-threejs/src/main/kotlin/three/ktutils.kt b/visionforge-threejs/src/jsMain/kotlin/three/ktutils.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/ktutils.kt rename to visionforge-threejs/src/jsMain/kotlin/three/ktutils.kt diff --git a/visionforge-threejs/src/main/kotlin/three/lights/AmbientLight.kt b/visionforge-threejs/src/jsMain/kotlin/three/lights/AmbientLight.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/lights/AmbientLight.kt rename to visionforge-threejs/src/jsMain/kotlin/three/lights/AmbientLight.kt diff --git a/visionforge-threejs/src/main/kotlin/three/lights/DirectionalLight.kt b/visionforge-threejs/src/jsMain/kotlin/three/lights/DirectionalLight.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/lights/DirectionalLight.kt rename to visionforge-threejs/src/jsMain/kotlin/three/lights/DirectionalLight.kt diff --git a/visionforge-threejs/src/main/kotlin/three/lights/DirectionalLightShadow.kt b/visionforge-threejs/src/jsMain/kotlin/three/lights/DirectionalLightShadow.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/lights/DirectionalLightShadow.kt rename to visionforge-threejs/src/jsMain/kotlin/three/lights/DirectionalLightShadow.kt diff --git a/visionforge-threejs/src/main/kotlin/three/lights/HemisphereLight.kt b/visionforge-threejs/src/jsMain/kotlin/three/lights/HemisphereLight.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/lights/HemisphereLight.kt rename to visionforge-threejs/src/jsMain/kotlin/three/lights/HemisphereLight.kt diff --git a/visionforge-threejs/src/main/kotlin/three/lights/Light.kt b/visionforge-threejs/src/jsMain/kotlin/three/lights/Light.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/lights/Light.kt rename to visionforge-threejs/src/jsMain/kotlin/three/lights/Light.kt diff --git a/visionforge-threejs/src/main/kotlin/three/lights/LightShadow.kt b/visionforge-threejs/src/jsMain/kotlin/three/lights/LightShadow.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/lights/LightShadow.kt rename to visionforge-threejs/src/jsMain/kotlin/three/lights/LightShadow.kt diff --git a/visionforge-threejs/src/main/kotlin/three/lights/PointLight.kt b/visionforge-threejs/src/jsMain/kotlin/three/lights/PointLight.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/lights/PointLight.kt rename to visionforge-threejs/src/jsMain/kotlin/three/lights/PointLight.kt diff --git a/visionforge-threejs/src/main/kotlin/three/lights/SpotLight.kt b/visionforge-threejs/src/jsMain/kotlin/three/lights/SpotLight.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/lights/SpotLight.kt rename to visionforge-threejs/src/jsMain/kotlin/three/lights/SpotLight.kt diff --git a/visionforge-threejs/src/main/kotlin/three/lights/SpotLightShadow.kt b/visionforge-threejs/src/jsMain/kotlin/three/lights/SpotLightShadow.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/lights/SpotLightShadow.kt rename to visionforge-threejs/src/jsMain/kotlin/three/lights/SpotLightShadow.kt diff --git a/visionforge-threejs/src/main/kotlin/three/loaders/Cache.kt b/visionforge-threejs/src/jsMain/kotlin/three/loaders/Cache.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/loaders/Cache.kt rename to visionforge-threejs/src/jsMain/kotlin/three/loaders/Cache.kt diff --git a/visionforge-threejs/src/main/kotlin/three/loaders/CompressedTextureLoader.kt b/visionforge-threejs/src/jsMain/kotlin/three/loaders/CompressedTextureLoader.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/loaders/CompressedTextureLoader.kt rename to visionforge-threejs/src/jsMain/kotlin/three/loaders/CompressedTextureLoader.kt diff --git a/visionforge-threejs/src/main/kotlin/three/loaders/ImageLoader.kt b/visionforge-threejs/src/jsMain/kotlin/three/loaders/ImageLoader.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/loaders/ImageLoader.kt rename to visionforge-threejs/src/jsMain/kotlin/three/loaders/ImageLoader.kt diff --git a/visionforge-threejs/src/main/kotlin/three/loaders/JSONLoader.kt b/visionforge-threejs/src/jsMain/kotlin/three/loaders/JSONLoader.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/loaders/JSONLoader.kt rename to visionforge-threejs/src/jsMain/kotlin/three/loaders/JSONLoader.kt diff --git a/visionforge-threejs/src/main/kotlin/three/loaders/Loader.kt b/visionforge-threejs/src/jsMain/kotlin/three/loaders/Loader.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/loaders/Loader.kt rename to visionforge-threejs/src/jsMain/kotlin/three/loaders/Loader.kt diff --git a/visionforge-threejs/src/main/kotlin/three/loaders/LoadingManager.kt b/visionforge-threejs/src/jsMain/kotlin/three/loaders/LoadingManager.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/loaders/LoadingManager.kt rename to visionforge-threejs/src/jsMain/kotlin/three/loaders/LoadingManager.kt diff --git a/visionforge-threejs/src/main/kotlin/three/loaders/MaterialLoader.kt b/visionforge-threejs/src/jsMain/kotlin/three/loaders/MaterialLoader.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/loaders/MaterialLoader.kt rename to visionforge-threejs/src/jsMain/kotlin/three/loaders/MaterialLoader.kt diff --git a/visionforge-threejs/src/main/kotlin/three/loaders/TextureLoader.kt b/visionforge-threejs/src/jsMain/kotlin/three/loaders/TextureLoader.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/loaders/TextureLoader.kt rename to visionforge-threejs/src/jsMain/kotlin/three/loaders/TextureLoader.kt diff --git a/visionforge-threejs/src/main/kotlin/three/materials/LineBasicMaterial.kt b/visionforge-threejs/src/jsMain/kotlin/three/materials/LineBasicMaterial.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/materials/LineBasicMaterial.kt rename to visionforge-threejs/src/jsMain/kotlin/three/materials/LineBasicMaterial.kt diff --git a/visionforge-threejs/src/main/kotlin/three/materials/LineDashedMaterial.kt b/visionforge-threejs/src/jsMain/kotlin/three/materials/LineDashedMaterial.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/materials/LineDashedMaterial.kt rename to visionforge-threejs/src/jsMain/kotlin/three/materials/LineDashedMaterial.kt diff --git a/visionforge-threejs/src/main/kotlin/three/materials/Material.kt b/visionforge-threejs/src/jsMain/kotlin/three/materials/Material.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/materials/Material.kt rename to visionforge-threejs/src/jsMain/kotlin/three/materials/Material.kt diff --git a/visionforge-threejs/src/main/kotlin/three/materials/MeshBasicMaterial.kt b/visionforge-threejs/src/jsMain/kotlin/three/materials/MeshBasicMaterial.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/materials/MeshBasicMaterial.kt rename to visionforge-threejs/src/jsMain/kotlin/three/materials/MeshBasicMaterial.kt diff --git a/visionforge-threejs/src/main/kotlin/three/materials/MeshDepthMaterial.kt b/visionforge-threejs/src/jsMain/kotlin/three/materials/MeshDepthMaterial.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/materials/MeshDepthMaterial.kt rename to visionforge-threejs/src/jsMain/kotlin/three/materials/MeshDepthMaterial.kt diff --git a/visionforge-threejs/src/main/kotlin/three/materials/MeshLambertMaterial.kt b/visionforge-threejs/src/jsMain/kotlin/three/materials/MeshLambertMaterial.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/materials/MeshLambertMaterial.kt rename to visionforge-threejs/src/jsMain/kotlin/three/materials/MeshLambertMaterial.kt diff --git a/visionforge-threejs/src/main/kotlin/three/materials/MeshNormalMaterial.kt b/visionforge-threejs/src/jsMain/kotlin/three/materials/MeshNormalMaterial.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/materials/MeshNormalMaterial.kt rename to visionforge-threejs/src/jsMain/kotlin/three/materials/MeshNormalMaterial.kt diff --git a/visionforge-threejs/src/main/kotlin/three/materials/MeshPhongMaterial.kt b/visionforge-threejs/src/jsMain/kotlin/three/materials/MeshPhongMaterial.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/materials/MeshPhongMaterial.kt rename to visionforge-threejs/src/jsMain/kotlin/three/materials/MeshPhongMaterial.kt diff --git a/visionforge-threejs/src/main/kotlin/three/materials/MeshPhysicalMaterial.kt b/visionforge-threejs/src/jsMain/kotlin/three/materials/MeshPhysicalMaterial.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/materials/MeshPhysicalMaterial.kt rename to visionforge-threejs/src/jsMain/kotlin/three/materials/MeshPhysicalMaterial.kt diff --git a/visionforge-threejs/src/main/kotlin/three/materials/MeshStandardMaterial.kt b/visionforge-threejs/src/jsMain/kotlin/three/materials/MeshStandardMaterial.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/materials/MeshStandardMaterial.kt rename to visionforge-threejs/src/jsMain/kotlin/three/materials/MeshStandardMaterial.kt diff --git a/visionforge-threejs/src/main/kotlin/three/materials/PointsMaterial.kt b/visionforge-threejs/src/jsMain/kotlin/three/materials/PointsMaterial.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/materials/PointsMaterial.kt rename to visionforge-threejs/src/jsMain/kotlin/three/materials/PointsMaterial.kt diff --git a/visionforge-threejs/src/main/kotlin/three/materials/RawShaderMaterial.kt b/visionforge-threejs/src/jsMain/kotlin/three/materials/RawShaderMaterial.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/materials/RawShaderMaterial.kt rename to visionforge-threejs/src/jsMain/kotlin/three/materials/RawShaderMaterial.kt diff --git a/visionforge-threejs/src/main/kotlin/three/materials/ShaderMaterial.kt b/visionforge-threejs/src/jsMain/kotlin/three/materials/ShaderMaterial.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/materials/ShaderMaterial.kt rename to visionforge-threejs/src/jsMain/kotlin/three/materials/ShaderMaterial.kt diff --git a/visionforge-threejs/src/main/kotlin/three/materials/SpriteMaterial.kt b/visionforge-threejs/src/jsMain/kotlin/three/materials/SpriteMaterial.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/materials/SpriteMaterial.kt rename to visionforge-threejs/src/jsMain/kotlin/three/materials/SpriteMaterial.kt diff --git a/visionforge-threejs/src/main/kotlin/three/math/Box2.kt b/visionforge-threejs/src/jsMain/kotlin/three/math/Box2.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/math/Box2.kt rename to visionforge-threejs/src/jsMain/kotlin/three/math/Box2.kt diff --git a/visionforge-threejs/src/main/kotlin/three/math/Box3.kt b/visionforge-threejs/src/jsMain/kotlin/three/math/Box3.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/math/Box3.kt rename to visionforge-threejs/src/jsMain/kotlin/three/math/Box3.kt diff --git a/visionforge-threejs/src/main/kotlin/three/math/Color.kt b/visionforge-threejs/src/jsMain/kotlin/three/math/Color.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/math/Color.kt rename to visionforge-threejs/src/jsMain/kotlin/three/math/Color.kt diff --git a/visionforge-threejs/src/main/kotlin/three/math/ColorConstants.kt b/visionforge-threejs/src/jsMain/kotlin/three/math/ColorConstants.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/math/ColorConstants.kt rename to visionforge-threejs/src/jsMain/kotlin/three/math/ColorConstants.kt diff --git a/visionforge-threejs/src/main/kotlin/three/math/Cylindrical.kt b/visionforge-threejs/src/jsMain/kotlin/three/math/Cylindrical.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/math/Cylindrical.kt rename to visionforge-threejs/src/jsMain/kotlin/three/math/Cylindrical.kt diff --git a/visionforge-threejs/src/main/kotlin/three/math/Euler.kt b/visionforge-threejs/src/jsMain/kotlin/three/math/Euler.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/math/Euler.kt rename to visionforge-threejs/src/jsMain/kotlin/three/math/Euler.kt diff --git a/visionforge-threejs/src/main/kotlin/three/math/Frustrum.kt b/visionforge-threejs/src/jsMain/kotlin/three/math/Frustrum.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/math/Frustrum.kt rename to visionforge-threejs/src/jsMain/kotlin/three/math/Frustrum.kt diff --git a/visionforge-threejs/src/main/kotlin/three/math/Line3.kt b/visionforge-threejs/src/jsMain/kotlin/three/math/Line3.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/math/Line3.kt rename to visionforge-threejs/src/jsMain/kotlin/three/math/Line3.kt diff --git a/visionforge-threejs/src/main/kotlin/three/math/Math.kt b/visionforge-threejs/src/jsMain/kotlin/three/math/Math.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/math/Math.kt rename to visionforge-threejs/src/jsMain/kotlin/three/math/Math.kt diff --git a/visionforge-threejs/src/main/kotlin/three/math/Matrix3.kt b/visionforge-threejs/src/jsMain/kotlin/three/math/Matrix3.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/math/Matrix3.kt rename to visionforge-threejs/src/jsMain/kotlin/three/math/Matrix3.kt diff --git a/visionforge-threejs/src/main/kotlin/three/math/Matrix4.kt b/visionforge-threejs/src/jsMain/kotlin/three/math/Matrix4.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/math/Matrix4.kt rename to visionforge-threejs/src/jsMain/kotlin/three/math/Matrix4.kt diff --git a/visionforge-threejs/src/main/kotlin/three/math/Plane.kt b/visionforge-threejs/src/jsMain/kotlin/three/math/Plane.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/math/Plane.kt rename to visionforge-threejs/src/jsMain/kotlin/three/math/Plane.kt diff --git a/visionforge-threejs/src/main/kotlin/three/math/Quaternion.kt b/visionforge-threejs/src/jsMain/kotlin/three/math/Quaternion.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/math/Quaternion.kt rename to visionforge-threejs/src/jsMain/kotlin/three/math/Quaternion.kt diff --git a/visionforge-threejs/src/main/kotlin/three/math/Ray.kt b/visionforge-threejs/src/jsMain/kotlin/three/math/Ray.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/math/Ray.kt rename to visionforge-threejs/src/jsMain/kotlin/three/math/Ray.kt diff --git a/visionforge-threejs/src/main/kotlin/three/math/Sphere.kt b/visionforge-threejs/src/jsMain/kotlin/three/math/Sphere.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/math/Sphere.kt rename to visionforge-threejs/src/jsMain/kotlin/three/math/Sphere.kt diff --git a/visionforge-threejs/src/main/kotlin/three/math/Spherical.kt b/visionforge-threejs/src/jsMain/kotlin/three/math/Spherical.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/math/Spherical.kt rename to visionforge-threejs/src/jsMain/kotlin/three/math/Spherical.kt diff --git a/visionforge-threejs/src/main/kotlin/three/math/Triangle.kt b/visionforge-threejs/src/jsMain/kotlin/three/math/Triangle.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/math/Triangle.kt rename to visionforge-threejs/src/jsMain/kotlin/three/math/Triangle.kt diff --git a/visionforge-threejs/src/main/kotlin/three/math/Vector2.kt b/visionforge-threejs/src/jsMain/kotlin/three/math/Vector2.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/math/Vector2.kt rename to visionforge-threejs/src/jsMain/kotlin/three/math/Vector2.kt diff --git a/visionforge-threejs/src/main/kotlin/three/math/Vector3.kt b/visionforge-threejs/src/jsMain/kotlin/three/math/Vector3.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/math/Vector3.kt rename to visionforge-threejs/src/jsMain/kotlin/three/math/Vector3.kt diff --git a/visionforge-threejs/src/main/kotlin/three/math/Vector4.kt b/visionforge-threejs/src/jsMain/kotlin/three/math/Vector4.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/math/Vector4.kt rename to visionforge-threejs/src/jsMain/kotlin/three/math/Vector4.kt diff --git a/visionforge-threejs/src/main/kotlin/three/math/operators.kt b/visionforge-threejs/src/jsMain/kotlin/three/math/operators.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/math/operators.kt rename to visionforge-threejs/src/jsMain/kotlin/three/math/operators.kt diff --git a/visionforge-threejs/src/main/kotlin/three/meshline/MeshLine.kt b/visionforge-threejs/src/jsMain/kotlin/three/meshline/MeshLine.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/meshline/MeshLine.kt rename to visionforge-threejs/src/jsMain/kotlin/three/meshline/MeshLine.kt diff --git a/visionforge-threejs/src/main/kotlin/three/meshline/meshLineExt.kt b/visionforge-threejs/src/jsMain/kotlin/three/meshline/meshLineExt.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/meshline/meshLineExt.kt rename to visionforge-threejs/src/jsMain/kotlin/three/meshline/meshLineExt.kt diff --git a/visionforge-threejs/src/main/kotlin/three/objects/Group.kt b/visionforge-threejs/src/jsMain/kotlin/three/objects/Group.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/objects/Group.kt rename to visionforge-threejs/src/jsMain/kotlin/three/objects/Group.kt diff --git a/visionforge-threejs/src/main/kotlin/three/objects/LOD.kt b/visionforge-threejs/src/jsMain/kotlin/three/objects/LOD.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/objects/LOD.kt rename to visionforge-threejs/src/jsMain/kotlin/three/objects/LOD.kt diff --git a/visionforge-threejs/src/main/kotlin/three/objects/Line.kt b/visionforge-threejs/src/jsMain/kotlin/three/objects/Line.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/objects/Line.kt rename to visionforge-threejs/src/jsMain/kotlin/three/objects/Line.kt diff --git a/visionforge-threejs/src/main/kotlin/three/objects/LineLoop.kt b/visionforge-threejs/src/jsMain/kotlin/three/objects/LineLoop.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/objects/LineLoop.kt rename to visionforge-threejs/src/jsMain/kotlin/three/objects/LineLoop.kt diff --git a/visionforge-threejs/src/main/kotlin/three/objects/LineSegments.kt b/visionforge-threejs/src/jsMain/kotlin/three/objects/LineSegments.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/objects/LineSegments.kt rename to visionforge-threejs/src/jsMain/kotlin/three/objects/LineSegments.kt diff --git a/visionforge-threejs/src/main/kotlin/three/objects/Mesh.kt b/visionforge-threejs/src/jsMain/kotlin/three/objects/Mesh.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/objects/Mesh.kt rename to visionforge-threejs/src/jsMain/kotlin/three/objects/Mesh.kt diff --git a/visionforge-threejs/src/main/kotlin/three/objects/Points.kt b/visionforge-threejs/src/jsMain/kotlin/three/objects/Points.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/objects/Points.kt rename to visionforge-threejs/src/jsMain/kotlin/three/objects/Points.kt diff --git a/visionforge-threejs/src/main/kotlin/three/objects/Sprite.kt b/visionforge-threejs/src/jsMain/kotlin/three/objects/Sprite.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/objects/Sprite.kt rename to visionforge-threejs/src/jsMain/kotlin/three/objects/Sprite.kt diff --git a/visionforge-threejs/src/main/kotlin/three/renderers/WebGL2Renderer.kt b/visionforge-threejs/src/jsMain/kotlin/three/renderers/WebGL2Renderer.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/renderers/WebGL2Renderer.kt rename to visionforge-threejs/src/jsMain/kotlin/three/renderers/WebGL2Renderer.kt diff --git a/visionforge-threejs/src/main/kotlin/three/renderers/WebGL2RendererParams.kt b/visionforge-threejs/src/jsMain/kotlin/three/renderers/WebGL2RendererParams.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/renderers/WebGL2RendererParams.kt rename to visionforge-threejs/src/jsMain/kotlin/three/renderers/WebGL2RendererParams.kt diff --git a/visionforge-threejs/src/main/kotlin/three/renderers/WebGLRenderTarget.kt b/visionforge-threejs/src/jsMain/kotlin/three/renderers/WebGLRenderTarget.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/renderers/WebGLRenderTarget.kt rename to visionforge-threejs/src/jsMain/kotlin/three/renderers/WebGLRenderTarget.kt diff --git a/visionforge-threejs/src/main/kotlin/three/renderers/WebGLRenderTargetOptions.kt b/visionforge-threejs/src/jsMain/kotlin/three/renderers/WebGLRenderTargetOptions.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/renderers/WebGLRenderTargetOptions.kt rename to visionforge-threejs/src/jsMain/kotlin/three/renderers/WebGLRenderTargetOptions.kt diff --git a/visionforge-threejs/src/main/kotlin/three/renderers/WebGLRenderer.kt b/visionforge-threejs/src/jsMain/kotlin/three/renderers/WebGLRenderer.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/renderers/WebGLRenderer.kt rename to visionforge-threejs/src/jsMain/kotlin/three/renderers/WebGLRenderer.kt diff --git a/visionforge-threejs/src/main/kotlin/three/renderers/WebGLRendererParams.kt b/visionforge-threejs/src/jsMain/kotlin/three/renderers/WebGLRendererParams.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/renderers/WebGLRendererParams.kt rename to visionforge-threejs/src/jsMain/kotlin/three/renderers/WebGLRendererParams.kt diff --git a/visionforge-threejs/src/main/kotlin/three/renderers/shaders/ShaderChunk.kt b/visionforge-threejs/src/jsMain/kotlin/three/renderers/shaders/ShaderChunk.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/renderers/shaders/ShaderChunk.kt rename to visionforge-threejs/src/jsMain/kotlin/three/renderers/shaders/ShaderChunk.kt diff --git a/visionforge-threejs/src/main/kotlin/three/renderers/shaders/ShaderLib.kt b/visionforge-threejs/src/jsMain/kotlin/three/renderers/shaders/ShaderLib.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/renderers/shaders/ShaderLib.kt rename to visionforge-threejs/src/jsMain/kotlin/three/renderers/shaders/ShaderLib.kt diff --git a/visionforge-threejs/src/main/kotlin/three/renderers/shaders/UniformsUtil.kt b/visionforge-threejs/src/jsMain/kotlin/three/renderers/shaders/UniformsUtil.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/renderers/shaders/UniformsUtil.kt rename to visionforge-threejs/src/jsMain/kotlin/three/renderers/shaders/UniformsUtil.kt diff --git a/visionforge-threejs/src/main/kotlin/three/scenes/Fog.kt b/visionforge-threejs/src/jsMain/kotlin/three/scenes/Fog.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/scenes/Fog.kt rename to visionforge-threejs/src/jsMain/kotlin/three/scenes/Fog.kt diff --git a/visionforge-threejs/src/main/kotlin/three/scenes/FogExp2.kt b/visionforge-threejs/src/jsMain/kotlin/three/scenes/FogExp2.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/scenes/FogExp2.kt rename to visionforge-threejs/src/jsMain/kotlin/three/scenes/FogExp2.kt diff --git a/visionforge-threejs/src/main/kotlin/three/scenes/Scene.kt b/visionforge-threejs/src/jsMain/kotlin/three/scenes/Scene.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/scenes/Scene.kt rename to visionforge-threejs/src/jsMain/kotlin/three/scenes/Scene.kt diff --git a/visionforge-threejs/src/main/kotlin/three/textures/CompressedTexture.kt b/visionforge-threejs/src/jsMain/kotlin/three/textures/CompressedTexture.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/textures/CompressedTexture.kt rename to visionforge-threejs/src/jsMain/kotlin/three/textures/CompressedTexture.kt diff --git a/visionforge-threejs/src/main/kotlin/three/textures/CubeTexture.kt b/visionforge-threejs/src/jsMain/kotlin/three/textures/CubeTexture.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/textures/CubeTexture.kt rename to visionforge-threejs/src/jsMain/kotlin/three/textures/CubeTexture.kt diff --git a/visionforge-threejs/src/main/kotlin/three/textures/DepthTexture.kt b/visionforge-threejs/src/jsMain/kotlin/three/textures/DepthTexture.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/textures/DepthTexture.kt rename to visionforge-threejs/src/jsMain/kotlin/three/textures/DepthTexture.kt diff --git a/visionforge-threejs/src/main/kotlin/three/textures/Texture.kt b/visionforge-threejs/src/jsMain/kotlin/three/textures/Texture.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/textures/Texture.kt rename to visionforge-threejs/src/jsMain/kotlin/three/textures/Texture.kt diff --git a/visionforge-threejs/src/main/kotlin/three/utils/BufferGeometryUtils.kt b/visionforge-threejs/src/jsMain/kotlin/three/utils/BufferGeometryUtils.kt similarity index 100% rename from visionforge-threejs/src/main/kotlin/three/utils/BufferGeometryUtils.kt rename to visionforge-threejs/src/jsMain/kotlin/three/utils/BufferGeometryUtils.kt From a695e5e7c9da730a41ee97049f6c67ed6a702f5e Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Tue, 6 Jun 2023 09:52:46 +0300 Subject: [PATCH 03/11] Use K2 --- gradle.properties | 1 + visionforge-gdml/build.gradle.kts | 1 + 2 files changed, 2 insertions(+) diff --git a/gradle.properties b/gradle.properties index 39926f4b..9b345a25 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,4 +7,5 @@ org.gradle.parallel=true org.gradle.jvmargs=-Xmx4G toolsVersion=0.14.9-kotlin-1.9.0-Beta-2 +kotlin.experimental.tryK2=true org.jetbrains.compose.experimental.jscanvas.enabled=true \ No newline at end of file diff --git a/visionforge-gdml/build.gradle.kts b/visionforge-gdml/build.gradle.kts index cdf4ad47..c1c86059 100644 --- a/visionforge-gdml/build.gradle.kts +++ b/visionforge-gdml/build.gradle.kts @@ -10,6 +10,7 @@ kscience { dependencies { api(projects.visionforgeSolid) api("space.kscience:gdml:0.5.0") + implementation("com.github.h0tk3y.betterParse:better-parse:0.4.4") } dependencies(jvmTest) { implementation(spclibs.logback.classic) From ea9d37b9a160262fcc1c88baf08b41760417803e Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Thu, 22 Jun 2023 20:33:23 +0300 Subject: [PATCH 04/11] 1.9.0-RC --- gradle.properties | 6 ++++-- visionforge-gdml/build.gradle.kts | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 9b345a25..2cb4bdbf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,6 +6,8 @@ kotlin.incremental.js.ir=true org.gradle.parallel=true org.gradle.jvmargs=-Xmx4G -toolsVersion=0.14.9-kotlin-1.9.0-Beta-2 +org.jetbrains.compose.experimental.jscanvas.enabled=true + +toolsVersion=0.14.9-kotlin-1.9.0-RC-dev-1 kotlin.experimental.tryK2=true -org.jetbrains.compose.experimental.jscanvas.enabled=true \ No newline at end of file +#kscience.wasm.disabled=true diff --git a/visionforge-gdml/build.gradle.kts b/visionforge-gdml/build.gradle.kts index c1c86059..cdf4ad47 100644 --- a/visionforge-gdml/build.gradle.kts +++ b/visionforge-gdml/build.gradle.kts @@ -10,7 +10,6 @@ kscience { dependencies { api(projects.visionforgeSolid) api("space.kscience:gdml:0.5.0") - implementation("com.github.h0tk3y.betterParse:better-parse:0.4.4") } dependencies(jvmTest) { implementation(spclibs.logback.classic) From 25c3a19eedb171ebd245267967f00fb0ce0fb231 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Tue, 27 Jun 2023 20:30:29 +0300 Subject: [PATCH 05/11] Fix demo package name to ensure proper package resolution --- demo/gdml/build.gradle.kts | 2 ++ ui/react/build.gradle.kts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/demo/gdml/build.gradle.kts b/demo/gdml/build.gradle.kts index 72b1b283..4cccf686 100644 --- a/demo/gdml/build.gradle.kts +++ b/demo/gdml/build.gradle.kts @@ -2,6 +2,8 @@ plugins { id("space.kscience.gradle.mpp") } +group = "demo" + kscience { jvm() js { diff --git a/ui/react/build.gradle.kts b/ui/react/build.gradle.kts index c4d40cf1..1770feeb 100644 --- a/ui/react/build.gradle.kts +++ b/ui/react/build.gradle.kts @@ -10,7 +10,7 @@ kscience { api("org.jetbrains.kotlin-wrappers:kotlin-styled") api("org.jetbrains.kotlin-wrappers:kotlin-react-dom") // implementation(npm("react-select","4.3.0")) - implementation(projects.visionforgeThreejs) + api(projects.visionforgeThreejs) } } } \ No newline at end of file From 086948492c6689a0fa22cc578582ae6fde6a96ce Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Fri, 14 Jul 2023 20:11:37 +0300 Subject: [PATCH 06/11] update build plugin --- gradle.properties | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- jupyter/build.gradle.kts | 2 +- jupyter/visionforge-jupyter-gdml/build.gradle.kts | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gradle.properties b/gradle.properties index 2cb4bdbf..dde47c66 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,6 +8,6 @@ org.gradle.jvmargs=-Xmx4G org.jetbrains.compose.experimental.jscanvas.enabled=true -toolsVersion=0.14.9-kotlin-1.9.0-RC-dev-1 +toolsVersion=0.14.9-kotlin-1.9.0 kotlin.experimental.tryK2=true #kscience.wasm.disabled=true diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fae08049..84a0b92f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/jupyter/build.gradle.kts b/jupyter/build.gradle.kts index 5808f287..1c32732b 100644 --- a/jupyter/build.gradle.kts +++ b/jupyter/build.gradle.kts @@ -11,7 +11,7 @@ kscience { dependencies { api(projects.visionforgeCore) } - dependencies(jvmMain){ + jvmMain { api(projects.visionforgeServer) } } diff --git a/jupyter/visionforge-jupyter-gdml/build.gradle.kts b/jupyter/visionforge-jupyter-gdml/build.gradle.kts index 5a67459e..65df0c80 100644 --- a/jupyter/visionforge-jupyter-gdml/build.gradle.kts +++ b/jupyter/visionforge-jupyter-gdml/build.gradle.kts @@ -16,16 +16,16 @@ kscience { } } - dependencies{ + commonMain{ implementation(projects.visionforgeSolid) implementation(projects.jupyter) } - dependencies(jvmMain){ + jvmMain{ implementation(projects.visionforgeGdml) } - dependencies(jsMain){ + jsMain{ implementation(projects.visionforgeThreejs) implementation(projects.ui.ring) } From ba70af3a2445b5473abd87dff7a883a5facd9961 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sat, 16 Sep 2023 14:05:19 +0300 Subject: [PATCH 07/11] 1.9.20-Beta --- build.gradle.kts | 10 +------ demo/js-playground/build.gradle.kts | 26 +++++++++++-------- .../kotlin/JsPlaygroundApp.kt | 0 .../{main => jsMain}/kotlin/gravityDemo.kt | 0 .../kotlin/markupComponent.kt | 0 .../kotlin/plotlyComponent.kt | 0 .../src/{main => jsMain}/resources/index.html | 0 gradle.properties | 4 +-- gradle/wrapper/gradle-wrapper.properties | 2 +- .../visionforge/bootstrap/outputConfig.kt | 2 +- .../kscience/visionforge/react/MetaViewer.kt | 2 +- .../visionforge/react/MultiSelectChooser.kt | 2 +- .../visionforge/react/PropertyEditor.kt | 6 ++--- .../visionforge/react/RangeValueChooser.kt | 7 ++--- .../kscience/visionforge/react/TreeStyles.kt | 6 ++--- .../kscience/visionforge/react/VisionTree.kt | 11 +++----- .../visionforge/react/valueChooser.kt | 9 +++---- .../ringThreeControls.kt | 2 +- .../visionforge/tables/TableVisionJsPlugin.kt | 4 +-- 19 files changed, 42 insertions(+), 51 deletions(-) rename demo/js-playground/src/{main => jsMain}/kotlin/JsPlaygroundApp.kt (100%) rename demo/js-playground/src/{main => jsMain}/kotlin/gravityDemo.kt (100%) rename demo/js-playground/src/{main => jsMain}/kotlin/markupComponent.kt (100%) rename demo/js-playground/src/{main => jsMain}/kotlin/plotlyComponent.kt (100%) rename demo/js-playground/src/{main => jsMain}/resources/index.html (100%) diff --git a/build.gradle.kts b/build.gradle.kts index 68c3569b..775fd191 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,4 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile -import space.kscience.gradle.isInDevelopment import space.kscience.gradle.useApache2Licence import space.kscience.gradle.useSPCTeam @@ -45,14 +44,7 @@ ksciencePublish { useApache2Licence() useSPCTeam() } - github(githubProject = "visionforge", githubOrg = "SciProgCentre") - space( - if (isInDevelopment) { - "https://maven.pkg.jetbrains.space/spc/p/sci/dev" - } else { - "https://maven.pkg.jetbrains.space/spc/p/sci/maven" - } - ) + repository("spc","https://maven.sciprog.center/kscience") sonatype() } diff --git a/demo/js-playground/build.gradle.kts b/demo/js-playground/build.gradle.kts index 94835588..eca736e4 100644 --- a/demo/js-playground/build.gradle.kts +++ b/demo/js-playground/build.gradle.kts @@ -1,19 +1,19 @@ plugins { - id("space.kscience.gradle.js") + id("space.kscience.gradle.mpp") } -kscience{ +kscience { useCoroutines() } -kotlin{ +kotlin { explicitApi = null - js{ + js { useCommonJs() browser { binaries.executable() commonWebpackConfig { - cssSupport{ + cssSupport { enabled.set(false) } } @@ -21,11 +21,15 @@ kotlin{ } } +kscience { -dependencies{ - implementation(projects.visionforge.visionforgeGdml) - implementation(projects.visionforge.visionforgePlotly) - implementation(projects.visionforge.visionforgeMarkdown) - implementation(projects.visionforge.visionforgeThreejs) - implementation(projects.ui.ring) + dependencies { + implementation(projects.visionforge.visionforgeGdml) + implementation(projects.visionforge.visionforgePlotly) + implementation(projects.visionforge.visionforgeMarkdown) + implementation(projects.visionforge.visionforgeThreejs) + } + jsMain { + implementation(projects.ui.ring) + } } \ No newline at end of file diff --git a/demo/js-playground/src/main/kotlin/JsPlaygroundApp.kt b/demo/js-playground/src/jsMain/kotlin/JsPlaygroundApp.kt similarity index 100% rename from demo/js-playground/src/main/kotlin/JsPlaygroundApp.kt rename to demo/js-playground/src/jsMain/kotlin/JsPlaygroundApp.kt diff --git a/demo/js-playground/src/main/kotlin/gravityDemo.kt b/demo/js-playground/src/jsMain/kotlin/gravityDemo.kt similarity index 100% rename from demo/js-playground/src/main/kotlin/gravityDemo.kt rename to demo/js-playground/src/jsMain/kotlin/gravityDemo.kt diff --git a/demo/js-playground/src/main/kotlin/markupComponent.kt b/demo/js-playground/src/jsMain/kotlin/markupComponent.kt similarity index 100% rename from demo/js-playground/src/main/kotlin/markupComponent.kt rename to demo/js-playground/src/jsMain/kotlin/markupComponent.kt diff --git a/demo/js-playground/src/main/kotlin/plotlyComponent.kt b/demo/js-playground/src/jsMain/kotlin/plotlyComponent.kt similarity index 100% rename from demo/js-playground/src/main/kotlin/plotlyComponent.kt rename to demo/js-playground/src/jsMain/kotlin/plotlyComponent.kt diff --git a/demo/js-playground/src/main/resources/index.html b/demo/js-playground/src/jsMain/resources/index.html similarity index 100% rename from demo/js-playground/src/main/resources/index.html rename to demo/js-playground/src/jsMain/resources/index.html diff --git a/gradle.properties b/gradle.properties index dde47c66..a16b8d7b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,6 +8,6 @@ org.gradle.jvmargs=-Xmx4G org.jetbrains.compose.experimental.jscanvas.enabled=true -toolsVersion=0.14.9-kotlin-1.9.0 -kotlin.experimental.tryK2=true +toolsVersion=0.15.0-kotlin-1.9.20-Beta +#kotlin.experimental.tryK2=true #kscience.wasm.disabled=true diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 84a0b92f..db9a6b82 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/outputConfig.kt b/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/outputConfig.kt index a37469ca..3dfba202 100644 --- a/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/outputConfig.kt +++ b/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/outputConfig.kt @@ -8,7 +8,7 @@ import kotlinx.css.padding import kotlinx.css.properties.border import kotlinx.css.px import kotlinx.html.js.onClickFunction -import kotlinx.html.org.w3c.dom.events.Event +import org.w3c.dom.events.Event import org.w3c.files.Blob import org.w3c.files.BlobPropertyBag import react.FC diff --git a/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/MetaViewer.kt b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/MetaViewer.kt index d6fff754..651c9d31 100644 --- a/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/MetaViewer.kt +++ b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/MetaViewer.kt @@ -3,7 +3,7 @@ package space.kscience.visionforge.react import kotlinx.css.Align import kotlinx.css.alignItems import kotlinx.html.js.onClickFunction -import kotlinx.html.org.w3c.dom.events.Event +import org.w3c.dom.events.Event import react.* import react.dom.a import react.dom.attrs diff --git a/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/MultiSelectChooser.kt b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/MultiSelectChooser.kt index 5e8da06c..fc635d21 100644 --- a/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/MultiSelectChooser.kt +++ b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/MultiSelectChooser.kt @@ -1,10 +1,10 @@ package space.kscience.visionforge.react import kotlinx.html.js.onChangeFunction -import kotlinx.html.org.w3c.dom.events.Event import org.w3c.dom.HTMLOptionElement import org.w3c.dom.HTMLSelectElement import org.w3c.dom.asList +import org.w3c.dom.events.Event import react.FC import react.dom.attrs import react.dom.option diff --git a/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/PropertyEditor.kt b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/PropertyEditor.kt index 991ba2d5..58986076 100644 --- a/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/PropertyEditor.kt +++ b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/PropertyEditor.kt @@ -10,7 +10,7 @@ import kotlinx.coroutines.launch import kotlinx.css.* import kotlinx.css.properties.TextDecoration import kotlinx.html.js.onClickFunction -import kotlinx.html.org.w3c.dom.events.Event +import org.w3c.dom.events.Event import react.* import react.dom.attrs import space.kscience.dataforge.meta.MutableMeta @@ -151,7 +151,7 @@ private fun RBuilder.propertyEditorItem(props: PropertyEditorProps) { css { //+TreeStyles.resizeableInput width = 160.px - margin(1.px, 5.px) + margin = Margin(1.px, 5.px) } ValueChooser { attrs { @@ -170,7 +170,7 @@ private fun RBuilder.propertyEditorItem(props: PropertyEditorProps) { css { width = 24.px alignSelf = Align.stretch - margin(1.px, 5.px) + margin = Margin(1.px, 5.px) backgroundColor = Color.white borderStyle = BorderStyle.solid borderRadius = 2.px diff --git a/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/RangeValueChooser.kt b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/RangeValueChooser.kt index 3ebe4d51..4a82a6e9 100644 --- a/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/RangeValueChooser.kt +++ b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/RangeValueChooser.kt @@ -4,8 +4,9 @@ import kotlinx.css.pct import kotlinx.css.width import kotlinx.html.InputType import kotlinx.html.js.onChangeFunction -import kotlinx.html.org.w3c.dom.events.Event +import kotlinx.html.js.onInputFunction import org.w3c.dom.HTMLInputElement +import org.w3c.dom.events.Event import react.FC import react.dom.attrs import react.fc @@ -58,8 +59,8 @@ public val RangeValueChooser: FC = fc("RangeValueChooser") { attrs { disabled = rangeDisabled value = innerValue?.toString() ?: "" - onChangeFunction = handleChange - consumer.onTagEvent(this, "input", handleChange) +// onChangeFunction = handleChange + onInputFunction = handleChange val minValue = props.descriptor?.attributes?.get("min").string minValue?.let { min = it diff --git a/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/TreeStyles.kt b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/TreeStyles.kt index 5d693a3c..109d0256 100644 --- a/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/TreeStyles.kt +++ b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/TreeStyles.kt @@ -52,10 +52,10 @@ public object TreeStyles : StyleSheet("treeStyles", true) { } public val treeLabel:RuleSet by css { - border = "none" - padding(left = 4.pt, right = 4.pt, top = 0.pt, bottom = 0.pt) + border = Border.none + padding = Padding(left = 4.pt, right = 4.pt, top = 0.pt, bottom = 0.pt) textAlign = TextAlign.left - flex(1.0) + flex = Flex(1.0) } public val treeLabelInactive: RuleSet by css { diff --git a/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/VisionTree.kt b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/VisionTree.kt index 8ec0185c..6212a456 100644 --- a/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/VisionTree.kt +++ b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/VisionTree.kt @@ -1,13 +1,10 @@ package space.kscience.visionforge.react -import kotlinx.css.Color -import kotlinx.css.Cursor -import kotlinx.css.color -import kotlinx.css.cursor +import kotlinx.css.* +import kotlinx.css.properties.TextDecoration import kotlinx.css.properties.TextDecorationLine -import kotlinx.css.properties.textDecoration import kotlinx.html.js.onClickFunction -import kotlinx.html.org.w3c.dom.events.Event +import org.w3c.dom.events.Event import react.* import react.dom.attrs import space.kscience.dataforge.names.Name @@ -37,7 +34,7 @@ private val TreeLabel = fc { props -> color = Color("#069") cursor = Cursor.pointer hover { - textDecoration(TextDecorationLine.underline) + textDecoration = TextDecoration(setOf(TextDecorationLine.underline)) } if (props.name == props.selected) { +TreeStyles.treeLabelSelected diff --git a/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/valueChooser.kt b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/valueChooser.kt index bc6f1979..5d0c7c3d 100644 --- a/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/valueChooser.kt +++ b/ui/react/src/jsMain/kotlin/space/kscience/visionforge/react/valueChooser.kt @@ -1,15 +1,12 @@ package space.kscience.visionforge.react -import kotlinx.css.margin -import kotlinx.css.pct -import kotlinx.css.px -import kotlinx.css.width +import kotlinx.css.* import kotlinx.html.InputType import kotlinx.html.js.onChangeFunction import kotlinx.html.js.onKeyDownFunction -import kotlinx.html.org.w3c.dom.events.Event import org.w3c.dom.HTMLInputElement import org.w3c.dom.HTMLSelectElement +import org.w3c.dom.events.Event import react.FC import react.Props import react.dom.attrs @@ -145,7 +142,7 @@ public val ColorValueChooser: FC = fc("ColorValueChooser") { styledInput(type = InputType.color) { css { width = 100.pct - margin(0.px) + margin = Margin(0.px) } attrs { this.value = props.value?.let { value -> diff --git a/ui/ring/src/jsMain/kotlin/space.kscience.visionforge.ring/ringThreeControls.kt b/ui/ring/src/jsMain/kotlin/space.kscience.visionforge.ring/ringThreeControls.kt index d59b37b9..6a440e71 100644 --- a/ui/ring/src/jsMain/kotlin/space.kscience.visionforge.ring/ringThreeControls.kt +++ b/ui/ring/src/jsMain/kotlin/space.kscience.visionforge.ring/ringThreeControls.kt @@ -8,7 +8,7 @@ import kotlinx.css.padding import kotlinx.css.properties.border import kotlinx.css.px import kotlinx.html.js.onClickFunction -import kotlinx.html.org.w3c.dom.events.Event +import org.w3c.dom.events.Event import org.w3c.files.Blob import org.w3c.files.BlobPropertyBag import react.FC diff --git a/visionforge-tables/src/jsMain/kotlin/space/kscience/visionforge/tables/TableVisionJsPlugin.kt b/visionforge-tables/src/jsMain/kotlin/space/kscience/visionforge/tables/TableVisionJsPlugin.kt index d61e4664..469d4af8 100644 --- a/visionforge-tables/src/jsMain/kotlin/space/kscience/visionforge/tables/TableVisionJsPlugin.kt +++ b/visionforge-tables/src/jsMain/kotlin/space/kscience/visionforge/tables/TableVisionJsPlugin.kt @@ -25,8 +25,8 @@ public class TableVisionJsPlugin : AbstractPlugin(), ElementVisionRenderer { override fun attach(context: Context) { super.attach(context) - kotlinext.js.require("tabulator-tables/dist/css/tabulator.min.css") - kotlinext.js.require("tabulator-tables/src/js/modules/ResizeColumns/ResizeColumns.js") + kotlinext.js.require("tabulator-tables/dist/css/tabulator.min.css") + kotlinext.js.require("tabulator-tables/src/js/modules/ResizeColumns/ResizeColumns.js") } override fun rateVision(vision: Vision): Int = when (vision) { From 35ec4bac0ee54830d35cecbdcd158b38ccfcaa15 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sat, 30 Sep 2023 09:40:12 +0300 Subject: [PATCH 08/11] 1.9.20-Beta --- .../space/kscience/visionforge/gdml/demo/fileDrop.kt | 3 +-- .../src/jsMain/kotlin/JsPlaygroundApp.kt | 4 ++-- .../src/jsMain/kotlin/markupComponent.kt | 7 +++---- .../src/jsMain/kotlin/plotlyComponent.kt | 5 ++--- gradle.properties | 4 ++-- .../kscience/visionforge/bootstrap/bootstrap.kt | 4 ++-- .../kscience/visionforge/bootstrap/outputConfig.kt | 12 ++++-------- .../kscience/visionforge/bootstrap/threeControls.kt | 7 +++---- .../ThreeViewWithControls.kt | 6 +++--- .../ringThreeControls.kt | 12 ++++-------- 10 files changed, 26 insertions(+), 38 deletions(-) diff --git a/demo/gdml/src/jsMain/kotlin/space/kscience/visionforge/gdml/demo/fileDrop.kt b/demo/gdml/src/jsMain/kotlin/space/kscience/visionforge/gdml/demo/fileDrop.kt index e91fedee..2478c3af 100644 --- a/demo/gdml/src/jsMain/kotlin/space/kscience/visionforge/gdml/demo/fileDrop.kt +++ b/demo/gdml/src/jsMain/kotlin/space/kscience/visionforge/gdml/demo/fileDrop.kt @@ -2,7 +2,6 @@ package space.kscience.visionforge.gdml.demo import drop.FileDrop import kotlinx.css.* -import kotlinx.css.properties.border import org.w3c.files.FileList import react.RBuilder import styled.css @@ -13,7 +12,7 @@ import styled.styledDiv fun RBuilder.fileDrop(title: String, action: (files: FileList?) -> Unit) { styledDiv { css { - border(style = BorderStyle.dashed, width = 1.px, color = Color.orange) + border = Border(style = BorderStyle.dashed, width = 1.px, color = Color.orange) flexGrow = 0.0 alignContent = Align.center } diff --git a/demo/js-playground/src/jsMain/kotlin/JsPlaygroundApp.kt b/demo/js-playground/src/jsMain/kotlin/JsPlaygroundApp.kt index d77d8f52..0bdee628 100644 --- a/demo/js-playground/src/jsMain/kotlin/JsPlaygroundApp.kt +++ b/demo/js-playground/src/jsMain/kotlin/JsPlaygroundApp.kt @@ -43,8 +43,8 @@ private class JsPlaygroundApp : Application { createRoot(element).render { styledDiv { css { - padding(0.pt) - margin(0.pt) + padding = Padding(0.pt) + margin = Margin(0.pt) height = 100.vh width = 100.vw } diff --git a/demo/js-playground/src/jsMain/kotlin/markupComponent.kt b/demo/js-playground/src/jsMain/kotlin/markupComponent.kt index 4bbe4b80..a47c28cf 100644 --- a/demo/js-playground/src/jsMain/kotlin/markupComponent.kt +++ b/demo/js-playground/src/jsMain/kotlin/markupComponent.kt @@ -1,5 +1,4 @@ import kotlinx.css.* -import kotlinx.css.properties.border import kotlinx.dom.clear import kotlinx.html.dom.append import org.intellij.markdown.flavours.commonmark.CommonMarkFlavourDescriptor @@ -45,10 +44,10 @@ val Markup = fc("Markup") { props -> css { width = 100.pct height = 100.pct - border(2.pt, BorderStyle.solid, Color.blue) - padding(left = 8.pt) + border= Border(2.pt, BorderStyle.solid, Color.blue) + padding = Padding(left = 8.pt) backgroundColor = Color.white - flex(1.0) + flex = Flex(1.0) zIndex = 10000 } ref = elementRef diff --git a/demo/js-playground/src/jsMain/kotlin/plotlyComponent.kt b/demo/js-playground/src/jsMain/kotlin/plotlyComponent.kt index 322e80c5..80417dde 100644 --- a/demo/js-playground/src/jsMain/kotlin/plotlyComponent.kt +++ b/demo/js-playground/src/jsMain/kotlin/plotlyComponent.kt @@ -1,5 +1,4 @@ import kotlinx.css.* -import kotlinx.css.properties.border import org.w3c.dom.Element import org.w3c.dom.HTMLElement import react.* @@ -30,8 +29,8 @@ val Plotly = fc("Plotly") { props -> css { width = 100.pct height = 100.pct - border(2.pt, BorderStyle.solid, Color.blue) - flex(1.0) + border = Border(2.pt, BorderStyle.solid, Color.blue) + flex = Flex(1.0) } ref = elementRef } diff --git a/gradle.properties b/gradle.properties index a16b8d7b..e65394ef 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,6 +8,6 @@ org.gradle.jvmargs=-Xmx4G org.jetbrains.compose.experimental.jscanvas.enabled=true -toolsVersion=0.15.0-kotlin-1.9.20-Beta -#kotlin.experimental.tryK2=true +toolsVersion=0.15.0-kotlin-1.9.20-Beta2 +kotlin.experimental.tryK2=true #kscience.wasm.disabled=true diff --git a/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/bootstrap.kt b/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/bootstrap.kt index 2f924ecc..c0171cb7 100644 --- a/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/bootstrap.kt +++ b/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/bootstrap.kt @@ -1,8 +1,8 @@ package space.kscience.visionforge.bootstrap public fun useBootstrap(){ - kotlinext.js.require("bootstrap/dist/css/bootstrap.min.css") - kotlinext.js.require("bootstrap") + kotlinext.js.require("bootstrap/dist/css/bootstrap.min.css") + kotlinext.js.require("bootstrap") } //public inline fun TagConsumer.card(title: String, crossinline block: TagConsumer.() -> Unit) { diff --git a/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/outputConfig.kt b/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/outputConfig.kt index 3dfba202..f42235a8 100644 --- a/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/outputConfig.kt +++ b/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/outputConfig.kt @@ -2,11 +2,7 @@ package space.kscience.visionforge.bootstrap import kotlinx.coroutines.DelicateCoroutinesApi import kotlinx.coroutines.GlobalScope -import kotlinx.css.BorderStyle -import kotlinx.css.Color -import kotlinx.css.padding -import kotlinx.css.properties.border -import kotlinx.css.px +import kotlinx.css.* import kotlinx.html.js.onClickFunction import org.w3c.dom.events.Event import org.w3c.files.Blob @@ -29,7 +25,7 @@ private fun saveData(event: Event, fileName: String, mimeType: String = "text/pl event.stopPropagation(); event.preventDefault(); - val fileSaver = kotlinext.js.require("file-saver") + val fileSaver = kotlinext.js.require("file-saver") val blob = Blob(arrayOf(dataBuilder()), BlobPropertyBag("$mimeType;charset=utf-8")) fileSaver.saveAs(blob, fileName) } @@ -53,8 +49,8 @@ public val CanvasControls: FC = fc("CanvasControls") { prop flexColumn { flexRow { css { - border(1.px, BorderStyle.solid, Color.blue) - padding(4.px) + border = Border(1.px, BorderStyle.solid, Color.blue) + padding = Padding(4.px) } props.vision?.let { vision -> button { diff --git a/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/threeControls.kt b/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/threeControls.kt index 9ab0403c..0d5578a7 100644 --- a/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/threeControls.kt +++ b/ui/bootstrap/src/jsMain/kotlin/space/kscience/visionforge/bootstrap/threeControls.kt @@ -1,7 +1,6 @@ package space.kscience.visionforge.bootstrap import kotlinx.css.* -import kotlinx.css.properties.border import react.FC import react.PropsWithChildren import react.RBuilder @@ -33,13 +32,13 @@ public val ThreeControls: FC = fc { props -> } tab("Tree") { css { - border(1.px, BorderStyle.solid, Color.lightGray) - padding(10.px) + border = Border(1.px, BorderStyle.solid, Color.lightGray) + padding = Padding(10.px) } h2 { +"Object tree" } styledDiv { css { - flex(1.0, 1.0, FlexBasis.inherit) + flex = Flex(1.0, 1.0, FlexBasis.inherit) } props.vision?.let { visionTree(it, props.selected, props.onSelect) diff --git a/ui/ring/src/jsMain/kotlin/space.kscience.visionforge.ring/ThreeViewWithControls.kt b/ui/ring/src/jsMain/kotlin/space.kscience.visionforge.ring/ThreeViewWithControls.kt index 3b7133e9..6ae2ec62 100644 --- a/ui/ring/src/jsMain/kotlin/space.kscience.visionforge.ring/ThreeViewWithControls.kt +++ b/ui/ring/src/jsMain/kotlin/space.kscience.visionforge.ring/ThreeViewWithControls.kt @@ -130,7 +130,7 @@ public val ThreeCanvasWithControls: FC = fc("Three css { height = 100.pct minWidth = 600.px - flex(10.0, 1.0, FlexBasis("600px")) + flex = Flex(10.0, 1.0, FlexBasis("600px")) position = Position.relative } @@ -199,11 +199,11 @@ public val ThreeCanvasWithControls: FC = fc("Three } flexColumn { css { - padding(4.px) + padding = Padding(4.px) minWidth = 400.px height = 100.pct overflowY = Overflow.auto - flex(1.0, 10.0, FlexBasis("300px")) + flex = Flex(1.0, 10.0, FlexBasis("300px")) } ringThreeControls(options, solid, selected, onSelect, additionalTabs = props.additionalTabs) } diff --git a/ui/ring/src/jsMain/kotlin/space.kscience.visionforge.ring/ringThreeControls.kt b/ui/ring/src/jsMain/kotlin/space.kscience.visionforge.ring/ringThreeControls.kt index 6a440e71..6cdc0707 100644 --- a/ui/ring/src/jsMain/kotlin/space.kscience.visionforge.ring/ringThreeControls.kt +++ b/ui/ring/src/jsMain/kotlin/space.kscience.visionforge.ring/ringThreeControls.kt @@ -2,11 +2,7 @@ package space.kscience.visionforge.ring import kotlinx.coroutines.DelicateCoroutinesApi import kotlinx.coroutines.GlobalScope -import kotlinx.css.BorderStyle -import kotlinx.css.Color -import kotlinx.css.padding -import kotlinx.css.properties.border -import kotlinx.css.px +import kotlinx.css.* import kotlinx.html.js.onClickFunction import org.w3c.dom.events.Event import org.w3c.files.Blob @@ -34,7 +30,7 @@ internal fun saveData(event: Event, fileName: String, mimeType: String = "text/p event.stopPropagation(); event.preventDefault(); - val fileSaver = kotlinext.js.require("file-saver") + val fileSaver = kotlinext.js.require("file-saver") val blob = Blob(arrayOf(dataBuilder()), BlobPropertyBag("$mimeType;charset=utf-8")) fileSaver.saveAs(blob, fileName) } @@ -58,8 +54,8 @@ internal val CanvasControls: FC = fc("CanvasControls") { pr flexColumn { flexRow { css { - border(1.px, BorderStyle.solid, Color.blue) - padding(4.px) + border = Border(1.px, BorderStyle.solid, Color.blue) + padding = Padding(4.px) } props.vision?.let { vision -> button { From 8fac827acb49c122e961a714b83dcb2e57c116cd Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Mon, 9 Oct 2023 16:17:08 +0300 Subject: [PATCH 09/11] Update versions --- build.gradle.kts | 2 +- demo/playground/src/jvmMain/kotlin/BmnDemo.kt | 3 +++ gradle.properties | 2 +- visionforge-plotly/build.gradle.kts | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 775fd191..56dda332 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,7 +7,7 @@ plugins { // id("org.jetbrains.kotlinx.kover") version "0.5.0" } -val dataforgeVersion by extra("0.6.1") +val dataforgeVersion by extra("0.6.2") val fxVersion by extra("11") allprojects { diff --git a/demo/playground/src/jvmMain/kotlin/BmnDemo.kt b/demo/playground/src/jvmMain/kotlin/BmnDemo.kt index 8f38af59..295701fa 100644 --- a/demo/playground/src/jvmMain/kotlin/BmnDemo.kt +++ b/demo/playground/src/jvmMain/kotlin/BmnDemo.kt @@ -14,6 +14,7 @@ import space.kscience.visionforge.html.ResourceLocation import space.kscience.visionforge.solid.* import java.util.zip.ZipInputStream import kotlin.io.path.Path +import kotlin.io.path.createDirectories import kotlin.io.path.writeText @@ -25,6 +26,8 @@ private fun Meta.countTypes(): Sequence = sequence { } fun main() { + Path("data").createDirectories() + val string = ZipInputStream(TGeoManager::class.java.getResourceAsStream("/root/geometry_run_7-2076.zip")!!).use { it.nextEntry it.readAllBytes().decodeToString() diff --git a/gradle.properties b/gradle.properties index dc7d1342..279f6491 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,5 +9,5 @@ org.gradle.jvmargs=-Xmx4G org.jetbrains.compose.experimental.jscanvas.enabled=true toolsVersion=0.15.0-kotlin-1.9.20-Beta2 -kotlin.experimental.tryK2=true +#kotlin.experimental.tryK2=true #kscience.wasm.disabled=true diff --git a/visionforge-plotly/build.gradle.kts b/visionforge-plotly/build.gradle.kts index 8b0a99d1..9d313266 100644 --- a/visionforge-plotly/build.gradle.kts +++ b/visionforge-plotly/build.gradle.kts @@ -2,7 +2,7 @@ plugins { id("space.kscience.gradle.mpp") } -val plotlyVersion = "0.5.3" +val plotlyVersion = "0.6.0" kscience { jvm() From 001efa711a67dbd741894cc41ad84fa0bbfbd973 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Wed, 18 Oct 2023 11:30:27 +0300 Subject: [PATCH 10/11] update version --- demo/playground/build.gradle.kts | 2 +- gradle.properties | 2 +- visionforge-markdown/build.gradle.kts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/demo/playground/build.gradle.kts b/demo/playground/build.gradle.kts index 36bd6b7b..c51f6691 100644 --- a/demo/playground/build.gradle.kts +++ b/demo/playground/build.gradle.kts @@ -17,7 +17,7 @@ kotlin { useCommonJs() browser { webpackTask { - outputFileName = "js/visionforge-playground.js" + mainOutputFileName.set("js/visionforge-playground.js") } commonWebpackConfig { sourceMaps = true diff --git a/gradle.properties b/gradle.properties index 279f6491..900cd1b7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,6 +8,6 @@ org.gradle.jvmargs=-Xmx4G org.jetbrains.compose.experimental.jscanvas.enabled=true -toolsVersion=0.15.0-kotlin-1.9.20-Beta2 +toolsVersion=0.15.0-kotlin-1.9.20-RC #kotlin.experimental.tryK2=true #kscience.wasm.disabled=true diff --git a/visionforge-markdown/build.gradle.kts b/visionforge-markdown/build.gradle.kts index 36559a09..eb856d75 100644 --- a/visionforge-markdown/build.gradle.kts +++ b/visionforge-markdown/build.gradle.kts @@ -2,7 +2,7 @@ plugins { id("space.kscience.gradle.mpp") } -val markdownVersion = "0.4.1" +val markdownVersion = "0.5.2" kscience { jvm() From 2578fd6f77faa33080e644a6beb54a251c60aa79 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Wed, 18 Oct 2023 11:31:11 +0300 Subject: [PATCH 11/11] Replace external enum with external sealed object --- demo/gdml/src/jsMain/kotlin/drop/FileDrop.kt | 26 +++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/demo/gdml/src/jsMain/kotlin/drop/FileDrop.kt b/demo/gdml/src/jsMain/kotlin/drop/FileDrop.kt index 635c4580..5116155b 100644 --- a/demo/gdml/src/jsMain/kotlin/drop/FileDrop.kt +++ b/demo/gdml/src/jsMain/kotlin/drop/FileDrop.kt @@ -9,30 +9,38 @@ import react.Component import react.Props import react.State -external enum class DropEffects { - copy, - move, - link, - none +sealed external class DropEffects { + @JsName("copy") + object Copy : DropEffects + + @JsName("move") + object Move : DropEffects + + @JsName("link") + object Link : DropEffects + + @JsName("none") + object None : DropEffects } -external interface FileDropProps: Props { +external interface FileDropProps : Props { var className: String? var targetClassName: String? var draggingOverFrameClassName: String? var draggingOverTargetClassName: String? -// var frame?: Exclude | HTMLDocument; + // var frame?: Exclude | HTMLDocument; var onFrameDragEnter: ((event: DragEvent) -> Unit)? var onFrameDragLeave: ((event: DragEvent) -> Unit)? var onFrameDrop: ((event: DragEvent) -> Unit)? -// var onDragOver: ReactDragEventHandler? + + // var onDragOver: ReactDragEventHandler? // var onDragLeave: ReactDragEventHandler? var onDrop: ((files: FileList?, event: dynamic) -> Unit)?//event:DragEvent) var dropEffect: DropEffects? } -external interface FileDropState: State { +external interface FileDropState : State { var draggingOverFrame: Boolean var draggingOverTarget: Boolean }