diff --git a/plugins/common b/plugins/common index 30e32a64e..8e78c9173 160000 --- a/plugins/common +++ b/plugins/common @@ -1 +1 @@ -Subproject commit 30e32a64e4436c9fb250f94a890771bbd1dc2418 +Subproject commit 8e78c91737c13642d45dc52c77f1879d152f2d60 diff --git a/plugins/default/arcadePhysics2D/componentConfigs/ArcadeBody2DConfig.ts b/plugins/default/arcadePhysics2D/componentConfigs/ArcadeBody2DConfig.ts index b01f7daad..63594e0de 100644 --- a/plugins/default/arcadePhysics2D/componentConfigs/ArcadeBody2DConfig.ts +++ b/plugins/default/arcadePhysics2D/componentConfigs/ArcadeBody2DConfig.ts @@ -13,7 +13,7 @@ export interface ConfigPub { export default class ArcadeBody2DConfig extends SupCore.Data.Base.ComponentConfig { - static schema = { + static schema: SupCore.Data.Schema = { type: { type: "enum", items: ["box", "tileMap"], mutable: true }, // Box diff --git a/plugins/default/cubicModel/componentConfigs/CubicModelRendererConfig.ts b/plugins/default/cubicModel/componentConfigs/CubicModelRendererConfig.ts index e4a2eb5fb..2f12bb951 100644 --- a/plugins/default/cubicModel/componentConfigs/CubicModelRendererConfig.ts +++ b/plugins/default/cubicModel/componentConfigs/CubicModelRendererConfig.ts @@ -9,7 +9,7 @@ export interface CubicModelRendererConfigPub { export default class CubicModelRendererConfig extends SupCore.Data.Base.ComponentConfig { - static schema = { + static schema: SupCore.Data.Schema = { cubicModelAssetId: { type: "string?", min: 0, mutable: true }, // animationId: { type: "string?", min: 0, mutable: true }, // horizontalFlip: { type: "boolean", mutable: true }, diff --git a/plugins/default/cubicModel/data/CubicModelAsset.ts b/plugins/default/cubicModel/data/CubicModelAsset.ts index 41fb5e8f3..10033bdcd 100644 --- a/plugins/default/cubicModel/data/CubicModelAsset.ts +++ b/plugins/default/cubicModel/data/CubicModelAsset.ts @@ -37,7 +37,7 @@ export interface TextureEdit { export default class CubicModelAsset extends SupCore.Data.Base.Asset { - static schema: SupCore.Data.Base.Schema = { + static schema: SupCore.Data.Schema = { pixelsPerUnit: { type: "integer", min: 1, mutable: true }, nodes: { type: "array" }, diff --git a/plugins/default/cubicModel/data/CubicModelNodes.ts b/plugins/default/cubicModel/data/CubicModelNodes.ts index 60e16ad44..b3d3a5e2e 100644 --- a/plugins/default/cubicModel/data/CubicModelNodes.ts +++ b/plugins/default/cubicModel/data/CubicModelNodes.ts @@ -68,7 +68,7 @@ export function getShapeTextureFaceSize(shape: Shape, faceName: string) { export default class CubicModelNodes extends SupCore.Data.Base.TreeById { - static schema = { + static schema: SupCore.Data.Schema = { name: { type: "string", minLength: 1, maxLength: 80, mutable: true }, children: { type: "array" }, diff --git a/plugins/default/cubicModel/data/CubicModelSettingsResource.ts b/plugins/default/cubicModel/data/CubicModelSettingsResource.ts index ffc7560de..1efc455fd 100644 --- a/plugins/default/cubicModel/data/CubicModelSettingsResource.ts +++ b/plugins/default/cubicModel/data/CubicModelSettingsResource.ts @@ -1,6 +1,6 @@ export default class CubicModelSettingsResource extends SupCore.Data.Base.Resource { - static schema: SupCore.Data.Base.Schema = { + static schema: SupCore.Data.Schema = { pixelsPerUnit: { type: "integer", min: 1, mutable: true } }; diff --git a/plugins/default/font/componentConfigs/TextRendererConfig.ts b/plugins/default/font/componentConfigs/TextRendererConfig.ts index b4e183b7c..33779b751 100644 --- a/plugins/default/font/componentConfigs/TextRendererConfig.ts +++ b/plugins/default/font/componentConfigs/TextRendererConfig.ts @@ -1,6 +1,6 @@ export default class TextRendererConfig extends SupCore.Data.Base.ComponentConfig { - static schema = { + static schema: SupCore.Data.Schema = { fontAssetId: { type: "string?", min: 0, mutable: true }, text: { type: "string", min: 0, mutable: true }, alignment: { type: "enum", items: [ "left", "center", "right" ], mutable: true }, diff --git a/plugins/default/font/data/FontAsset.ts b/plugins/default/font/data/FontAsset.ts index 164bf064e..844aede3a 100644 --- a/plugins/default/font/data/FontAsset.ts +++ b/plugins/default/font/data/FontAsset.ts @@ -18,7 +18,7 @@ export interface FontPub { export default class FontAsset extends SupCore.Data.Base.Asset { static currentFormatVersion = 1; - static schema: SupCore.Data.Base.Schema = { + static schema: SupCore.Data.Schema = { formatVersion: { type: "integer" }, isBitmap: { type: "boolean", mutable: true}, diff --git a/plugins/default/gameSettings/data/GameSettingsResource.ts b/plugins/default/gameSettings/data/GameSettingsResource.ts index b4b4991f4..c7fafbfbb 100644 --- a/plugins/default/gameSettings/data/GameSettingsResource.ts +++ b/plugins/default/gameSettings/data/GameSettingsResource.ts @@ -12,7 +12,7 @@ export interface GameSettingsResourcePub { export default class GameSettingsResource extends SupCore.Data.Base.Resource { static currentFormatVersion = 1; - static schema: SupCore.Data.Base.Schema = { + static schema: SupCore.Data.Schema = { formatVersion: { type: "integer" }, startupSceneId: { type: "string?", mutable: true }, diff --git a/plugins/default/light/componentConfigs/LightConfig.ts b/plugins/default/light/componentConfigs/LightConfig.ts index db5ddb0a8..69f3da919 100644 --- a/plugins/default/light/componentConfigs/LightConfig.ts +++ b/plugins/default/light/componentConfigs/LightConfig.ts @@ -16,7 +16,7 @@ export interface LightConfigPub { export default class LightConfig extends SupCore.Data.Base.ComponentConfig { - static schema = { + static schema: SupCore.Data.Schema = { type: { type: "enum", items: ["ambient", "point", "spot", "directional"], mutable: true }, color: { type: "string", length: 6, mutable: true }, intensity: { type: "number", min: 0, mutable: true }, diff --git a/plugins/default/light/data/LightSettingsResource.ts b/plugins/default/light/data/LightSettingsResource.ts index 52e5f6720..67940948d 100644 --- a/plugins/default/light/data/LightSettingsResource.ts +++ b/plugins/default/light/data/LightSettingsResource.ts @@ -3,7 +3,7 @@ import * as fs from "fs"; export default class LightSettingsResource extends SupCore.Data.Base.Resource { - static schema: SupCore.Data.Base.Schema = { + static schema: SupCore.Data.Schema = { shadowMapType: { type: "enum", items: [ "basic", "pcf", "pcfSoft" ], mutable: true }, } diff --git a/plugins/default/model/componentConfigs/ModelRendererConfig.ts b/plugins/default/model/componentConfigs/ModelRendererConfig.ts index d4ae6d2b3..e1d2f0772 100644 --- a/plugins/default/model/componentConfigs/ModelRendererConfig.ts +++ b/plugins/default/model/componentConfigs/ModelRendererConfig.ts @@ -8,7 +8,7 @@ export interface ModelRendererConfigPub { export default class ModelRendererConfig extends SupCore.Data.Base.ComponentConfig { - static schema = { + static schema: SupCore.Data.Schema = { modelAssetId: { type: "string?", min: 0, mutable: true }, animationId: { type: "string?", min: 0, mutable: true }, castShadow: { type: "boolean", mutable: true }, diff --git a/plugins/default/model/data/ModelAnimations.ts b/plugins/default/model/data/ModelAnimations.ts index de2d252b6..df541a698 100644 --- a/plugins/default/model/data/ModelAnimations.ts +++ b/plugins/default/model/data/ModelAnimations.ts @@ -1,6 +1,6 @@ export default class ModelAnimations extends SupCore.Data.Base.ListById { - static schema = { + static schema: SupCore.Data.Schema = { name: { type: "string", minLength: 1, maxLength: 80, mutable: true }, duration: { type: "number" }, // seconds keyFrames: { diff --git a/plugins/default/model/data/ModelAsset.ts b/plugins/default/model/data/ModelAsset.ts index bceb7137f..43189c5e7 100644 --- a/plugins/default/model/data/ModelAsset.ts +++ b/plugins/default/model/data/ModelAsset.ts @@ -39,7 +39,7 @@ export interface ModelAssetPub { export default class ModelAsset extends SupCore.Data.Base.Asset { static currentFormatVersion = 2; - static schema: SupCore.Data.Base.Schema = { + static schema: SupCore.Data.Schema = { formatVersion: { type: "integer" }, unitRatio: { type: "number", minExcluded: 0, mutable: true }, @@ -583,10 +583,10 @@ export default class ModelAsset extends SupCore.Data.Base.Asset { } server_setAnimation(client: any, id: string, duration: number, keyFrames: any, callback: (err: string, id?: string, duration?: number, keyFrames?: any) => any) { - let violation = SupCore.Data.Base.getRuleViolation(duration, ModelAnimations.schema.duration, true); + let violation = SupCore.Data.Base.getRuleViolation(duration, ModelAnimations.schema["duration"], true); if (violation != null) { callback(`Invalid duration: ${SupCore.Data.Base.formatRuleViolation(violation)}`); return; } - violation = SupCore.Data.Base.getRuleViolation(keyFrames, ModelAnimations.schema.keyFrames, true); + violation = SupCore.Data.Base.getRuleViolation(keyFrames, ModelAnimations.schema["keyFrames"], true); if (violation != null) { callback(`Invalid duration: ${SupCore.Data.Base.formatRuleViolation(violation)}`); return; } let animation = this.animations.byId[id]; diff --git a/plugins/default/scene/ComponentConfig.d.ts b/plugins/default/scene/ComponentConfig.d.ts index 2d94d93fc..e39d0c2f7 100644 --- a/plugins/default/scene/ComponentConfig.d.ts +++ b/plugins/default/scene/ComponentConfig.d.ts @@ -4,7 +4,7 @@ declare namespace SupCore { namespace Base { class ComponentConfig extends Hash { - constructor(pub: any, schema: any); + constructor(pub: any, schema: SupCore.Data.Schema); // OVERRIDE: Called when loading a scene // Check for any error/warning/info and this.emit("setBadge", ...) as required diff --git a/plugins/default/scene/componentConfigs/BaseComponentConfig.ts b/plugins/default/scene/componentConfigs/BaseComponentConfig.ts index 9aaf17a82..2d239fc2d 100644 --- a/plugins/default/scene/componentConfigs/BaseComponentConfig.ts +++ b/plugins/default/scene/componentConfigs/BaseComponentConfig.ts @@ -1,5 +1,5 @@ class ComponentConfig extends SupCore.Data.Base.Hash { - constructor(pub: any, schema: any) { + constructor(pub: any, schema: SupCore.Data.Schema) { super(pub, schema); } diff --git a/plugins/default/scene/componentConfigs/CameraConfig.ts b/plugins/default/scene/componentConfigs/CameraConfig.ts index 9e666def5..f2f299d42 100644 --- a/plugins/default/scene/componentConfigs/CameraConfig.ts +++ b/plugins/default/scene/componentConfigs/CameraConfig.ts @@ -1,6 +1,6 @@ export default class CameraConfig extends SupCore.Data.Base.ComponentConfig { - static schema = { + static schema: SupCore.Data.Schema = { mode: { type: "enum", items: [ "perspective", "orthographic" ], mutable: true }, fov: { type: "number", min: 0.1, max: 179.9, mutable: true }, orthographicScale: { type: "number", min: 0.1, mutable: true }, diff --git a/plugins/default/scene/data/SceneAsset.ts b/plugins/default/scene/data/SceneAsset.ts index 15ba20563..d8d50a0b4 100644 --- a/plugins/default/scene/data/SceneAsset.ts +++ b/plugins/default/scene/data/SceneAsset.ts @@ -31,7 +31,7 @@ interface ScenePub { export default class SceneAsset extends SupCore.Data.Base.Asset { static currentFormatVersion = 1; - static schema: SupCore.Data.Base.Schema = { + static schema: SupCore.Data.Schema = { nodes: { type: "array" }, }; diff --git a/plugins/default/scene/data/SceneComponents.ts b/plugins/default/scene/data/SceneComponents.ts index b8e1ffb85..8ace9668d 100644 --- a/plugins/default/scene/data/SceneComponents.ts +++ b/plugins/default/scene/data/SceneComponents.ts @@ -8,7 +8,7 @@ export interface Component { export default class SceneComponents extends SupCore.Data.Base.ListById { - static schema = { + static schema: SupCore.Data.Schema = { type: { type: "string" }, config: { type: "any" }, }; diff --git a/plugins/default/scene/data/SceneNodes.ts b/plugins/default/scene/data/SceneNodes.ts index 89f738d32..f5c935400 100644 --- a/plugins/default/scene/data/SceneNodes.ts +++ b/plugins/default/scene/data/SceneNodes.ts @@ -17,7 +17,7 @@ export interface Node extends SupCore.Data.Base.TreeNode { export default class SceneNodes extends SupCore.Data.Base.TreeById { - static schema = { + static schema: SupCore.Data.Schema = { name: { type: "string", minLength: 1, maxLength: 80, mutable: true }, children: { type: "array" }, diff --git a/plugins/default/scene/data/SceneSettingsResource.ts b/plugins/default/scene/data/SceneSettingsResource.ts index cfc4834e1..790509e1d 100644 --- a/plugins/default/scene/data/SceneSettingsResource.ts +++ b/plugins/default/scene/data/SceneSettingsResource.ts @@ -9,7 +9,7 @@ interface SceneSettingsResourcePub { export default class SceneSettingsResource extends SupCore.Data.Base.Resource { static currentFormatVersion = 1; - static schema: SupCore.Data.Base.Schema = { + static schema: SupCore.Data.Schema = { formatVersion: { type: "integer" }, defaultCameraMode: { type: "enum", items: [ "3D", "2D" ], mutable: true }, diff --git a/plugins/default/shader/data/Attributes.ts b/plugins/default/shader/data/Attributes.ts index 3fa4778f6..5b0643bda 100644 --- a/plugins/default/shader/data/Attributes.ts +++ b/plugins/default/shader/data/Attributes.ts @@ -5,14 +5,13 @@ export interface AttributePub { } export default class Attributes extends SupCore.Data.Base.ListById { - - static schema = { + static schema: SupCore.Data.Schema = { name: { type: "string", minLength: 1, maxLength: 80, mutable: true }, type: { type: "enum", items: ["f", "c", "v2", "v3", "v4"], mutable: true } }; pub: AttributePub[]; - byId: { [id: string]: AttributePub}; + byId: { [id: string]: AttributePub }; constructor(pub: any) { super(pub, Attributes.schema); diff --git a/plugins/default/shader/data/ShaderAsset.ts b/plugins/default/shader/data/ShaderAsset.ts index 790bcabaa..9bea8220d 100644 --- a/plugins/default/shader/data/ShaderAsset.ts +++ b/plugins/default/shader/data/ShaderAsset.ts @@ -27,7 +27,7 @@ export interface ShaderAssetPub { export default class ShaderAsset extends SupCore.Data.Base.Asset { static currentFormatVersion = 1; - static schema: SupCore.Data.Base.Schema = { + static schema: SupCore.Data.Schema = { formatVersion: { type: "integer" }, uniforms: { type: "array" }, diff --git a/plugins/default/shader/data/Uniforms.ts b/plugins/default/shader/data/Uniforms.ts index 4a577671c..f8a9acc79 100644 --- a/plugins/default/shader/data/Uniforms.ts +++ b/plugins/default/shader/data/Uniforms.ts @@ -6,15 +6,14 @@ export interface UniformPub { } export default class Uniforms extends SupCore.Data.Base.ListById { - - static schema = { + static schema: SupCore.Data.Schema = { name: { type: "string", minLength: 1, maxLength: 80, mutable: true }, type: { type: "enum", items: ["f", "c", "v2", "v3", "v4", "t"], mutable: true }, value: { type: "any", mutable: true } }; pub: UniformPub[]; - byId: { [id: string]: UniformPub}; + byId: { [id: string]: UniformPub }; constructor(pub: any) { super(pub, Uniforms.schema); diff --git a/plugins/default/shader/editors/shader/ui.ts b/plugins/default/shader/editors/shader/ui.ts index bcc0c3ceb..c19653a01 100644 --- a/plugins/default/shader/editors/shader/ui.ts +++ b/plugins/default/shader/editors/shader/ui.ts @@ -45,7 +45,7 @@ export function setupUniform(uniform: UniformPub) { let typeElt = document.createElement("td"); let selectTypeElt = document.createElement("select"); - for (let type of Uniforms.schema.type.items) { + for (let type of Uniforms.schema["type"].items as string[]) { let optionElt = document.createElement("option"); optionElt.textContent = type; selectTypeElt.appendChild(optionElt); @@ -151,7 +151,7 @@ export function setupAttribute(attribute: AttributePub) { let typeElt = document.createElement("td"); let selectTypeElt = document.createElement("select"); - for (let type of Attributes.schema.type.items) { + for (let type of Attributes.schema["type"].items as string[]) { let optionElt = document.createElement("option"); optionElt.textContent = type; selectTypeElt.appendChild(optionElt); diff --git a/plugins/default/sound/data/SoundAsset.ts b/plugins/default/sound/data/SoundAsset.ts index 4a3440cc2..0504c937d 100644 --- a/plugins/default/sound/data/SoundAsset.ts +++ b/plugins/default/sound/data/SoundAsset.ts @@ -10,7 +10,7 @@ interface SoundAssetPub { export default class SoundAsset extends SupCore.Data.Base.Asset { static currentFormatVersion = 1; - static schema: SupCore.Data.Base.Schema = { + static schema: SupCore.Data.Schema = { formatVersion: { type: "integer" }, sound: { type: "buffer" }, diff --git a/plugins/default/sprite/componentConfigs/SpriteRendererConfig.ts b/plugins/default/sprite/componentConfigs/SpriteRendererConfig.ts index 27ed9e783..5a91925ce 100644 --- a/plugins/default/sprite/componentConfigs/SpriteRendererConfig.ts +++ b/plugins/default/sprite/componentConfigs/SpriteRendererConfig.ts @@ -9,7 +9,7 @@ export interface SpriteRendererConfigPub { export default class SpriteRendererConfig extends SupCore.Data.Base.ComponentConfig { - static schema = { + static schema: SupCore.Data.Schema = { spriteAssetId: { type: "string?", min: 0, mutable: true }, animationId: { type: "string?", min: 0, mutable: true }, horizontalFlip: { type: "boolean", mutable: true }, diff --git a/plugins/default/sprite/data/SpriteAnimations.ts b/plugins/default/sprite/data/SpriteAnimations.ts index f386786fe..8c83bfa9d 100644 --- a/plugins/default/sprite/data/SpriteAnimations.ts +++ b/plugins/default/sprite/data/SpriteAnimations.ts @@ -8,7 +8,7 @@ export interface SpriteAnimationPub { export default class SpriteAnimations extends SupCore.Data.Base.ListById { - static schema = { + static schema: SupCore.Data.Schema = { name: { type: "string", minLength: 1, maxLength: 80, mutable: true }, startFrameIndex: { type: "number", min: 0, mutable: true }, endFrameIndex: { type: "number", min: 0, mutable: true }, diff --git a/plugins/default/sprite/data/SpriteAsset.ts b/plugins/default/sprite/data/SpriteAsset.ts index 3e719328e..ac19ab744 100644 --- a/plugins/default/sprite/data/SpriteAsset.ts +++ b/plugins/default/sprite/data/SpriteAsset.ts @@ -42,7 +42,7 @@ export interface SpriteAssetPub { export default class SpriteAsset extends SupCore.Data.Base.Asset { static currentFormatVersion = 3; - static schema: SupCore.Data.Base.Schema = { + static schema: SupCore.Data.Schema = { formatVersion: { type: "integer" }, maps: { diff --git a/plugins/default/sprite/data/SpriteSettingsResource.ts b/plugins/default/sprite/data/SpriteSettingsResource.ts index 40f462feb..c12234160 100644 --- a/plugins/default/sprite/data/SpriteSettingsResource.ts +++ b/plugins/default/sprite/data/SpriteSettingsResource.ts @@ -1,6 +1,6 @@ export default class SpriteSettingsResource extends SupCore.Data.Base.Resource { - static schema: SupCore.Data.Base.Schema = { + static schema: SupCore.Data.Schema = { filtering: { type: "enum", items: [ "pixelated", "smooth" ], mutable: true }, pixelsPerUnit: { type: "number", minExcluded: 0, mutable: true }, framesPerSecond: { type: "number", minExcluded: 0, mutable: true }, diff --git a/plugins/default/tileMap/componentConfigs/TileMapRendererConfig.ts b/plugins/default/tileMap/componentConfigs/TileMapRendererConfig.ts index a240abdb5..4f37bafe5 100644 --- a/plugins/default/tileMap/componentConfigs/TileMapRendererConfig.ts +++ b/plugins/default/tileMap/componentConfigs/TileMapRendererConfig.ts @@ -6,7 +6,7 @@ interface TileMapRendererConfigPub { export default class TileMapRendererConfig extends SupCore.Data.Base.ComponentConfig { - static schema = { + static schema: SupCore.Data.Schema = { tileMapAssetId: { type: "string?", min: 0, mutable: true }, tileSetAssetId: { type: "string?", min: 0, mutable: true }, castShadow: { type: "boolean", mutable: true }, diff --git a/plugins/default/tileMap/data/TileMapAsset.ts b/plugins/default/tileMap/data/TileMapAsset.ts index ef8dcffe4..260cf629a 100644 --- a/plugins/default/tileMap/data/TileMapAsset.ts +++ b/plugins/default/tileMap/data/TileMapAsset.ts @@ -18,7 +18,7 @@ export interface TileMapAssetPub { export default class TileMapAsset extends SupCore.Data.Base.Asset { static currentFormatVersion = 1; - static schema: SupCore.Data.Base.Schema = { + static schema: SupCore.Data.Schema = { formatVersion: { type: "integer" }, tileSetId: { type: "string?" }, diff --git a/plugins/default/tileMap/data/TileMapLayers.ts b/plugins/default/tileMap/data/TileMapLayers.ts index 7099146d2..39f48d1df 100644 --- a/plugins/default/tileMap/data/TileMapLayers.ts +++ b/plugins/default/tileMap/data/TileMapLayers.ts @@ -6,7 +6,7 @@ export interface TileMapLayerPub { export default class TileMapLayers extends SupCore.Data.Base.ListById { - static schema = { + static schema: SupCore.Data.Schema = { name: { type: "string", minLength: 1, maxLength: 80, mutable: true }, data: { type: "array" } }; diff --git a/plugins/default/tileMap/data/TileMapSettingsResource.ts b/plugins/default/tileMap/data/TileMapSettingsResource.ts index 152d2f021..98fc48e33 100644 --- a/plugins/default/tileMap/data/TileMapSettingsResource.ts +++ b/plugins/default/tileMap/data/TileMapSettingsResource.ts @@ -15,7 +15,7 @@ interface TileMapSettingsResourcePub { export default class TileMapSettingsResource extends SupCore.Data.Base.Resource { static currentFormatVersion = 1; - static schema: SupCore.Data.Base.Schema = { + static schema: SupCore.Data.Schema = { formatVersion: { type: "integer" }, pixelsPerUnit: { type: "integer", minExcluded: 0, mutable: true }, diff --git a/plugins/default/tileMap/data/TileSetAsset.ts b/plugins/default/tileMap/data/TileSetAsset.ts index e5bf79d3d..72e693241 100644 --- a/plugins/default/tileMap/data/TileSetAsset.ts +++ b/plugins/default/tileMap/data/TileSetAsset.ts @@ -18,7 +18,7 @@ export interface TileSetAssetPub { export default class TileSetAsset extends SupCore.Data.Base.Asset { static currentFormatVersion = 1; - static schema: SupCore.Data.Base.Schema = { + static schema: SupCore.Data.Schema = { formatVersion: { type: "integer" }, image: { type: "buffer" }, diff --git a/plugins/default/typescript/componentConfigs/BehaviorConfig.ts b/plugins/default/typescript/componentConfigs/BehaviorConfig.ts index 467fb2e64..98851fc43 100644 --- a/plugins/default/typescript/componentConfigs/BehaviorConfig.ts +++ b/plugins/default/typescript/componentConfigs/BehaviorConfig.ts @@ -5,7 +5,7 @@ interface Pub { export default class BehaviorConfig extends SupCore.Data.Base.ComponentConfig { - static schema = { + static schema: SupCore.Data.Schema = { behaviorName: { type: "string", mutable: true }, propertyValues: { type: "hash", diff --git a/plugins/default/typescript/data/BehaviorPropertiesResource.ts b/plugins/default/typescript/data/BehaviorPropertiesResource.ts index 6312e0fcf..5f7b6218f 100644 --- a/plugins/default/typescript/data/BehaviorPropertiesResource.ts +++ b/plugins/default/typescript/data/BehaviorPropertiesResource.ts @@ -16,7 +16,7 @@ export interface BehaviorPropertiesResourcePub { export default class BehaviorPropertiesResource extends SupCore.Data.Base.Resource { - static schema: SupCore.Data.Base.Schema = { + static schema: SupCore.Data.Schema = { behaviors: { type: "hash", keys: { minLength: 1 }, diff --git a/plugins/default/typescript/data/ScriptAsset.ts b/plugins/default/typescript/data/ScriptAsset.ts index 7b20f7d66..4c14ab15d 100644 --- a/plugins/default/typescript/data/ScriptAsset.ts +++ b/plugins/default/typescript/data/ScriptAsset.ts @@ -56,7 +56,7 @@ interface ScriptAssetPub { } export default class ScriptAsset extends SupCore.Data.Base.Asset { - static schema: SupCore.Data.Base.Schema = { + static schema: SupCore.Data.Schema = { text: { type: "string" }, draft: { type: "string" }, revisionId: { type: "integer" } diff --git a/plugins/extra/cannonjs/componentConfigs/CannonBodyConfig.ts b/plugins/extra/cannonjs/componentConfigs/CannonBodyConfig.ts index 01d6f21d2..5d09717bf 100644 --- a/plugins/extra/cannonjs/componentConfigs/CannonBodyConfig.ts +++ b/plugins/extra/cannonjs/componentConfigs/CannonBodyConfig.ts @@ -1,5 +1,5 @@ export default class CannonBodyConfig extends SupCore.Data.Base.ComponentConfig { - static schema = { + static schema: SupCore.Data.Schema = { mass: { type: "number", min: 0, mutable: true }, fixedRotation: { type: "boolean", mutable: true }, offset: { diff --git a/plugins/extra/p2js/componentConfigs/P2BodyConfig.ts b/plugins/extra/p2js/componentConfigs/P2BodyConfig.ts index baf822cde..5674314a3 100644 --- a/plugins/extra/p2js/componentConfigs/P2BodyConfig.ts +++ b/plugins/extra/p2js/componentConfigs/P2BodyConfig.ts @@ -1,5 +1,5 @@ export default class P2BodyConfig extends SupCore.Data.Base.ComponentConfig { - static schema = { + static schema: SupCore.Data.Schema = { mass: { type: "number", min: 0, mutable: true }, fixedRotation: { type: "boolean", mutable: true }, offsetX: { type: "number", mutable: true },