From da1125b32b17a796dbf4e9dbb71f6ebaec013a05 Mon Sep 17 00:00:00 2001 From: gonnavis Date: Tue, 11 May 2021 23:14:01 +0800 Subject: [PATCH 1/2] FixThreejsExampleMovingSchema --- site/examples/ball-example/three/components.mjs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/site/examples/ball-example/three/components.mjs b/site/examples/ball-example/three/components.mjs index 62a6475a..4e5612f2 100644 --- a/site/examples/ball-example/three/components.mjs +++ b/site/examples/ball-example/three/components.mjs @@ -3,8 +3,13 @@ import { TagComponent, Component, Types } from "../../../build/ecsy.module.js"; export class Collidable extends TagComponent {} export class Collider extends TagComponent {} export class Recovering extends TagComponent {} + export class Moving extends TagComponent {} +Moving.schema = { + offset: { type: Types.Number, default: 0 } +}; + export class PulsatingScale extends Component {} PulsatingScale.schema = { From 4b4aa769b2d8eda049907244947c09e58cc66c7e Mon Sep 17 00:00:00 2001 From: gonnavis Date: Sat, 15 May 2021 23:08:08 +0800 Subject: [PATCH 2/2] Use `Component` instead of `TagComponent`. --- site/examples/ball-example/three/components.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/examples/ball-example/three/components.mjs b/site/examples/ball-example/three/components.mjs index 4e5612f2..3c57cdf9 100644 --- a/site/examples/ball-example/three/components.mjs +++ b/site/examples/ball-example/three/components.mjs @@ -4,7 +4,7 @@ export class Collidable extends TagComponent {} export class Collider extends TagComponent {} export class Recovering extends TagComponent {} -export class Moving extends TagComponent {} +export class Moving extends Component {} Moving.schema = { offset: { type: Types.Number, default: 0 }