Skip to content

Commit

Permalink
yarn build now runs successfully
Browse files Browse the repository at this point in the history
  • Loading branch information
lukejdav committed Apr 4, 2024
1 parent 8af3262 commit 406f8ac
Show file tree
Hide file tree
Showing 10 changed files with 279 additions and 163 deletions.
24 changes: 12 additions & 12 deletions packages/quick-tsr/input/mappings.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DeviceType, Mapping, MappingCasparCGType, SomeMappingCasparCG } from 'timeline-state-resolver'
import { DeviceType, Mapping, SomeMappingArtNet } from 'timeline-state-resolver'
import { literal } from 'timeline-state-resolver/dist/lib'
import type { TSRInput } from '../src'

Expand All @@ -8,11 +8,11 @@ export const input: TSRInput = {
device: DeviceType.ARTNET,
deviceId: 'universe0',
options: {
universe: 0,
universe: 0,
profileMappings: {
// Maps dimmer to channel 1:
"dimmer": 1,
}
"dimmer": 1,

Check failure on line 14 in packages/quick-tsr/input/mappings.ts

View workflow job for this annotation

GitHub Actions / Lint (quick-tsr)

Replace `"dimmer"` with `dimmer`
}

Check failure on line 15 in packages/quick-tsr/input/mappings.ts

View workflow job for this annotation

GitHub Actions / Lint (quick-tsr)

Insert `,`
},
}),
rgb0: literal<Mapping<SomeMappingArtNet>>({
Expand All @@ -22,8 +22,8 @@ export const input: TSRInput = {
universe: 0,
profileMappings: {
"dimmer": 6,
"RGB": [7,8,9],
}
"RGB": [7,8,9],
}
},
}),
rgb0_dimmer: literal<Mapping<SomeMappingArtNet>>({
Expand All @@ -33,18 +33,18 @@ export const input: TSRInput = {
universe: 0,
profileMappings: {
"dimmer": 6,
}
}
},
}),
dimmerGroup0: literal<Mapping<SomeMappingArtNet>>({
device: DeviceType.ARTNET,
deviceId: 'universe0',
options: {
universe: 0,
universe: 0,
profileMappings: {
// Maps dimmers to channel group:
"dimmers": [11, 12, 13, 14, 15, 16, 17, 18],
}
"dimmers": [11, 12, 13, 14, 15, 16, 17, 18],
}
},
}),

Expand All @@ -56,8 +56,8 @@ export const input: TSRInput = {
profileMappings: {
// "everything": ['1-50', '100-512'],
"everything": '1-512'
}
}
},
}),
},
Expand Down
124 changes: 60 additions & 64 deletions packages/quick-tsr/input/timeline.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import {
DeviceType,
TimelineContentTypeCasparCg,
TimelineContentCCGMedia,
// DeviceType,
// TimelineContentTypeCasparCg,
// TimelineContentCCGMedia,
TimelineContentArtNetAny,
TimelineContentArtNetValues,
TSRTimelineObj,
} from 'timeline-state-resolver'
import { TSRInput } from '../src'
Expand All @@ -10,15 +12,15 @@ import { literal } from 'timeline-state-resolver/dist/lib'
export const input: TSRInput = {
timeline: [

literal<TSRTimelineObj<TimelineContentArtNetValues>>({
literal<TSRTimelineObj<TimelineContentArtNetAny>>({
id: 'artnet0',
enable: {
start: Date.now(),
duration: 20 * 1000
},
layer: 'dimmer00',
content: {
values: {
values: {
dimmer: 255
}
}
Expand Down Expand Up @@ -102,66 +104,60 @@ export const input: TSRInput = {
everything: 255
}
}
})






}),

literal<TSRTimelineObj<TimelineContentCCGMedia>>({
id: 'video0',
enable: {
start: Date.now(),
duration: 20 * 1000,
},
layer: 'casparLayer0',
content: {
deviceType: DeviceType.CASPARCG,
type: TimelineContentTypeCasparCg.MEDIA,
file: 'amb.mp4',
mixer: {
rotation: 0,
// anchor: {
// x: 0.5,
// y: 0.5,
// },
fill: {
x: 0.5,
y: 0.5,
xScale: 0.7,
yScale: 1,
},
},
// literal<TSRTimelineObj<TimelineContentCCGMedia>>({
// id: 'video0',
// enable: {
// start: Date.now(),
// duration: 20 * 1000,
// },
// layer: 'casparLayer0',
// content: {
// deviceType: DeviceType.CASPARCG,
// type: TimelineContentTypeCasparCg.MEDIA,
// file: 'amb.mp4',
// mixer: {
// rotation: 0,
// // anchor: {
// // x: 0.5,
// // y: 0.5,
// // },
// fill: {
// x: 0.5,
// y: 0.5,
// xScale: 0.7,
// yScale: 1,
// },
// },

// $references: {
// 'mixer.fill.xScale': {
// // Local path to overwrite
// datastoreKey: 'scale', // Reference key in datastore
// overwrite: false,
// },
// 'mixer.fill.yScale': {
// // Local path to overwrite
// datastoreKey: 'scale', // Reference key in datastore
// overwrite: false,
// },
// },
},
keyframes: [
{
id: 'kf0',
enable: {
while: true,
// start: '#video0.start + 10',
},
content: {
mixer: {
rotation: 90
}
}
}
]
}),
// // $references: {
// // 'mixer.fill.xScale': {
// // // Local path to overwrite
// // datastoreKey: 'scale', // Reference key in datastore
// // overwrite: false,
// // },
// // 'mixer.fill.yScale': {
// // // Local path to overwrite
// // datastoreKey: 'scale', // Reference key in datastore
// // overwrite: false,
// // },
// // },
// },
// keyframes: [
// {
// id: 'kf0',
// enable: {
// while: true,
// // start: '#video0.start + 10',
// },
// content: {
// mixer: {
// rotation: 90
// }
// }
// }
// ]
// }),
],
}
5 changes: 5 additions & 0 deletions packages/timeline-state-resolver-types/src/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
TelemetricsOptions,
TriCasterOptions,
MultiOSCOptions,
ArtNetOptions,
} from '.'
import { DeviceCommonOptions } from './generated/common-options'

Expand Down Expand Up @@ -76,6 +77,7 @@ export type DeviceOptionsAny =
| DeviceOptionsTelemetrics
| DeviceOptionsTriCaster
| DeviceOptionsMultiOSC
| DeviceOptionsArtNet

export interface DeviceOptionsAbstract extends DeviceOptionsBase<AbstractOptions> {
type: DeviceType.ABSTRACT
Expand Down Expand Up @@ -143,3 +145,6 @@ export interface DeviceOptionsTriCaster extends DeviceOptionsBase<TriCasterOptio
export interface DeviceOptionsMultiOSC extends DeviceOptionsBase<MultiOSCOptions> {
type: DeviceType.MULTI_OSC
}
export interface DeviceOptionsArtNet extends DeviceOptionsBase<ArtNetOptions> {
type: DeviceType.ARTNET
}
17 changes: 14 additions & 3 deletions packages/timeline-state-resolver-types/src/generated/artnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@

export interface ArtNetOptions {
host: string
mode: Mode
fps: number
mode?: Mode
fps?: number
channelBehavious?: {
[k: string]: unknown
}
}

export enum Mode {
Expand All @@ -21,8 +24,16 @@ export interface MappingArtnetUniverse {
mappingType: MappingArtnetType.Universe
}

export interface MappingArtnetProfileMappings {
ID: string
channels: string
mappingType: MappingArtnetType.ProfileMappings
[k: string]: unknown
}

export enum MappingArtnetType {
Universe = 'universe',
ProfileMappings = 'profileMappings',
}

export type SomeMappingArtnet = MappingArtnetUniverse
export type SomeMappingArtnet = MappingArtnetUniverse | MappingArtnetProfileMappings
24 changes: 17 additions & 7 deletions packages/timeline-state-resolver-types/src/integrations/artnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,23 @@ export enum TimelineContentTypeArtNet {
export interface TimelineContentArtNet {
deviceType: DeviceType.ARTNET
type: TimelineContentTypeArtNet
channel: number
value: number
trasition?: {
duration: number,
type: ArtNetEasingType,
direction: 'In' | 'Out' | 'InOut' | 'None'
}
channel: number
value: number
trasition?: {
duration: number,

Check failure on line 27 in packages/timeline-state-resolver-types/src/integrations/artnet.ts

View workflow job for this annotation

GitHub Actions / Lint (timeline-state-resolver-types)

Delete `,`
type: ArtNetEasingType,

Check failure on line 28 in packages/timeline-state-resolver-types/src/integrations/artnet.ts

View workflow job for this annotation

GitHub Actions / Lint (timeline-state-resolver-types)

Delete `,`
direction: 'In' | 'Out' | 'InOut' | 'None'
}
}

export interface ArtNetDeviceCommand {
channel: number
value: number
}

export interface ArtNetCommandContent {
ID: string
values: number | Array<number>
}

export type TimelineContentArtNetAny = TimelineContentArtNet
Expand Down
3 changes: 3 additions & 0 deletions packages/timeline-state-resolver/src/conductor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
DeviceOptionsHyperdeck,
DeviceOptionsPanasonicPTZ,
DeviceOptionsLawo,
DeviceOptionsArtNet,
} from 'timeline-state-resolver-types'

import { DoOnTime } from './devices/doOnTime'
Expand Down Expand Up @@ -592,6 +593,7 @@ export class Conductor extends EventEmitter<ConductorEvents> {
threadedClassOptions
)
case DeviceType.ABSTRACT:
case DeviceType.ARTNET:
case DeviceType.ATEM:
case DeviceType.HTTPSEND:
case DeviceType.HTTPWATCHER:
Expand Down Expand Up @@ -1527,6 +1529,7 @@ export type DeviceOptionsAnyInternal =
| DeviceOptionsTelemetrics
| DeviceOptionsTriCasterInternal
| DeviceOptionsMultiOSC
| DeviceOptionsArtNet

function removeParentFromState(
o: Timeline.TimelineState<TSRTimelineContent>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
{
"$schema": "../../../$schemas/mapping-schema.json",
"default": "universe",
"default": "mappings",
"mappings": {
"universe": {
"type": "object",
"properties": {
"universe": {
"type": "integer",
"ui:title": "Universe",
"ui:description": "The artnet universe to output to (0-32767)",
"ui:summaryTitle": "Universe",
"default": 0,
"min": 0,
"max": 32767
}
"universe": {
"type": "integer",
"ui:title": "Universe",
"ui:description": "The artnet universe to output to (0-32767)",
"ui:summaryTitle": "Universe",
"default": 0,
"min": 0,
"max": 32767
}
},
"required": ["universe"],
"additionalProperties": false
},
"profileMappings": {
"type": "object",
"properties": {
"ID": {
"type": "string"
},
"channels": {
"type": "string"
}
},
"required": ["ID", "channels"],
"additionalProperties": true
}
}
}
Loading

0 comments on commit 406f8ac

Please sign in to comment.