Fix muon monitor demo.
Light intensity moved to constants
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
### Changed
|
||||
- Simplified Vision and VisionGroup logic. Observation logic moved out.
|
||||
- Use `Name` for child designation and `Path` for tree access
|
||||
- Default intensity for AmbientLight is 2.0
|
||||
- The default intensity for AmbientLight is 1.0. The intensity scale for Three-js is 3.0.
|
||||
|
||||
### Deprecated
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
|
||||
### Fixed
|
||||
- Vision server now automatically switches to WSS protocol for updates if incoming protocol is HTTPS
|
||||
- Issue with track removal in muon monitor demo.
|
||||
|
||||
### Security
|
||||
|
||||
|
30
README.md
30
README.md
@ -70,7 +70,7 @@ To learn more about DataForge, please consult the following URLs:
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
### [plotly](plotly)
|
||||
### [plotly-kt](plotly-kt)
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
@ -99,10 +99,6 @@ To learn more about DataForge, please consult the following URLs:
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
### [visionforge-plotly](visionforge-plotly)
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
### [visionforge-server](visionforge-server)
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
@ -147,23 +143,15 @@ To learn more about DataForge, please consult the following URLs:
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
### [plotly/examples](plotly/examples)
|
||||
### [plotly-kt/examples](plotly-kt/examples)
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
### [plotly/plotlykt-core](plotly/plotlykt-core)
|
||||
### [plotly-kt/plotly-kt-core](plotly-kt/plotly-kt-core)
|
||||
>
|
||||
> **Maturity**: DEVELOPMENT
|
||||
|
||||
### [plotly/plotlykt-jupyter](plotly/plotlykt-jupyter)
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
### [plotly/plotlykt-script](plotly/plotlykt-script)
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
### [plotly/plotlykt-server](plotly/plotlykt-server)
|
||||
### [plotly-kt/plotly-kt-server](plotly-kt/plotly-kt-server)
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
@ -176,19 +164,15 @@ To learn more about DataForge, please consult the following URLs:
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
### [plotly/examples/compose-demo](plotly/examples/compose-demo)
|
||||
### [plotly-kt/examples/compose-demo](plotly-kt/examples/compose-demo)
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
### [plotly/examples/fx-demo](plotly/examples/fx-demo)
|
||||
### [plotly-kt/examples/js-demo](plotly-kt/examples/js-demo)
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
### [plotly/examples/js-demo](plotly/examples/js-demo)
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
### [plotly/examples/native-demo](plotly/examples/native-demo)
|
||||
### [plotly-kt/examples/native-demo](plotly-kt/examples/native-demo)
|
||||
>
|
||||
> **Maturity**: EXPERIMENTAL
|
||||
|
||||
|
@ -2,3 +2,20 @@
|
||||
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
## Artifact:
|
||||
|
||||
The Maven coordinates of this project are `space.kscience:cern-root-loader:0.5.0`.
|
||||
|
||||
**Gradle Kotlin DSL:**
|
||||
```kotlin
|
||||
repositories {
|
||||
maven("https://repo.kotlin.link")
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("space.kscience:cern-root-loader:0.5.0")
|
||||
}
|
||||
```
|
||||
|
@ -10,7 +10,7 @@ group = "ru.mipt.npm"
|
||||
kscience {
|
||||
fullStack(
|
||||
"muon-monitor.js",
|
||||
development = false,
|
||||
development = true,
|
||||
jvmConfig = {
|
||||
binaries {
|
||||
executable {
|
||||
|
@ -72,7 +72,8 @@ class Model(val manager: VisionManager) {
|
||||
map.values.forEach {
|
||||
it.properties[SolidMaterial.MATERIAL_COLOR_KEY] = null
|
||||
}
|
||||
tracks.visions.keys.forEach {
|
||||
val tracksToRemove = tracks.visions.keys.toList()
|
||||
tracksToRemove.forEach {
|
||||
tracks.setVision(it, null)
|
||||
}
|
||||
}
|
||||
|
16
docs/templates/README-TEMPLATE.md
vendored
16
docs/templates/README-TEMPLATE.md
vendored
@ -5,14 +5,14 @@
|
||||
|
||||
[](https://kotlinlang.slack.com/archives/CEXV2QWNM)
|
||||
|
||||
# DataForge Visualization Platform
|
||||
# VisionForge platform
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Introduction](#introduction)
|
||||
* [Requirements](#requirements)
|
||||
* [Features](#features)
|
||||
* [About DataForge](#about-dataforge)
|
||||
* [About VisionForge](#about-VisionForge)
|
||||
* [Modules contained in this repository](#modules-contained-in-this-repository)
|
||||
* [Visualization for External Systems](#visualization-for-external-systems)
|
||||
* [Demonstrations](#demonstrations)
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
## Introduction
|
||||
|
||||
This repository contains a [DataForge](#about-dataforge)\-based framework
|
||||
This repository contains a [VisionForge](#about-VisionForge) framework
|
||||
used for visualization in various scientific applications.
|
||||
|
||||
The main framework's use case for now is 3D visualization for particle physics experiments.
|
||||
@ -41,16 +41,16 @@ JVM backend requires JDK 11 or later
|
||||
The main framework's features for now include:
|
||||
- 3D visualization of complex experimental set-ups
|
||||
- Event display such as particle tracks, etc.
|
||||
- Scales up to few hundred thousands of elements
|
||||
- Camera move, rotate, zoom-in and zoom-out
|
||||
- Scales up to hundreds of thousands of elements
|
||||
- The camera moves, rotates, zoom-in and zoom-out
|
||||
- Scene graph as an object tree with property editor
|
||||
- Settings export and import
|
||||
- Multiple platform support
|
||||
|
||||
## About DataForge
|
||||
## About VisionForge
|
||||
|
||||
DataForge is a software framework for automated scientific data processing. DataForge Visualization
|
||||
Platform uses some of the concepts and modules of DataForge, including: `Meta`, `Configuration`, `Context`,
|
||||
[DataForge](https://git.sciprog.center/kscience/dataforge-core) is a software framework for automated scientific data processing. VisionForge
|
||||
Platform uses some concepts and modules of DataForge, including: `Meta`, `Configuration`, `Context`,
|
||||
`Provider`, and some others.
|
||||
|
||||
To learn more about DataForge, please consult the following URLs:
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Module plotlykt-core
|
||||
# Module plotly-kt-core
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
## Artifact:
|
||||
|
||||
The Maven coordinates of this project are `space.kscience:plotlykt-core:0.7.2`.
|
||||
The Maven coordinates of this project are `space.kscience:plotly-kt-core:0.5.0`.
|
||||
|
||||
**Gradle Kotlin DSL:**
|
||||
```kotlin
|
||||
@ -16,6 +16,6 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("space.kscience:plotlykt-core:0.7.2")
|
||||
implementation("space.kscience:plotly-kt-core:0.5.0")
|
||||
}
|
||||
```
|
||||
|
@ -1,21 +1,4 @@
|
||||
# Module plotlykt-server
|
||||
# Module plotly-kt-server
|
||||
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
## Artifact:
|
||||
|
||||
The Maven coordinates of this project are `space.kscience:plotlykt-server:0.7.2`.
|
||||
|
||||
**Gradle Kotlin DSL:**
|
||||
```kotlin
|
||||
repositories {
|
||||
maven("https://repo.kotlin.link")
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("space.kscience:plotlykt-server:0.7.2")
|
||||
}
|
||||
```
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
## Artifact:
|
||||
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-compose-html:0.4.2`.
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-compose-html:0.5.0`.
|
||||
|
||||
**Gradle Kotlin DSL:**
|
||||
```kotlin
|
||||
@ -16,6 +16,6 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("space.kscience:visionforge-compose-html:0.4.2")
|
||||
implementation("space.kscience:visionforge-compose-html:0.5.0")
|
||||
}
|
||||
```
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
## Artifact:
|
||||
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-compose-multiplatform:0.4.2`.
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-compose-multiplatform:0.5.0`.
|
||||
|
||||
**Gradle Kotlin DSL:**
|
||||
```kotlin
|
||||
@ -16,6 +16,6 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("space.kscience:visionforge-compose-multiplatform:0.4.2")
|
||||
implementation("space.kscience:visionforge-compose-multiplatform:0.5.0")
|
||||
}
|
||||
```
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
## Artifact:
|
||||
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-core:0.4.2`.
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-core:0.5.0`.
|
||||
|
||||
**Gradle Kotlin DSL:**
|
||||
```kotlin
|
||||
@ -16,6 +16,6 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("space.kscience:visionforge-core:0.4.2")
|
||||
implementation("space.kscience:visionforge-core:0.5.0")
|
||||
}
|
||||
```
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
## Artifact:
|
||||
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-gdml:0.4.2`.
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-gdml:0.5.0`.
|
||||
|
||||
**Gradle Kotlin DSL:**
|
||||
```kotlin
|
||||
@ -16,6 +16,6 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("space.kscience:visionforge-gdml:0.4.2")
|
||||
implementation("space.kscience:visionforge-gdml:0.5.0")
|
||||
}
|
||||
```
|
||||
|
@ -6,7 +6,7 @@ Common visionforge jupyter module
|
||||
|
||||
## Artifact:
|
||||
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-jupyter:0.4.2`.
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-jupyter:0.5.0`.
|
||||
|
||||
**Gradle Kotlin DSL:**
|
||||
```kotlin
|
||||
@ -16,6 +16,6 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("space.kscience:visionforge-jupyter:0.4.2")
|
||||
implementation("space.kscience:visionforge-jupyter:0.5.0")
|
||||
}
|
||||
```
|
||||
|
@ -6,7 +6,7 @@ Jupyter api artifact including all common modules
|
||||
|
||||
## Artifact:
|
||||
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-jupyter-common:0.4.2`.
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-jupyter-common:0.5.0`.
|
||||
|
||||
**Gradle Kotlin DSL:**
|
||||
```kotlin
|
||||
@ -16,6 +16,6 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("space.kscience:visionforge-jupyter-common:0.4.2")
|
||||
implementation("space.kscience:visionforge-jupyter-common:0.5.0")
|
||||
}
|
||||
```
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
## Artifact:
|
||||
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-markdown:0.4.2`.
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-markdown:0.5.0`.
|
||||
|
||||
**Gradle Kotlin DSL:**
|
||||
```kotlin
|
||||
@ -16,6 +16,6 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("space.kscience:visionforge-markdown:0.4.2")
|
||||
implementation("space.kscience:visionforge-markdown:0.5.0")
|
||||
}
|
||||
```
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
## Artifact:
|
||||
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-server:0.4.2`.
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-server:0.5.0`.
|
||||
|
||||
**Gradle Kotlin DSL:**
|
||||
```kotlin
|
||||
@ -16,6 +16,6 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("space.kscience:visionforge-server:0.4.2")
|
||||
implementation("space.kscience:visionforge-server:0.5.0")
|
||||
}
|
||||
```
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
## Artifact:
|
||||
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-solid:0.4.2`.
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-solid:0.5.0`.
|
||||
|
||||
**Gradle Kotlin DSL:**
|
||||
```kotlin
|
||||
@ -16,6 +16,6 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("space.kscience:visionforge-solid:0.4.2")
|
||||
implementation("space.kscience:visionforge-solid:0.5.0")
|
||||
}
|
||||
```
|
||||
|
@ -17,11 +17,13 @@ public abstract class LightSource : MiscSolid() {
|
||||
override val descriptor: MetaDescriptor get() = LightSource.descriptor
|
||||
|
||||
public val color: ColorAccessor by colorProperty(SolidMaterial.COLOR_KEY)
|
||||
public var intensity: Number by properties.number(INTENSITY_KEY) { 2.0 }
|
||||
public var intensity: Number by properties.number(INTENSITY_KEY) { DEFAULT_INTENSITY }
|
||||
|
||||
public companion object {
|
||||
public val INTENSITY_KEY: Name = "intensity".asName()
|
||||
|
||||
public const val DEFAULT_INTENSITY: Double = 1.0
|
||||
|
||||
public val descriptor: MetaDescriptor by lazy {
|
||||
MetaDescriptor {
|
||||
value(Vision.VISIBLE_KEY, ValueType.BOOLEAN) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
## Artifact:
|
||||
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-tables:0.4.2`.
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-tables:0.5.0`.
|
||||
|
||||
**Gradle Kotlin DSL:**
|
||||
```kotlin
|
||||
@ -16,6 +16,6 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("space.kscience:visionforge-tables:0.4.2")
|
||||
implementation("space.kscience:visionforge-tables:0.5.0")
|
||||
}
|
||||
```
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
## Artifact:
|
||||
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-threejs:0.4.2`.
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-threejs:0.5.0`.
|
||||
|
||||
**Gradle Kotlin DSL:**
|
||||
```kotlin
|
||||
@ -16,6 +16,6 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("space.kscience:visionforge-threejs:0.4.2")
|
||||
implementation("space.kscience:visionforge-threejs:0.5.0")
|
||||
}
|
||||
```
|
||||
|
@ -14,10 +14,12 @@ import kotlin.reflect.KClass
|
||||
public object ThreeAmbientLightFactory : ThreeFactory<AmbientLightSource> {
|
||||
override val type: KClass<in AmbientLightSource> get() = AmbientLightSource::class
|
||||
|
||||
private const val INTENSITY_SCALE = 3.0
|
||||
|
||||
override suspend fun build(three: ThreePlugin, vision: AmbientLightSource, observe: Boolean): AmbientLight {
|
||||
val res = AmbientLight().apply {
|
||||
color = vision.color.threeColor() ?: Color(0x404040)
|
||||
intensity = vision.intensity.toDouble()
|
||||
intensity = vision.intensity.toDouble()*INTENSITY_SCALE
|
||||
}
|
||||
|
||||
if (observe) {
|
||||
@ -25,11 +27,12 @@ public object ThreeAmbientLightFactory : ThreeFactory<AmbientLightSource> {
|
||||
when (propertyName) {
|
||||
Vision.VISIBLE_KEY -> res.visible = vision.visible ?: true
|
||||
SolidMaterial.COLOR_KEY -> res.color = vision.color.threeColor() ?: Color(0x404040)
|
||||
LightSource.INTENSITY_KEY -> res.intensity = vision.intensity.toDouble()
|
||||
LightSource.INTENSITY_KEY -> res.intensity = vision.intensity.toDouble()*INTENSITY_SCALE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
|
||||
## Artifact:
|
||||
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-threejs-server:0.4.2`.
|
||||
The Maven coordinates of this project are `space.kscience:visionforge-threejs-server:0.5.0`.
|
||||
|
||||
**Gradle Kotlin DSL:**
|
||||
```kotlin
|
||||
@ -16,6 +16,6 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("space.kscience:visionforge-threejs-server:0.4.2")
|
||||
implementation("space.kscience:visionforge-threejs-server:0.5.0")
|
||||
}
|
||||
```
|
||||
|
Reference in New Issue
Block a user