Skip to content

Commit

Permalink
sdk7 - video images and models working
Browse files Browse the repository at this point in the history
  • Loading branch information
MetaverseUnknower committed Nov 25, 2023
1 parent 2622b6f commit 678807e
Show file tree
Hide file tree
Showing 95 changed files with 6,145 additions and 5,391 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
on:
push:
branches:
- sdk6
- sdk7
pull_request:
release:
Expand All @@ -26,10 +25,6 @@ jobs:
- name: build
run: npm run build

- name: Set custom-tag for sdk6
if: github.ref == 'refs/heads/sdk6'
run: echo "CUSTOM_TAG=sdk6" >> $GITHUB_ENV

- name: Set custom-tag for sdk7
if: github.ref == 'refs/heads/sdk7'
run: echo "CUSTOM_TAG=sdk7" >> $GITHUB_ENV
Expand Down
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"semi": false,
"printWidth": 150
}
90 changes: 90 additions & 0 deletions components/VLMBase.component.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/// <reference types="@dcl/js-runtime" />
import { Entity } from "@dcl/sdk/ecs";
import { Vector3 } from "~system/EngineApi";
import { VLMClickEvent } from "./VLMClickEvent.component";
import { MaterialService } from "../services/Material.service";
import { MeshService } from "../services/Mesh.service";
import { VideoService } from "../services/Video.service";
import { TransformService } from "../services/Transform.service";
import { AudioService } from "../services/Audio.service";
export declare namespace VLMBase {
class Config {
sk: string;
enabled: boolean;
parent: string;
customId?: string;
customRendering?: boolean;
name: string;
clickEvent?: VLMClickEvent.Config;
instanceIds: string[];
services: {
material?: MaterialService;
model?: MeshService;
video?: VideoService;
transform?: TransformService;
audio?: AudioService;
};
constructor(config: Config & {
instances: Instance[];
});
}
type VLMConfig = Config & {
instances: Instance[];
};
const ConfigSpec: {
id: import("@dcl/sdk/ecs").ISchema<number>;
sk: import("@dcl/sdk/ecs").ISchema<string>;
enabled: import("@dcl/sdk/ecs").ISchema<boolean>;
parent: import("@dcl/sdk/ecs").ISchema<string>;
customId: import("@dcl/sdk/ecs").ISchema<string>;
customRendering: import("@dcl/sdk/ecs").ISchema<boolean>;
name: import("@dcl/sdk/ecs").ISchema<string>;
};
class Instance {
entity: Entity;
sk: string;
configId: string;
enabled: boolean;
parent: string;
customId?: string;
customRendering?: boolean;
name: string;
defaultClickEvent?: VLMClickEvent.Config;
clickEvent?: VLMClickEvent.Config;
position: Vector3;
scale: Vector3;
rotation: Vector3;
constructor(config: Config, instance: Instance);
}
const InstanceSpec: {
entity: import("@dcl/sdk/ecs").ISchema<Entity>;
sk: import("@dcl/sdk/ecs").ISchema<string>;
enabled: import("@dcl/sdk/ecs").ISchema<boolean>;
parent: import("@dcl/sdk/ecs").ISchema<string>;
customId: import("@dcl/sdk/ecs").ISchema<string>;
customRendering: import("@dcl/sdk/ecs").ISchema<boolean>;
name: import("@dcl/sdk/ecs").ISchema<string>;
position: import("@dcl/sdk/ecs").ISchema<import("@dcl/sdk/ecs").Vector3Type>;
rotation: import("@dcl/sdk/ecs").ISchema<import("@dcl/sdk/ecs").Vector3Type>;
scale: import("@dcl/sdk/ecs").ISchema<import("@dcl/sdk/ecs").Vector3Type>;
};
type VLMTextureConfig = {
textureSrc?: string;
bumpSrc?: string;
emissiveSrc?: string;
alphaSrc?: string;
emission?: number;
};
type VLMAudibleConfig = {
enabled: boolean;
sourceType: AudioSourceType;
volume: number;
audioSrc: string;
};
enum AudioSourceType {
CLIP = 0,
LOOP = 1,
PLAYLIST = 2,
STREAM = 3
}
}
102 changes: 102 additions & 0 deletions components/VLMClaimPoint.component.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
import { VLMNotification } from "./VLMNotification.component";
import { VLMBase } from "./VLMBase.component";
export declare namespace VLMClaimPoint {
const configs: {
[uuid: string]: VLMClaimPoint.Config;
};
const instances: {
[uuid: string]: VLMClaimPoint.Instance;
};
class Config extends VLMBase.Config {
sk: string;
instanceIds: string[];
messageOptions?: VLMNotification.MessageOptions;
requestInProgress: boolean;
constructor(config: VLMConfig);
addAll: CallableFunction;
remove: CallableFunction;
delete: CallableFunction;
createOrReplaceInstance: CallableFunction;
removeInstance: CallableFunction;
deleteInstance: CallableFunction;
}
type VLMConfig = Config & VLMBase.VLMTextureConfig & {
instances: Instance[];
};
class Instance extends VLMBase.Instance {
constructor(config: Config, instance: Instance);
init: CallableFunction;
add: CallableFunction;
remove: CallableFunction;
delete: CallableFunction;
}
interface ClaimResponse {
sk: string;
giveawayId?: string;
responseType?: ClaimResponseType;
reason?: ClaimRejection;
}
enum ClaimRejection {
PAUSED = 0,
BEFORE_EVENT_START = 1,
AFTER_EVENT_END = 2,
EXISTING_WALLET_CLAIM = 3,
SUPPLY_DEPLETED = 4,
INAUTHENTIC = 5,
SUSPICIOUS = 6,
NO_LINKED_EVENTS = 7,
OVER_IP_LIMIT = 8,
OVER_DAILY_LIMIT = 9,
OVER_WEEKLY_LIMIT = 10,
OVER_MONTHLY_LIMIT = 11,
OVER_YEARLY_LIMIT = 12,
OVER_LIMIT = 13
}
enum ClaimResponseType {
CLAIM_ACCEPTED = 0,
CLAIM_DENIED = 1,
CLAIM_IN_PROGRESS = 2,
CLAIM_SERVER_ERROR = 3
}
interface ClaimPointProperties {
enableKiosk?: boolean;
enableSpin?: boolean;
type?: ClaimPointType;
imgSrc?: string;
modelSrc?: string;
mannequinType?: MannequinType;
hoverText?: string;
color1?: {
r: number;
g: number;
b: number;
a: number;
};
color2?: {
r: number;
g: number;
b: number;
a: number;
};
color3?: {
r: number;
g: number;
b: number;
a: number;
};
kioskImgSrc?: string;
itemYOffset?: number;
itemScale?: number;
}
enum ClaimPointType {
MARKETPLACE_IMAGE = 0,
CUSTOM_IMAGE = 1,
MODEL = 2,
MANNEQUIN = 3
}
enum MannequinType {
MALE = 0,
FEMALE = 1,
MATCH_PLAYER = 2
}
}
29 changes: 29 additions & 0 deletions components/VLMClickEvent.component.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Vector3 } from "@dcl/sdk/math";
export declare namespace VLMClickEvent {
enum Actions {
NONE = 0,
EXTERNAL = 1,
TRACKING_ONLY = 2,
SOUND = 3,
STREAM = 4,
MOVE = 5,
TELEPORT = 6
}
class Config {
type: Actions;
showFeedback: boolean;
hoverText: string;
externalLink?: string;
sound?: string;
moveTo?: {
cameraTarget: Vector3;
position: Vector3;
setCameraTarget: boolean;
};
teleportTo?: string;
hasTracking?: boolean;
trackingId?: string;
synced?: boolean;
constructor(config: Config);
}
}
46 changes: 46 additions & 0 deletions components/VLMImage.component.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { VLMBase } from "./VLMBase.component";
import { PBMaterial_PbrMaterial } from "@dcl/sdk/ecs";
import { MaterialService } from "../services/Material.service";
import { MeshService } from "../services/Mesh.service";
import { TransformService } from "../services/Transform.service";
import { ClickEventService } from "../services/ClickEvent.service";
import { ColliderService } from "../services/Collider.service";
export declare namespace VLMImage {
const configs: {
[uuid: string]: Config;
};
const instances: {
[uuid: string]: Instance;
};
class Config extends VLMBase.Config {
textureOptions: PBMaterial_PbrMaterial;
services: {
material: MaterialService;
mesh: MeshService;
collider: ColliderService;
transform: TransformService;
clickEvent: ClickEventService;
};
constructor(config: VLMConfig);
init: CallableFunction;
addAll: CallableFunction;
remove: CallableFunction;
delete: CallableFunction;
createOrReplaceInstance: CallableFunction;
removeInstance: CallableFunction;
deleteInstance: CallableFunction;
}
type VLMConfig = Config & VLMBase.VLMTextureConfig & {
instances: Instance[];
};
class Instance extends VLMBase.Instance {
constructor(config: Config, instanceConfig: Instance);
init: CallableFunction;
add: CallableFunction;
remove: CallableFunction;
delete: CallableFunction;
updateTransform: CallableFunction;
updateParent: CallableFunction;
updateClickEvent: CallableFunction;
}
}
42 changes: 42 additions & 0 deletions components/VLMMesh.component.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { VLMBase } from "./VLMBase.component";
import { MeshService } from "../services/Mesh.service";
import { TransformService } from "../services/Transform.service";
import { ClickEventService } from "../services/ClickEvent.service";
import { ColliderService } from "../services/Collider.service";
export declare namespace VLMMesh {
const configs: {
[uuid: string]: Config;
};
const instances: {
[uuid: string]: Instance;
};
class Config extends VLMBase.Config {
services: {
mesh: MeshService;
collider: ColliderService;
transform: TransformService;
clickEvent: ClickEventService;
};
constructor(config: VLMConfig);
init: CallableFunction;
addAll: CallableFunction;
remove: CallableFunction;
delete: CallableFunction;
createOrReplaceInstance: CallableFunction;
removeInstance: CallableFunction;
deleteInstance: CallableFunction;
}
type VLMConfig = Config & VLMBase.VLMTextureConfig & {
instances: Instance[];
};
class Instance extends VLMBase.Instance {
constructor(config: Config, instanceConfig: Instance);
init: CallableFunction;
add: CallableFunction;
remove: CallableFunction;
delete: CallableFunction;
updateTransform: CallableFunction;
updateParent: CallableFunction;
updateClickEvent: CallableFunction;
}
}
40 changes: 40 additions & 0 deletions components/VLMModeration.component.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
export declare namespace VLMModeration {
enum BanActions {
WALL = 0,
BLACKOUT = 1
}
enum BanWallType {
BLACK = 0,
INVISIBLE = 1,
MIRROR = 2
}
class Config {
sk: string;
allowCertainWearables?: boolean;
banCertainWearables?: boolean;
allowCertainUsers?: boolean;
banCertainUsers?: boolean;
allowWeb3Only?: boolean;
allowedWearables?: {
contractAddress: string;
itemId: string;
}[];
bannedWearables?: {
contractAddress: string;
itemId: string;
}[];
bannedUsers?: {
walletAddress?: string;
displayName?: string;
}[];
allowedUsers?: {
walletAddress?: string;
displayName?: string;
}[];
banActions?: BanActions[];
banWallType?: BanWallType;
constructor(config: VLMConfig);
}
class VLMConfig extends Config {
}
}
12 changes: 12 additions & 0 deletions components/VLMNotification.component.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export declare namespace VLMNotification {
class Message {
opacity: number;
visible: boolean;
constructor(_value: string, _messageOptions?: MessageOptions);
}
type MessageOptions = {
color: string;
fontSize: number;
delay: number;
};
}
Loading

0 comments on commit 678807e

Please sign in to comment.