@vyr/service-scene 0.0.18 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vyr/service-scene",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "",
5
5
  "main": "./src/index.ts",
6
6
  "author": "",
@@ -1,5 +1,5 @@
1
1
  import { ArrayUtils, AsyncTask, Category, Descriptor } from "@vyr/engine"
2
- import { DataService, runtime } from "@vyr/runtime"
2
+ import { runtime } from "@vyr/runtime"
3
3
  import { Message, RpcService } from '@vyr/service-rpc'
4
4
  import { SceneService } from "./SceneService"
5
5
 
@@ -45,8 +45,8 @@ class SceneMethodProvider {
45
45
  _initialize = async (msg: InstanceType<typeof Message['scene']['initialize']['NoticeMessage']>) => {
46
46
  const { params } = msg
47
47
  const descriptor = Descriptor.create(params.serialization)
48
- this.service.root.clear()
49
- this.service.root.add(descriptor)
48
+ this.service.navigator.root.clear()
49
+ this.service.navigator.root.add(descriptor)
50
50
  this.service.scenes.length = 0
51
51
  this.service.scenes.push(...params.scenes)
52
52
  this.service.navigator.url = params.url
@@ -73,9 +73,9 @@ class SceneMethodProvider {
73
73
  if (msg.params.client !== rpcService.client) return
74
74
 
75
75
  this.service.navigator.url = msg.params.url.new
76
- this.service.root.clear()
76
+ this.service.navigator.root.clear()
77
77
  const descriptor = Descriptor.create(msg.params.serialization)
78
- this.service.root.add(descriptor)
78
+ this.service.navigator.root.add(descriptor)
79
79
  }
80
80
 
81
81
  _add = (msg: InstanceType<typeof Message['scene']['add']['NoticeMessage']>) => {
@@ -121,7 +121,7 @@ class SceneMethodProvider {
121
121
  const target = msg.params.next || msg.params.targetData.data.uuid
122
122
 
123
123
  for (const uuid of msg.params.dragData.data.uuids) {
124
- this.service.root[method](uuid, target)
124
+ this.service.navigator.root[method](uuid, target)
125
125
  }
126
126
  }
127
127
  }
@@ -7,15 +7,14 @@ import { Message, RpcService, UseRecord } from '@vyr/service-rpc'
7
7
  import { SceneMethodProvider } from './SceneMethodProvider'
8
8
 
9
9
  class SceneService extends Service {
10
+ static key = 'scene'
10
11
  private _provider = new SceneMethodProvider(this)
11
- readonly root
12
12
  readonly useRecord
13
13
  readonly navigator
14
14
  readonly scenes: string[] = []
15
15
 
16
- constructor(name: string, useRecord: UseRecord, root: Descriptor, navigator: SidebarNavigator) {
16
+ constructor(name: string, useRecord: UseRecord, navigator: SidebarNavigator) {
17
17
  super(name)
18
- this.root = root
19
18
  this.useRecord = useRecord
20
19
  this.navigator = navigator
21
20
  }