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
4 changes: 1 addition & 3 deletions src/framework/components/anim/data.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
class AnimComponentData {
constructor() {
this.enabled = true;
}
enabled = true;
}

export { AnimComponentData };
4 changes: 1 addition & 3 deletions src/framework/components/animation/data.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
class AnimationComponentData {
constructor() {
this.enabled = true;
}
enabled = true;
}

export { AnimationComponentData };
5 changes: 1 addition & 4 deletions src/framework/components/audio-listener/data.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
class AudioListenerComponentData {
constructor() {
// Serialized
this.enabled = true;
}
enabled = true;
}

export { AudioListenerComponentData };
55 changes: 33 additions & 22 deletions src/framework/components/button/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,39 @@ import { BUTTON_TRANSITION_MODE_TINT } from './constants.js';
*/

class ButtonComponentData {
constructor() {
this.enabled = true;

this.active = true;
/** @type {Entity} */
this.imageEntity = null;
this.hitPadding = new Vec4();
this.transitionMode = BUTTON_TRANSITION_MODE_TINT;
this.hoverTint = new Color(0.75, 0.75, 0.75);
this.pressedTint = new Color(0.5, 0.5, 0.5);
this.inactiveTint = new Color(0.25, 0.25, 0.25);
this.fadeDuration = 0;
/** @type {Asset} */
this.hoverSpriteAsset = null;
this.hoverSpriteFrame = 0;
/** @type {Asset} */
this.pressedSpriteAsset = null;
this.pressedSpriteFrame = 0;
/** @type {Asset} */
this.inactiveSpriteAsset = null;
this.inactiveSpriteFrame = 0;
}
enabled = true;

active = true;

/** @type {Entity|null} */
imageEntity = null;

hitPadding = new Vec4();

transitionMode = BUTTON_TRANSITION_MODE_TINT;

hoverTint = new Color(0.75, 0.75, 0.75);

pressedTint = new Color(0.5, 0.5, 0.5);

inactiveTint = new Color(0.25, 0.25, 0.25);

fadeDuration = 0;

/** @type {Asset|null} */
hoverSpriteAsset = null;

hoverSpriteFrame = 0;

/** @type {Asset|null} */
pressedSpriteAsset = null;

pressedSpriteFrame = 0;

/** @type {Asset|null} */
inactiveSpriteAsset = null;

inactiveSpriteFrame = 0;
}

export { ButtonComponentData };
4 changes: 1 addition & 3 deletions src/framework/components/camera/data.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
class CameraComponentData {
constructor() {
this.enabled = true;
}
enabled = true;
}

export { CameraComponentData };
58 changes: 35 additions & 23 deletions src/framework/components/collision/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,41 @@ import { Vec3 } from '../../../core/math/vec3.js';
*/

class CollisionComponentData {
constructor() {
this.enabled = true;
this.type = 'box';
this.halfExtents = new Vec3(0.5, 0.5, 0.5);
this.linearOffset = new Vec3();
this.angularOffset = new Quat();
this.radius = 0.5;
this.axis = 1;
this.height = 2;
this.convexHull = false;
/** @type {Asset | number} */
this.asset = null;
/** @type {Asset | number} */
this.renderAsset = null;
this.checkVertexDuplicates = true;

// Non-serialized properties
this.shape = null;
/** @type {Model | null} */
this.model = null;
this.render = null;
this.initialized = false;
}
enabled = true;

type = 'box';

halfExtents = new Vec3(0.5, 0.5, 0.5);

linearOffset = new Vec3();

angularOffset = new Quat();

radius = 0.5;

axis = 1;

height = 2;

convexHull = false;

/** @type {Asset|number|null} */
asset = null;

/** @type {Asset|number|null} */
renderAsset = null;

checkVertexDuplicates = true;

// Non-serialized properties
shape = null;

/** @type {Model|null} */
model = null;

render = null;

initialized = false;
}

export { CollisionComponentData };
4 changes: 1 addition & 3 deletions src/framework/components/element/data.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
class ElementComponentData {
constructor() {
this.enabled = true;
}
enabled = true;
}

export { ElementComponentData };
4 changes: 1 addition & 3 deletions src/framework/components/gsplat/data.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
class GSplatComponentData {
constructor() {
this.enabled = true;
}
enabled = true;
}

export { GSplatComponentData };
4 changes: 1 addition & 3 deletions src/framework/components/joint/data.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
class JointComponentData {
constructor() {
this.enabled = true;
}
enabled = true;
}

export { JointComponentData };
4 changes: 1 addition & 3 deletions src/framework/components/layout-child/data.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
class LayoutChildComponentData {
constructor() {
this.enabled = true;
}
enabled = true;
}

export { LayoutChildComponentData };
4 changes: 1 addition & 3 deletions src/framework/components/layout-group/data.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
class LayoutGroupComponentData {
constructor() {
this.enabled = true;
}
enabled = true;
}

export { LayoutGroupComponentData };
4 changes: 1 addition & 3 deletions src/framework/components/light/data.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
class LightComponentData {
constructor() {
this.enabled = true;
}
enabled = true;
}

export { LightComponentData };
4 changes: 1 addition & 3 deletions src/framework/components/model/data.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
class ModelComponentData {
constructor() {
this.enabled = true;
}
enabled = true;
}

export { ModelComponentData };
Loading