@vyr/remote 0.0.1 → 0.0.2

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,18 +1 @@
1
- {
2
- "name": "@vyr/remote",
3
- "version": "0.0.1",
4
- "description": "",
5
- "main": "./src/index.ts",
6
- "author": "",
7
- "license": "MIT",
8
- "dependencies": {
9
- "dom-to-image": "^2.6.0",
10
- "@vyr/locale": "0.0.1",
11
- "@vyr/declare": "0.0.1",
12
- "@vyr/engine": "0.0.1"
13
- },
14
- "files": [
15
- "package.json",
16
- "src/"
17
- ]
18
- }
1
+ {"name":"@vyr/remote","version":"0.0.2","description":"","main":"./src/index.ts","author":"","license":"MIT","dependencies":{"dom-to-image":"^2.6.0","@vyr/locale":"0.0.2","@vyr/declare":"0.0.2","@vyr/engine":"0.0.2"},"files":["package.json","src/"]}
@@ -1,10 +1,10 @@
1
- import { Descriptor, Graphics, HTMLTransformControllerChangeArgs, HTMLTransformControllerDescriptor, Scriptable } from "@vyr/engine";
1
+ import { Descriptor, Graphics, HTMLTransformControllerChangeArgs, Scriptable } from "@vyr/engine";
2
2
  import { RemoteProcess } from "./RemoteProcess";
3
3
  import { Job } from "./job";
4
4
 
5
- class ChangeScriptable extends Scriptable {
5
+ class ChangeScriptable extends Scriptable<HTMLTransformControllerChangeArgs> {
6
6
 
7
- execute(descriptor: HTMLTransformControllerDescriptor, graphics: Graphics, args: HTMLTransformControllerChangeArgs) {
7
+ execute(graphics: Graphics, args: HTMLTransformControllerChangeArgs) {
8
8
  const process = RemoteProcess.get(graphics.engine)
9
9
  if (process === null) return
10
10
 
@@ -1,4 +1,4 @@
1
- import { AnimationUnitInterpreter, Asset, Compilation, Descriptor, DeserializationObject, DivDescriptor, DynamicDescriptor, Engine, Graphics, HTMLDescriptor, HTMLServiceDescriptor, HTMLTransformControllerDescriptor, observer, PrefabeDescriptor, ServiceDescriptor, ServiceSchedulerDescriptor, StyleDescriptor, Unit, UpdateArgs } from '@vyr/engine'
1
+ import { AnimationUnitInterpreter, Asset, Compilation, Descriptor, DeserializationObject, DivDescriptor, DynamicDescriptor, Engine, Graphics, HTMLDescriptor, HTMLServiceDescriptor, HTMLTransformControllerDescriptor, observer, PrefabeDescriptor, ServiceDescriptor, ServiceSchedulerDescriptor, StyleDescriptor, Unit } from '@vyr/engine'
2
2
  import { cleanPickupObject, getAnimationUnit, createControllerStyle, pickupObject, getAnimationUnitByAsset, screenshot } from './utils'
3
3
  import { Collection } from './Collection'
4
4
  import { RemoteProcess } from './RemoteProcess'
@@ -347,7 +347,7 @@ class RemoteExecutor {
347
347
  }
348
348
  }
349
349
  }
350
- onUpdateScheduler(unit: Unit, args: UpdateArgs) {
350
+ onUpdateScheduler(unit: Unit) {
351
351
  const htmlTransform = Descriptor.get<Descriptor>(unit.uuid)
352
352
  const service = this.htmlTransformCollection.getByMap(htmlTransform)
353
353
  if (service !== null) {
@@ -402,14 +402,14 @@ class RemoteExecutor {
402
402
  }
403
403
 
404
404
  const doUpdate = Graphics.prototype.doUpdate
405
- Graphics.prototype.doUpdate = function (unit: Unit, args: UpdateArgs) {
405
+ Graphics.prototype.doUpdate = function (unit: Unit) {
406
406
  if (this.__VYR_REMOTE_WRAPPER === true) {
407
407
  //@ts-ignore
408
408
  window['__VYR_RUNTIME.DISABLED_INPUT'] = true
409
- executor.onUpdateScheduler(unit, args)
410
- doUpdate.call(this, unit, args)
409
+ executor.onUpdateScheduler(unit)
410
+ doUpdate.call(this, unit)
411
411
  } else {
412
- doUpdate.call(this, unit, args)
412
+ doUpdate.call(this, unit)
413
413
  }
414
414
  }
415
415
 
@@ -75,7 +75,7 @@ class RemoteProcess {
75
75
  this._executor = executor
76
76
  }
77
77
  getExecutor<T extends RemoteExecutor = RemoteExecutor>() {
78
- return this._executor as T
78
+ return (this._executor ?? null) as T
79
79
  }
80
80
  }
81
81