Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"bugs": "https://github.com/decentraland/js-sdk-toolchain/issues",
"dependencies": {
"@actions/core": "^1.10.0",
"@dcl/protocol": "1.0.0-15560497739.commit-8e03daa",
"@dcl/protocol": "1.0.0-16428499484.commit-7aab7c2",
"@dcl/quickjs-emscripten": "^0.21.0-3680274614.commit-1808aa1",
"@dcl/ts-proto": "1.153.0",
"@types/fs-extra": "^9.0.12",
Expand Down
57 changes: 57 additions & 0 deletions packages/@dcl/playground-assets/etc/playground-assets.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,7 @@ export const componentDefinitionByName: {
"core::EngineInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBEngineInfo>>;
"core::GltfContainer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainer>>;
"core::GltfContainerLoadingState": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>>;
"core::GltfNodeModifiers": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfNodeModifiers>>;
"core::InputModifier": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBInputModifier>>;
"core::MainCamera": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMainCamera>>;
"core::Material": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMaterial>>;
Expand All @@ -652,6 +653,7 @@ export const componentDefinitionByName: {
"core::Raycast": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycast>>;
"core::RaycastResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycastResult>>;
"core::RealmInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRealmInfo>>;
"core::SkyboxTime": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBSkyboxTime>>;
"core::TextShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTextShape>>;
"core::Tween": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTween>>;
"core::TweenSequence": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTweenSequence>>;
Expand Down Expand Up @@ -1221,6 +1223,9 @@ export const GltfContainer: LastWriteWinElementSetComponentDefinition<PBGltfCont
// @public (undocumented)
export const GltfContainerLoadingState: LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>;

// @public (undocumented)
export const GltfNodeModifiers: LastWriteWinElementSetComponentDefinition<PBGltfNodeModifiers>;

// @public (undocumented)
export interface GrowOnlyValueSetComponentDefinition<T> extends BaseComponent<T> {
addValue(entity: Entity, val: DeepReadonly<T>): DeepReadonlySet<T>;
Expand Down Expand Up @@ -2380,6 +2385,35 @@ export namespace PBGltfContainerLoadingState {
export function encode(message: PBGltfContainerLoadingState, writer?: _m0.Writer): _m0.Writer;
}

// @public (undocumented)
export interface PBGltfNodeModifiers {
// (undocumented)
modifiers: PBGltfNodeModifiers_GltfNodeModifier[];
}

// @public (undocumented)
export namespace PBGltfNodeModifiers {
// (undocumented)
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBGltfNodeModifiers;
// (undocumented)
export function encode(message: PBGltfNodeModifiers, writer?: _m0.Writer): _m0.Writer;
}

// @public (undocumented)
export interface PBGltfNodeModifiers_GltfNodeModifier {
castShadows?: boolean | undefined;
material?: PBMaterial | undefined;
path: string;
}

// @public (undocumented)
export namespace PBGltfNodeModifiers_GltfNodeModifier {
// (undocumented)
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBGltfNodeModifiers_GltfNodeModifier;
// (undocumented)
export function encode(message: PBGltfNodeModifiers_GltfNodeModifier, writer?: _m0.Writer): _m0.Writer;
}

// @public (undocumented)
export interface PBInputModifier {
// (undocumented)
Expand Down Expand Up @@ -2883,6 +2917,20 @@ export namespace PBRealmInfo {
export function encode(message: PBRealmInfo, writer?: _m0.Writer): _m0.Writer;
}

// @public (undocumented)
export interface PBSkyboxTime {
fixedTime: number;
transitionMode?: TransitionMode | undefined;
}

// @public (undocumented)
export namespace PBSkyboxTime {
// (undocumented)
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBSkyboxTime;
// (undocumented)
export function encode(message: PBSkyboxTime, writer?: _m0.Writer): _m0.Writer;
}

// @public (undocumented)
export interface PBTextShape {
font?: Font | undefined;
Expand Down Expand Up @@ -3932,6 +3980,9 @@ export namespace Schemas {
}) => void;
}

// @public (undocumented)
export const SkyboxTime: LastWriteWinElementSetComponentDefinition<PBSkyboxTime>;

// @public (undocumented)
export interface Spec {
// (undocumented)
Expand Down Expand Up @@ -4164,6 +4215,12 @@ export type TransformType = {
// @public (undocumented)
export type TransformTypeWithOptionals = Partial<TransformType>;

// @public (undocumented)
export const enum TransitionMode {
TM_BACKWARD = 1,
TM_FORWARD = 0
}

// @public (undocumented)
export type Transport = {
send(message: Uint8Array | Uint8Array[]): Promise<void>;
Expand Down
39 changes: 19 additions & 20 deletions packages/@dcl/sdk-commands/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/@dcl/sdk-commands/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@dcl/inspector": "file:../inspector",
"@dcl/linker-dapp": "^0.14.2",
"@dcl/mini-comms": "1.0.1-20230216163137.commit-a4c75be",
"@dcl/protocol": "1.0.0-15560497739.commit-8e03daa",
"@dcl/protocol": "1.0.0-16428499484.commit-7aab7c2",
"@dcl/quests-client": "^1.0.3",
"@dcl/quests-manager": "^0.1.4",
"@dcl/rpc": "^1.1.1",
Expand Down
104 changes: 104 additions & 0 deletions test/ecs/components/GltfNodeModifiers.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
import {
Engine,
components,
PBMaterial_PbrMaterial,
PBMaterial,
PBMaterial_UnlitMaterial,
TextureWrapMode,
TextureFilterMode,
MaterialTransparencyMode
} from '../../../packages/@dcl/ecs/src'
import { testComponentSerialization } from './assertion'

function createPbrMaterial(pbr: PBMaterial_PbrMaterial): PBMaterial {
return {
material: {
$case: 'pbr',
pbr
}
}
}

function createUnlitMaterial(unlit: PBMaterial_UnlitMaterial): PBMaterial {
return {
material: {
$case: 'unlit',
unlit
}
}
}

describe('Generated GltfNodeModifiers ProtoBuf', () => {
it('should serialize/deserialize GltfNodeModifiers', () => {
const newEngine = Engine()
const component = components.GltfNodeModifiers(newEngine)

testComponentSerialization(component, {
modifiers: [
{
path: 'test/path',
castShadows: false,
material: createPbrMaterial({
albedoColor: { r: 0, g: 1, b: 1, a: 1 },
alphaTest: 1,
alphaTexture: undefined,
bumpTexture: {
tex: {
$case: 'texture',
texture: {
wrapMode: TextureWrapMode.TWM_MIRROR,
filterMode: TextureFilterMode.TFM_POINT,
src: 'not-casla',
tiling: undefined,
offset: undefined
}
}
},
emissiveTexture: {
tex: {
$case: 'texture',
texture: {
wrapMode: TextureWrapMode.TWM_MIRROR,
filterMode: TextureFilterMode.TFM_TRILINEAR,
src: 'not-casla',
tiling: undefined,
offset: undefined
}
}
},
texture: {
tex: {
$case: 'avatarTexture',
avatarTexture: {
userId: '',
wrapMode: TextureWrapMode.TWM_REPEAT,
filterMode: undefined
}
}
},
castShadows: true,
directIntensity: 1,
emissiveColor: { r: 0, g: 0, b: 1 },
reflectivityColor: { r: 0, g: 0, b: 1 },
emissiveIntensity: 0,
metallic: 1,
roughness: 1,
specularIntensity: 0,
transparencyMode: MaterialTransparencyMode.MTM_ALPHA_BLEND
})
},
{
path: 'test/path',
castShadows: false,
material: createUnlitMaterial({
castShadows: true,
diffuseColor: { r: 0, g: 1, b: 1, a: 1 },
alphaTexture: undefined,
alphaTest: undefined,
texture: undefined
})
}
]
})
})
})
13 changes: 13 additions & 0 deletions test/ecs/components/SkyboxTime.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { engine, components, TransitionMode } from '../../../packages/@dcl/ecs/src'
import { testComponentSerialization } from './assertion'

describe('Generated SkyboxTime ProtoBuf', () => {
it('should serialize/deserialize SkyboxTime', () => {
const skyboxTime = components.SkyboxTime(engine)

testComponentSerialization(skyboxTime, {
fixedTime: 0,
transitionMode: TransitionMode.TM_FORWARD
})
})
})
10 changes: 5 additions & 5 deletions test/snapshots/development-bundles/static-scene.test.ts.crdt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SCENE_COMPILED_JS_SIZE_PROD=467.2k bytes
SCENE_COMPILED_JS_SIZE_PROD=473.9k bytes
THE BUNDLE HAS SOURCEMAPS
(start empty vm 0.21.0-3680274614.commit-1808aa1)
OPCODES ~= 0k
Expand All @@ -10,9 +10,9 @@ EVAL test/snapshots/development-bundles/static-scene.test.js
REQUIRE: ~system/Testing
REQUIRE: ~system/EngineApi
REQUIRE: ~system/EngineApi
OPCODES ~= 54k
MALLOC_COUNT = 13838
ALIVE_OBJS_DELTA ~= 2.73k
OPCODES ~= 55k
MALLOC_COUNT = 14038
ALIVE_OBJS_DELTA ~= 2.77k
CALL onStart()
main.crdt: PUT_COMPONENT e=0x200 c=1 t=0 data={"position":{"x":5.880000114440918,"y":2.7916901111602783,"z":7.380000114440918},"rotation":{"x":0,"y":0,"z":0,"w":1},"scale":{"x":1,"y":1,"z":1},"parent":0}
main.crdt: PUT_COMPONENT e=0x202 c=1 t=0 data={"position":{"x":4,"y":0.800000011920929,"z":8},"rotation":{"x":0,"y":0,"z":0,"w":1},"scale":{"x":1,"y":1,"z":1},"parent":0}
Expand Down Expand Up @@ -56,4 +56,4 @@ CALL onUpdate(0.1)
OPCODES ~= 3k
MALLOC_COUNT = -5
ALIVE_OBJS_DELTA ~= 0.00k
MEMORY_USAGE_COUNT ~= 1217.82k bytes
MEMORY_USAGE_COUNT ~= 1230.31k bytes
Loading
Loading