Skip to content

Commit

Permalink
refactor: Sceneify rebrand
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendonovich committed Jan 5, 2022
1 parent c5dfd20 commit 12576ea
Show file tree
Hide file tree
Showing 54 changed files with 145 additions and 169 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
publish:
name: 'Publish to NPM'
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.repository == 'brendonovich/simple-obs'
if: github.event_name == 'push' && github.repository == 'brendonovich/sceneify'
needs: [build, test]
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:

- name: Publish main to npm
if: github.ref == 'refs/heads/main'
run: pnpm publish -r ${TAG} --no-git-checks --filter "@simple-obs/*" --access public
run: pnpm publish -r ${TAG} --no-git-checks --filter "@sceneify/*" --access public
env:
TAG: ${{ (github.ref == 'refs/heads/main' && '--tag=main') || '' }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand All @@ -107,7 +107,7 @@ jobs:

- name: Publish release to npm
if: github.ref_type == 'tag'
run: pnpm publish -r ${TAG} --no-git-checks --filter "@simple-obs/*" --access public
run: pnpm publish -r ${TAG} --no-git-checks --filter "@sceneify/*" --access public
env:
TAG: ${{ (contains(github.ref_name, '-beta.') && '--tag=beta') || ''}}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
46 changes: 11 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,37 @@
<p align="center">
<img src="website/static/img/logo.png" alt="Simple OBS logo" height="150"/>
</p>

<h1 align="center">Simple OBS</h1>
<p align="center">The simplest way to control OBS from JavaScript</p>
<h1 align="center">Sceneify</h1>
<p align="center">The easiest way to control OBS from JavaScript</p>

<p align="center">
<a href="https://www.npmjs.com/package/@simple-obs/core">
<img src="https://img.shields.io/npm/dt/simple-obs?style=flat&colorA=000000&colorB=000000" alt="Downloads">
<a href="https://www.npmjs.com/package/@sceneify/core">
<img src="https://img.shields.io/npm/dt/sceneify?style=flat&colorA=000000&colorB=000000" alt="Downloads">
</a>
<a href="https://www.npmjs.com/package/@simple-obs/core">
<img src="https://img.shields.io/npm/v/@simple-obs/core?label=core&style=flat&colorA=000000&colorB=000000" alt="Core Version">
<a href="https://www.npmjs.com/package/@sceneify/core">
<img src="https://img.shields.io/npm/v/@sceneify/core?label=core&style=flat&colorA=000000&colorB=000000" alt="Core Version">
</a>
<a href="https://bundlephobia.com/result?p=@simple-obs/core">
<img src="https://img.shields.io/bundlephobia/min/@simple-obs/core?label=bundle%20size&style=flat&colorA=000000&colorB=000000" alt="Build Size">
<a href="https://bundlephobia.com/result?p=@sceneify/core">
<img src="https://img.shields.io/bundlephobia/min/@sceneify/core?label=bundle%20size&style=flat&colorA=000000&colorB=000000" alt="Build Size">
</a>
</p>

Translations: [Spanish](translations/README_es.md) | {Add your language translation}

Using `obs-websocket` can be difficult. Small manipulations of scenes and scene items are manageable, but keeping track of scenes, sources, settings, filters and more can quickly become a daunting task.

Simple OBS aims to fix this. By working with `Scene`, `Source`, and `SceneItem` objects, you can have unparalleled control over your OBS layouts.

If you're familiar with databases, it's like an ORM for OBS!
Sceneify aims to fix this. By working with `Scene`, `Source`, and `SceneItem` objects, you can have unparalleled control over your OBS layouts.

# Beta Warning

This library is not well tested and is still under heavy development. Feel free to use it, but make sure you make a backup of your scene collections before doing anything with Simple OBS.
This library is not well tested and is still under heavy development. Feel free to use it, but make sure you make a backup of your scene collections before doing anything with Sceneify.

## Features

- Persistence across code reloads, so scenes and items aren't deleted and recreated each time you run your code
- `Scene`, `Source` and `SceneItem` are designed to be overridden, allowing for complex layouts to be abstracted into subclasses
- Easy integration into existing layouts with `Scene.link()`, allowing for incremental migration to Simple OBS without handing over your entire layout to your code

## Installation

1. Install the [fork of `obs-websocket`](https://github.com/MemedowsTeam/obs-websocket/releases)

Simple OBS exposes some functionality (eg. `obs.clean()`, `Scene.remove()`) that requires installing a custom fork of `obs-websocket`. This fork simply adds support for removing scenes, retaining all other previous functionality. Simple OBS will support `obs-websocket` v5 when it is released, which has native support for removing scenes, and also v4 for backwards compatibility.

2. Install `@simple-obs/core`

```
yarn add @simple-obs/core
```

or npm

```
npm install @simple-obs/core
```

If using typescript, make sure you are at least using `[email protected]`, as `@simple-obs/core` uses some features of it to provide more accurate types for requests and events.
- Easy integration into existing layouts with `Scene.link()`, allowing for incremental migration to Sceneify without handing over your entire layout to your code.

3. Connect to OBS. See the [example](https://github.com/Brendonovich/simple-obs/blob/master/packages/core/example/index.ts) for more info.

## Acknowledgements

Expand Down
4 changes: 2 additions & 2 deletions examples/animation/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Alignment, ColorCorrectionFilter, ColorSource, OBS, Scene } from "@simple-obs/core";
import { Easing, keyframe, animate } from "@simple-obs/animation";
import { Alignment, ColorCorrectionFilter, ColorSource, OBS, Scene } from "@sceneify/core";
import { Easing, keyframe, animate } from "@sceneify/animation";

async function main() {
const obs = new OBS();
Expand Down
6 changes: 3 additions & 3 deletions examples/animation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"@types/node": "^16.9.3"
},
"dependencies": {
"@simple-obs/animation": "*",
"@simple-obs/core": "*",
"@simple-obs/sources": "*"
"@sceneify/animation": "*",
"@sceneify/core": "*",
"@sceneify/sources": "*"
}
}
6 changes: 3 additions & 3 deletions examples/basic/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Alignment, OBS, Scene } from "@simple-obs/core";
// import { ColorCorrectionFilter } from "@simple-obs/filters";
import { ColorSource } from "@simple-obs/sources";
import { Alignment, OBS, Scene } from "@sceneify/core";
// import { ColorCorrectionFilter } from "@sceneify/filters";
import { ColorSource } from "@sceneify/sources";

// README
// Running this code requies that you create a scene named "Linked Scene" with a single
Expand Down
6 changes: 3 additions & 3 deletions examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"ts-node": "^10.2.1"
},
"dependencies": {
"@simple-obs/core": "*",
"@simple-obs/filters": "*",
"@simple-obs/sources": "*"
"@sceneify/core": "*",
"@sceneify/filters": "*",
"@sceneify/sources": "*"
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "simple-obs-root",
"name": "sceneify-root",
"version": "1.0.0-beta.2",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/Brendonovich/simple-obs"
"url": "https://github.com/Brendonovich/sceneify"
},
"workspaces": {
"packages": [
Expand Down
4 changes: 2 additions & 2 deletions packages/animation/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@simple-obs/animation",
"name": "@sceneify/animation",
"version": "1.0.0-beta.0",
"description": "",
"main": "./lib/node/index.js",
Expand All @@ -10,7 +10,7 @@
"license": "ISC",
"dependencies": {
"@datastructures-js/queue": "^4.1.3",
"@simple-obs/core": "*"
"@sceneify/core": "*"
},
"devDependencies": {
"jest": "^27.4.5"
Expand Down
2 changes: 1 addition & 1 deletion packages/animation/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export * from "./easing";

import { Filter, Input, SceneItem, SceneItemTransform } from "@simple-obs/core";
import { Filter, Input, SceneItem, SceneItemTransform } from "@sceneify/core";
import { Queue } from "@datastructures-js/queue";

import { performance } from "./performance";
Expand Down
2 changes: 1 addition & 1 deletion packages/animation/tests/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Queue } from "@datastructures-js/queue";
import { CustomInputArgs, Input } from "@simple-obs/core";
import { CustomInputArgs, Input } from "@sceneify/core";

import { Keyframe, processTimeline, subjectKeyframes, Easing } from "../src";

Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@simple-obs/core",
"name": "@sceneify/core",
"version": "1.0.0-beta.0",
"description": "",
"main": "./cjs/index.cjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/OBS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class OBS {
}

/**
* Goes though each source in OBS and removes it if Simple OBS owns it,
* Goes though each source in OBS and removes it if Sceneify owns it,
* and there are no references to the source in code.
*/
async clean() {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/Scene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class Scene<
/**
* MAIN METHODS
*
* Methods that provide functionality specific to simple-obs.
* Methods that provide functionality specific to sceneify.
*/

/** */
Expand Down
4 changes: 2 additions & 2 deletions packages/filters/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@simple-obs/filters",
"name": "@sceneify/filters",
"version": "1.0.0-beta.0",
"description": "",
"main": "./cjs/index.cjs",
Expand All @@ -12,7 +12,7 @@
"test": "jest -i"
},
"dependencies": {
"@simple-obs/core": "*"
"@sceneify/core": "*"
},
"devDependencies": {
"jest": "^27.4.5"
Expand Down
2 changes: 1 addition & 1 deletion packages/filters/src/ApplyLUT.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomFilterArgs, Filter, Source } from "@simple-obs/core";
import { CustomFilterArgs, Filter, Source } from "@sceneify/core";

export type ApplyLUTFilterSettings = {
image_path: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/filters/src/AspectRatio.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomFilterArgs, Filter, Source } from "@simple-obs/core";
import { CustomFilterArgs, Filter, Source } from "@sceneify/core";

export type AspectRatioFilterSettings = {
resolution: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/filters/src/ChromaKey.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomFilterArgs, Filter, Source } from "@simple-obs/core";
import { CustomFilterArgs, Filter, Source } from "@sceneify/core";

export enum ChromaKeyColorType {
Green = "green",
Expand Down
2 changes: 1 addition & 1 deletion packages/filters/src/ColorCorrection.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomFilterArgs, Filter, Source } from "@simple-obs/core";
import { CustomFilterArgs, Filter, Source } from "@sceneify/core";

export type ColorCorrectionFilterSettings = {
brightness: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/filters/src/ColorKey.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomFilterArgs, Filter, Source } from "@simple-obs/core";
import { CustomFilterArgs, Filter, Source } from "@sceneify/core";

export enum ColorKeyColorType {
Green = "green",
Expand Down
2 changes: 1 addition & 1 deletion packages/filters/src/Compressor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomFilterArgs, Filter, Source } from "@simple-obs/core";
import { CustomFilterArgs, Filter, Source } from "@sceneify/core";

export type CompressorFilterSettings = {
ratio: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/filters/src/CropPad.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomFilterArgs, Filter, Source } from "@simple-obs/core";
import { CustomFilterArgs, Filter, Source } from "@sceneify/core";

export type CropPadFilterSettings = {
bottom: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/filters/src/Expander.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomFilterArgs, Filter, Source } from "@simple-obs/core";
import { CustomFilterArgs, Filter, Source } from "@sceneify/core";

export enum ExpanderDetectorType {
RMS = "RMS",
Expand Down
2 changes: 1 addition & 1 deletion packages/filters/src/Gain.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomFilterArgs, Filter, Source } from "@simple-obs/core";
import { CustomFilterArgs, Filter, Source } from "@sceneify/core";

export type GainFilterSettings = { db: number };

Expand Down
2 changes: 1 addition & 1 deletion packages/filters/src/ImageMaskBlend.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomFilterArgs, Filter, Source } from "@simple-obs/core";
import { CustomFilterArgs, Filter, Source } from "@sceneify/core";

export enum MaskBlendType {
AlphaMaskAlphaChannel = "mask_alpha_filter.effect",
Expand Down
2 changes: 1 addition & 1 deletion packages/filters/src/InvertPolarity.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomFilterArgs, Filter, Source } from "@simple-obs/core";
import { CustomFilterArgs, Filter, Source } from "@sceneify/core";

export class InvertPolarityFilter<TSource extends Source> extends Filter<
{},
Expand Down
2 changes: 1 addition & 1 deletion packages/filters/src/Limiter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomFilterArgs, Filter, Source } from "@simple-obs/core";
import { CustomFilterArgs, Filter, Source } from "@sceneify/core";

export type LimiterFilterSettings = {
threshold: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/filters/src/LumaKey.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomFilterArgs, Filter, Source } from "@simple-obs/core";
import { CustomFilterArgs, Filter, Source } from "@sceneify/core";

type LumaKeyFilterSettings = {
luma_max: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/filters/src/NoiseGate.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomFilterArgs, Filter, Source } from "@simple-obs/core";
import { CustomFilterArgs, Filter, Source } from "@sceneify/core";

export type NoiseGateFilterSettings = {
open_threshold: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/filters/src/NoiseSuppress.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomFilterArgs, Filter, Source } from "@simple-obs/core";
import { CustomFilterArgs, Filter, Source } from "@sceneify/core";

export enum NoiseSuppressMethod {
Speex = "speex",
Expand Down
2 changes: 1 addition & 1 deletion packages/filters/src/RenderDelay.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomFilterArgs, Filter, Source } from "@simple-obs/core";
import { CustomFilterArgs, Filter, Source } from "@sceneify/core";

export type RenderDelayFilterSettings = {
delay_ms: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/filters/src/Scroll.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomFilterArgs, Filter, Source } from "@simple-obs/core";
import { CustomFilterArgs, Filter, Source } from "@sceneify/core";

export type ScrollFilterSettings = {
limit_cx: boolean;
Expand Down
2 changes: 1 addition & 1 deletion packages/filters/src/Sharpen.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomFilterArgs, Filter, Source } from "@simple-obs/core";
import { CustomFilterArgs, Filter, Source } from "@sceneify/core";

export type SharpenFilterSettings = {
sharpness: number;
Expand Down
4 changes: 2 additions & 2 deletions packages/sources/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@simple-obs/sources",
"name": "@sceneify/sources",
"version": "1.0.0-beta.0",
"description": "",
"main": "./cjs/index.cjs",
Expand All @@ -12,7 +12,7 @@
"test": "jest -i"
},
"dependencies": {
"@simple-obs/core": "*"
"@sceneify/core": "*"
},
"devDependencies": {
"jest": "^27.4.5"
Expand Down
2 changes: 1 addition & 1 deletion packages/sources/src/Browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
SceneItem,
Scene,
CustomInputArgs,
} from "@simple-obs/core";
} from "@sceneify/core";

export type BrowserSourceSettings = {
url: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/sources/src/Color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
Input,
SourceFilters,
CustomInputArgs,
} from "@simple-obs/core";
} from "@sceneify/core";

export type ColorSourceSettings = {
color: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/sources/src/DisplayCapture.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Input, SourceFilters, CustomInputArgs } from "@simple-obs/core";
import { Input, SourceFilters, CustomInputArgs } from "@sceneify/core";

export type DisplayCaptureSourceSettings = {
monitor: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/sources/src/FreetypeText.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Input, SourceFilters, CustomInputArgs } from "@simple-obs/core";
import { Input, SourceFilters, CustomInputArgs } from "@sceneify/core";

export type FreetypeTextSourceSettings = {
text: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/sources/src/GDIPlusText.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Input, SourceFilters, CustomInputArgs } from "@simple-obs/core";
import { Input, SourceFilters, CustomInputArgs } from "@sceneify/core";

export type GDIPlusTextSourceSettings = {
text: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/sources/src/Image.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomInputArgs, Input, SourceFilters } from "@simple-obs/core";
import { CustomInputArgs, Input, SourceFilters } from "@sceneify/core";

export type ImageSourceSettings = {
file: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/sources/src/Media.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Input, SourceFilters, CustomInputArgs } from "@simple-obs/core";
import { Input, SourceFilters, CustomInputArgs } from "@sceneify/core";

export type MediaSourceSettings = {
local_file: string;
Expand Down
Loading

0 comments on commit 12576ea

Please sign in to comment.