Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.3.0-dev-17 #76

Merged
merged 118 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
f828f86
Replace light model for 3ds
altavir Jan 27, 2022
7ee4067
Update light descriptor
altavir Jan 28, 2022
9648533
Update build tools
altavir Apr 13, 2022
3198bad
Update build.
altavir Apr 13, 2022
212d729
A prototype for context receivers
altavir Apr 15, 2022
ce02a18
Fix mesh conversion and lightning for examples
altavir May 24, 2022
86935ce
Fix light in GDML demo
altavir May 24, 2022
4b1149b
Migrate to new build tools and DF 0.6
altavir Jul 6, 2022
791d6d7
[WIP] great refactoring in progress
altavir Aug 4, 2022
9b1ca83
[WIP] great refactoring in progress
altavir Aug 7, 2022
c71042a
[WIP] great refactoring in progress
altavir Aug 8, 2022
47bde02
[WIP] Completed solid refactoring
altavir Aug 9, 2022
9221df7
[WIP] Completed solid refactoring
altavir Aug 9, 2022
0ea1ee0
All tests pass
altavir Aug 12, 2022
ecf4a6a
Add property flows
altavir Aug 13, 2022
c586a2e
Fix (almost) property resolution
altavir Aug 13, 2022
43362f5
Fix styling for Prototypes
altavir Aug 13, 2022
eeec89f
Fix property editor
altavir Aug 14, 2022
34fbb23
Cleanup vision root rules
altavir Aug 14, 2022
846e87a
Fix flaky properties test
altavir Aug 14, 2022
ac651c4
Fix reference property resolution
altavir Aug 14, 2022
e2f281d
Optimizations... optimizations
altavir Aug 14, 2022
98bb935
Optimizations... optimizations
altavir Aug 14, 2022
cb25dca
Refactor three package. Add MeshLine
altavir Aug 14, 2022
67afa4e
Fix light
altavir Aug 15, 2022
40b784f
More universal treatment of highlighting in three
altavir Aug 19, 2022
75540a0
Add quaternion support
altavir Aug 21, 2022
25fc143
Performance optimization
altavir Aug 23, 2022
56d5774
Fix edges for composite
altavir Aug 24, 2022
f0a6e12
Fix light for GDML and ambient lighg updates
altavir Aug 24, 2022
81aa5d2
Replace plot properties by a wrapper
altavir Aug 24, 2022
960d178
Fix client updates
altavir Aug 25, 2022
3c51060
Refactor pages
altavir Nov 17, 2022
eae1316
Update static/dynamic rendering logic
altavir Nov 20, 2022
b2624cb
Fix API
altavir Nov 20, 2022
279b848
Add demo notebook
altavir Nov 20, 2022
4ceffef
Update connection logic
altavir Nov 21, 2022
d6c974f
Fix loading duplicating plugins in visionServer
altavir Nov 23, 2022
20b20a6
Refactor server API
altavir Dec 2, 2022
c8141c6
Refactor server API
altavir Dec 3, 2022
fd8f693
Refactor server API
altavir Dec 3, 2022
fef1df3
Refactor server API
altavir Dec 6, 2022
d28873e
Refactor server API
altavir Dec 6, 2022
2bdaea2
Update dependencies and compatibility
altavir Jan 17, 2023
35fc7a7
Update threejs server
altavir Jan 17, 2023
4ec611e
Update versions
altavir May 14, 2023
c921d55
Cleanup and fix ROOT bug
altavir May 16, 2023
c48e5aa
build update and minor API changes
altavir May 29, 2023
3377880
Multiple fixes
altavir May 29, 2023
f6f74b5
Fix cone segmenta and cone surface representation
altavir May 30, 2023
18c39fc
Add solids configuration to vision builder
altavir May 30, 2023
d32dc3f
Fix markup plugin tag
altavir May 30, 2023
c4b866f
Fix markup plugin.
altavir May 30, 2023
be52551
Minor fixes
altavir May 30, 2023
a872f10
Minor fixes
altavir May 30, 2023
23cb876
Minor fixes
altavir Jun 2, 2023
140c594
Change all Js modules to MPP
altavir Jun 2, 2023
38302ea
Use KMath-geometry for solids
altavir Jun 3, 2023
442fcb6
Use KMath-geometry for solids
altavir Jun 3, 2023
8204eb6
Make threeJS object generation suspend
altavir Jun 3, 2023
2b70afd
Suspended renderers and property change listeners
altavir Jun 4, 2023
a695e5e
Use K2
altavir Jun 6, 2023
20851ba
Make Axes a separate object
altavir Jun 6, 2023
4bce9ad
update version
altavir Jun 7, 2023
07b54fd
Use quaternion as rotation value
altavir Jun 7, 2023
f2d7e20
Add dynamic rotation example
altavir Jun 7, 2023
8611327
antenna example
altavir Jun 8, 2023
04b4a12
antenna example
altavir Jun 22, 2023
ea9d37b
1.9.0-RC
altavir Jun 22, 2023
25c3a19
Fix demo package name to ensure proper package resolution
altavir Jun 27, 2023
0869484
update build plugin
altavir Jul 14, 2023
8b25761
Refactor jupyter integratin
altavir Jul 19, 2023
c1f275c
Work-around for strange dependency resolution in notebooks
altavir Jul 19, 2023
5783cf1
Work-around for strange dependency resolution in notebooks
altavir Jul 20, 2023
a49a4f1
add plotly imports
altavir Jul 20, 2023
b3f68d8
Jupyter renderers are working for lab and Idea
altavir Jul 22, 2023
ed491bd
cleanup
altavir Jul 22, 2023
f5fba47
Some refactoring and new server demo
altavir Jul 25, 2023
1e29c5d
add a workaround for root duplicating names
altavir Aug 22, 2023
3529d0e
Fix polygon builders
altavir Aug 22, 2023
cd28f37
Update build.yml
SPC-code Aug 23, 2023
6a801f9
Fix solid ref signature
altavir Aug 23, 2023
92bfb17
minor fix to Root rotations
altavir Sep 16, 2023
20fc813
Merge branch 'dev' into beta/1.9.0
altavir Sep 16, 2023
ba70af3
1.9.20-Beta
altavir Sep 16, 2023
35ec4ba
1.9.20-Beta
altavir Sep 30, 2023
ae12084
Fix angle problems in Root importer
altavir Sep 30, 2023
4b91e5d
BM@N and fixes
altavir Sep 30, 2023
af2539e
BM@N and fixes
altavir Sep 30, 2023
d44f25a
Merge branch 'dev' into beta/1.9.20
altavir Oct 4, 2023
9356e34
Add CutTube class
teldufalsari Oct 4, 2023
00213c0
Name unification in Vision properties manipulation
altavir Oct 7, 2023
c7640a6
Add surface geometry
altavir Oct 7, 2023
52d3464
Added polygone with a hole to Root converter
altavir Oct 7, 2023
cf4743b
Add ROOT to Solid conversion for TGeoCone and TGeoCTub shapes
teldufalsari Oct 8, 2023
8749c0b
Merge branch 'dev' into teldufalsari/rootToSolid
teldufalsari Oct 8, 2023
15b7dbd
Add documentation for parameters
teldufalsari Oct 8, 2023
bdc2885
Merge branch 'dev' into beta/1.9.20
altavir Oct 9, 2023
8fac827
Update versions
altavir Oct 9, 2023
1ebeefe
Merge pull request 'New primitives' (!76) from teldufalsari/visionfor…
altavir Oct 10, 2023
001efa7
update version
altavir Oct 18, 2023
2578fd6
Replace external enum with external sealed object
altavir Oct 18, 2023
6144410
Merge branch 'beta/1.9.20' into dev
altavir Oct 18, 2023
cf6d733
Add vision client-side events
altavir Oct 18, 2023
9c1246f
Fix CME in solid children clearing. Add documentation. Splic client
altavir Oct 18, 2023
64c447a
Version updates and bugfixes
altavir Oct 25, 2023
399be20
Non-nullable accessor for colors
altavir Nov 13, 2023
1ea5ef8
Add direct event processing to Vision
altavir Nov 15, 2023
c7d4bdf
Add direct event processing to Vision
altavir Nov 15, 2023
f0048a4
Add direct event processing to Vision
altavir Nov 15, 2023
ed71ba9
Add compose-html
altavir Nov 20, 2023
e6bdb67
Add compose-html
altavir Nov 21, 2023
80284a9
Add click handlers
altavir Nov 24, 2023
4696550
Change controls API
altavir Nov 29, 2023
7561dda
Fix html input renderers
altavir Dec 2, 2023
c877fcb
Add plain html input renderer
altavir Dec 2, 2023
fbb402d
add builders for html field
altavir Dec 3, 2023
5955129
DataForge 0.7.1 and other version updates
altavir Dec 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ on:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 40
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3.5.3
- name: Set up JDK 11
uses: actions/setup-java@v2.5.0
uses: actions/setup-java@v3.12.0
with:
java-version: 11
distribution: liberica
- name: execute build
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v2.7.1
with:
arguments: build
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ build/
data/

!gradle-wrapper.jar

/kotlin-js-store/yarn.lock
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,27 @@

## [Unreleased]
### Added
- Context receivers flag
- MeshLine for thick lines
- Custom client-side events and thier processing in VisionServer

### Changed
- Color accessor property is now `colorProperty`. Color uses non-nullable `invoke` instead of `set`.
- API update for server and pages
- Edges moved to solids module for easier construction
- Visions **must** be rooted in order to subscribe to updates.
- Visions use flows instead of direct subscriptions.
- Radical change of inner workings of vision children and properties.
- Three package changed to `three`.
- Naming of Canvas3D options.
- Lights are added to the scene instead of 3D options.

### Deprecated

### Removed

### Fixed
- Jupyter integration for IDEA and Jupyter lab.

### Security

Expand Down
35 changes: 28 additions & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,29 +1,50 @@
import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile
import space.kscience.gradle.useApache2Licence
import space.kscience.gradle.useSPCTeam

plugins {
id("ru.mipt.npm.gradle.project")
id("org.jetbrains.kotlinx.kover") version "0.5.0-RC"
id("space.kscience.gradle.project")
// id("org.jetbrains.kotlinx.kover") version "0.5.0"
}

val dataforgeVersion by extra("0.5.2")
val dataforgeVersion by extra("0.7.1")
val fxVersion by extra("11")

allprojects{
allprojects {
group = "space.kscience"
version = "0.2.0"
version = "0.3.0-dev-17"
}

subprojects {
if (name.startsWith("visionforge")) apply<MavenPublishPlugin>()

repositories {
mavenLocal()
maven("https://repo.kotlin.link")
mavenCentral()
maven("https://maven.jzy3d.org/releases")
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
freeCompilerArgs = freeCompilerArgs + "-Xcontext-receivers"
}
}

tasks.withType<KotlinJsCompile>{
kotlinOptions{
useEsClasses = true
}
}
}

ksciencePublish {
github("visionforge")
space()
pom("https://github.com/SciProgCentre/visionforge") {
useApache2Licence()
useSPCTeam()
}
repository("spc","https://maven.sciprog.center/kscience")
sonatype()
}

Expand Down
17 changes: 6 additions & 11 deletions cern-root-loader/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
plugins {
id("ru.mipt.npm.gradle.mpp")
id("space.kscience.gradle.mpp")
}

kscience{
jvm()
js()
dependencies {
api(projects.visionforgeSolid)
}
useSerialization {
json()
}
}

kotlin {
sourceSets {
val commonMain by getting {
dependencies {
api(project(":visionforge-solid"))
}
}
}
}
53 changes: 53 additions & 0 deletions cern-root-loader/src/commonMain/kotlin/ru/mipt/npm/root/BMN.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package ru.mipt.npm.root

import kotlinx.serialization.Serializable
import kotlinx.serialization.builtins.ListSerializer
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonArray
import space.kscience.visionforge.solid.Float32Vector3D


@Serializable
public data class FairTrackParam(
val fX: Double,
val fY: Double,
val fZ: Double,
val fTx: Double,
val fTy: Double,
val fQp: Double,
)

public fun FairTrackParam.toVector(): Float32Vector3D = Float32Vector3D(fX,fY,fZ)

@Serializable
public data class CbmStsTrack(
val fParamFirst: FairTrackParam,
val fParamLast: FairTrackParam,
)

@Serializable
public data class BmnGlobalTrack(
val fParamFirst: FairTrackParam,
val fParamLast: FairTrackParam,
)

public class BmnEventContainer(
public val cbmTracks: List<CbmStsTrack>,
public val bmnGlobalTracks: List<BmnGlobalTrack>,
)

public object BMN {
public val json: Json = Json {
ignoreUnknownKeys = true
classDiscriminator = "_typename"
}

public fun readEventJson(string: String): BmnEventContainer {
val jsonArray = json.parseToJsonElement(string) as JsonArray
val cbmTracks: List<CbmStsTrack> =
json.decodeFromJsonElement(ListSerializer(CbmStsTrack.serializer()), jsonArray[0])
val bmnGlobalTracks: List<BmnGlobalTrack> =
json.decodeFromJsonElement(ListSerializer(BmnGlobalTrack.serializer()), jsonArray[1])
return BmnEventContainer(cbmTracks, bmnGlobalTracks)
}
}
62 changes: 51 additions & 11 deletions cern-root-loader/src/commonMain/kotlin/ru/mipt/npm/root/DObject.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import space.kscience.dataforge.meta.*
import space.kscience.dataforge.misc.Named
import space.kscience.dataforge.names.Name
import space.kscience.dataforge.names.asName
import space.kscience.dataforge.values.doubleArray
import kotlin.properties.ReadOnlyProperty

public fun MetaProvider.doubleArray(
Expand Down Expand Up @@ -43,7 +42,7 @@ public open class DObject(public val meta: Meta, public val refCache: DObjectCac
}

internal fun <T : DObject> tObjectArray(
builder: (Meta, DObjectCache) -> T
builder: (Meta, DObjectCache) -> T,
): ReadOnlyProperty<Any?, List<T>> = ReadOnlyProperty { _, property ->
meta.getIndexed(Name.of(property.name, "arr")).values.mapNotNull {
resolve(builder, it)
Expand All @@ -52,9 +51,9 @@ public open class DObject(public val meta: Meta, public val refCache: DObjectCac

internal fun <T : DObject> dObject(
builder: (Meta, DObjectCache) -> T,
key: Name? = null
key: Name? = null,
): ReadOnlyProperty<Any?, T?> = ReadOnlyProperty { _, property ->
meta[key ?: property.name.asName()]?.let { resolve(builder, it) }
meta[key ?: property.name.asName()]?.takeIf { it.value != Null }?.let { resolve(builder, it) }
}
}

Expand All @@ -63,8 +62,7 @@ public open class DNamed(meta: Meta, refCache: DObjectCache) : DObject(meta, ref
public val fTitle: String by meta.string("")
}

public class DGeoMaterial(meta: Meta, refCache: DObjectCache) : DNamed(meta, refCache) {
}
public class DGeoMaterial(meta: Meta, refCache: DObjectCache) : DNamed(meta, refCache)

public class DGeoMedium(meta: Meta, refCache: DObjectCache) : DNamed(meta, refCache) {
public val fMaterial: DGeoMaterial? by dObject(::DGeoMaterial)
Expand All @@ -91,27 +89,69 @@ public class DGeoNode(meta: Meta, refCache: DObjectCache) : DNamed(meta, refCach
public val fVolume: DGeoVolume? by dObject(::DGeoVolume)
}

public open class DGeoMatrix(meta: Meta, refCache: DObjectCache) : DNamed(meta, refCache)
public sealed class DGeoMatrix(meta: Meta, refCache: DObjectCache) : DNamed(meta, refCache)

public open class DGeoScale(meta: Meta, refCache: DObjectCache) : DGeoMatrix(meta, refCache) {
public class DGeoIdentity(meta: Meta, refCache: DObjectCache) : DGeoMatrix(meta, refCache)

public class DGeoScale(meta: Meta, refCache: DObjectCache) : DGeoMatrix(meta, refCache) {
public val fScale: DoubleArray by meta.doubleArray(1.0, 1.0, 1.0)
public val x: Double get() = fScale[0]
public val y: Double get() = fScale[1]
public val z: Double get() = fScale[2]
}

public class DGeoRotation(meta: Meta, refCache: DObjectCache) : DGeoMatrix(meta, refCache) {
public val fRotationMatrix: DoubleArray by meta.doubleArray()
}

public class DGeoTranslation(meta: Meta, refCache: DObjectCache) : DGeoMatrix(meta, refCache) {
public val fTranslation: DoubleArray by meta.doubleArray()
}

public open class DGeoCombiTrans(meta: Meta, refCache: DObjectCache) : DGeoMatrix(meta, refCache) {
public val fRotation: DGeoRotation? by dObject(::DGeoRotation)
public val fTranslation: DoubleArray by meta.doubleArray()
}

public class DGeoGenTrans(meta: Meta, refCache: DObjectCache) : DGeoCombiTrans(meta, refCache) {
public val fScale: DoubleArray by meta.doubleArray()
}

public class DGeoHMatrix(meta: Meta, refCache: DObjectCache) : DGeoMatrix(meta, refCache) {
public val fRotation: DGeoRotation? by dObject(::DGeoRotation)
public val fTranslation: DoubleArray by meta.doubleArray()
public val fScale: DoubleArray by meta.doubleArray()
}

/**
* Create a specialized version of [DGeoMatrix]
*/
internal fun dGeoMatrix(
meta: Meta,
refCache: DObjectCache,
): DGeoMatrix = when (val typename = meta["_typename"].string) {
null -> error("Type name is undefined")
"TGeoIdentity" -> DGeoIdentity(meta, refCache)
"TGeoScale" -> DGeoScale(meta, refCache)
"TGeoRotation" -> DGeoRotation(meta, refCache)
"TGeoTranslation" -> DGeoTranslation(meta, refCache)
"TGeoCombiTrans" -> DGeoCombiTrans(meta, refCache)
"TGeoGenTrans" -> DGeoGenTrans(meta, refCache)
"TGeoHMatrix" -> DGeoHMatrix(meta, refCache)
else -> error("$typename is not a member of TGeoMatrix")
}

public class DGeoBoolNode(meta: Meta, refCache: DObjectCache) : DObject(meta, refCache) {
public val fLeft: DGeoShape? by dObject(::DGeoShape)
public val fLeftMat: DGeoMatrix? by dObject(::DGeoMatrix)
public val fLeftMat: DGeoMatrix? by dObject(::dGeoMatrix)

public val fRight: DGeoShape? by dObject(::DGeoShape)
public val fRightMat: DGeoMatrix? by dObject(::DGeoMatrix)
public val fRightMat: DGeoMatrix? by dObject(::dGeoMatrix)
}


public class DGeoManager(meta: Meta, refCache: DObjectCache) : DNamed(meta, refCache) {
public val fMatrices: List<DGeoMatrix> by tObjectArray(::DGeoMatrix)
public val fMatrices: List<DGeoMatrix> by tObjectArray(::dGeoMatrix)

public val fShapes: List<DGeoShape> by tObjectArray(::DGeoShape)

Expand Down
Loading